Fail to migrate the project to new gerrit sever with importer plugin

310 views
Skip to first unread message

Huang Kalo

unread,
Jul 14, 2017, 5:08:59 AM7/14/17
to Repo and Gerrit Discussion
I used gerrit importer command line to migrate the project from old server to new one.
I got below error message.
=================================================
$ ssh url_new importer project --from https://172.16.XXX.XXX --pass myPasswd -u myUser myProject
fatal: missing permissions or invalid import entity identifier: Accessing REST endpoint /config/server/version on source system failed with 404 Not found
=====================================================

However, I can use ssh command to check gerrit version.
------------------------------------------------------
$ ssh url_new gerrit version
gerrit version 2.11.10
------------------------------------------------------

Both gerrit servers use version 2.11.10 and LDAP auth type, gerrit service works well on both servers.
Old server uses H2 database, but new server uses clean MySQL database.

For Projects -> Project All-Projects -> Access -> Global Capabilities,
copy project & import permission of my account is set for both servers.


Is anything wrong or I miss any configuration or permission ?

Any suggestion will be appreciated.



Andrew Grimberg

unread,
Jul 14, 2017, 11:44:23 AM7/14/17
to repo-d...@googlegroups.com
The source needs to be the correct URL that the source system is
advertising as. Secondly, the account that is doing the migration needs
have to have the 'Access Database' global assigned in All-Projects.
Third, the password you're using needs to be the HTTP(S) password that
Gerrit created for you and not your normal user account password.

-Andy-

signature.asc

Huang Kalo

unread,
Jul 21, 2017, 3:58:03 AM7/21/17
to Repo and Gerrit Discussion
Hi Andrew,
     Thanks for your suggestions, but it still can't work.
I still got the same messsage.
--------------------------------------------------------------------------

fatal: missing permissions or invalid import entity identifier:
Accessing REST endpoint /config/server/version on source system failed with 404 Not found

--------------------------------------------------------------------------

The error message seems to be about REST API connetion.
How can I check the gerrrit configuration for REST API support?

My gerrit web service is behind apache server and config content is as below.

[gerrit]
        basePath = git
        canonicalWebUrl = https://172.16.XXX.XXX/tpv-review/

[httpd]
        listenUrl = proxy-https://*:8081/tpv-review/
        requestLog = true




Andrew Grimberg於 2017年7月14日星期五 UTC+8下午11時44分23秒寫道:

diptim...@appdynamics.com

unread,
Jul 25, 2017, 3:56:23 AM7/25/17
to Repo and Gerrit Discussion
You can write a small REST client and rest if you can hit the url. It seems URL is not reachable. Two things might cause this. 
1. Authentication issue w.r.t Gerrit permissions.
2. Some firewall/proxy issues.

Thanks
Diptiman Adak
Reply all
Reply to author
Forward
0 new messages