GitLab JIRA Development Panel integration does not work for self-hosted Jira: API V3 is no longer supported. Use API V4 instead.
Summary
After GitLab is integrated with self-hosted Jira according to https://docs.gitlab.com/ee/integration/jira_development_panel.html, sync of all projects fails with the error: Synchronization failed: API V3 is no longer supported. Use API V4 instead. (410)
Steps to reproduce
-
Integrate self-hosted GitLab with a self-hosted instance of Jira according to https://docs.gitlab.com/ee/integration/jira_development_panel.html (used Jira version 7.10.2)
-
in Jira go to
/secure/admin/ConfigureDvcsOrganizations!default.jspa
and check status of projects,Last activity
row will shows that Sync failed.
What is the current bug behavior?
Sync fails with the error Synchronization failed: API V3 is no longer supported. Use API V4 instead. (410)
.
What is the expected correct behavior?
Sync should be completed successfully.
Relevant logs and/or screenshots
/var/atlassian/application-data/jira/log/atlassian-jira.log:
2018-07-04 11:16:01,668 DVCSConnector.MessageExecutor:thread-1 ERROR atanayno 630x458x1 h6pm4r xxx.xxx.xxx.xx
/secure/admin/AddGithubEnterpriseOrganization!finish.jspa [c.a.j.p.d.service.message.MessageConsumer] Synchronization
failed: API V3 is no longer supported. Use API V4 instead. (410)
org.eclipse.egit.github.core.client.NoSuchPageException: API V3 is no longer supported. Use API V4 instead. (410)
at org.eclipse.egit.github.core.client.PageIterator.next(PageIterator.java:175)
at org.eclipse.egit.github.core.client.PageIterator.next(PageIterator.java:42)
The following requests reach GitLab (/var/log/gitlab/nginx/gitlab_access.log
):
xxx.xxx.xxx.xxx - - [04/Jul/2018:11:23:01 +0000] "GET /api/v3/repos/group3/project9/branches?per_page=100&page=1
HTTP/1.1" 200 2 "" "JIRA DVCS Connector/4.3.1"
xxx.xxx.xxx.xxx - - [04/Jul/2018:11:23:01 +0000] "GET /api/v3/repos/-/jira/events?per_page=1&page=1 HTTP/1.1" 410 62 ""
"JIRA DVCS Connector/4.3.1"
NOTE: integration with Jira cloud works fine. Here is the difference judging by the log /var/log/gitlab/nginx/gitlab_access.log
:
xxx.xxx.xxx.xxx - - [04/Jul/2018:11:22:32 +0000] "GET /api/v3/repos/group3/project9/branches?per_page=100&page=1
HTTP/1.1" 200 2 "" "JIRA DVCS Connector Vertigo/4.23.0"
xxx.xxx.xxx.xxx - - [04/Jul/2018:11:22:33 +0000] "GET /api/v3/repos/-/jira/pulls?
state=all&sort=updated&direction=desc&per_page=30&page=1 HTTP/1.1" 200 8996 "" "JIRA DVCS Connector Vertigo/4.23.0"
xxx.xxx.xxx.xxx - - [04/Jul/2018:11:22:33 +0000] "GET /api/v3/repos/-/jira/pulls/18/commits?per_page=100&page=1 HTTP/1.1"
200 2 "" "JIRA DVCS Connector Vertigo/4.23.0"
First, there is no /api/v3/repos/-/jira/events
request in case of Jira cloud.
Second, the versions of JIRA DVCS Connector
are different.
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Debian 8.10 Proxy: no Current User: git Using RVM: no Ruby Version: 2.4.4p296 Gem Version: 2.7.6 Bundler Version:1.16.2 Rake Version: 12.3.1 Redis Version: 3.2.11 Git Version: 2.17.1 Sidekiq Version:5.1.3 Go Version: unknown
GitLab information Version: 11.0.2-ee Revision: 74d8455 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql DB Version: 9.6.8 URL: https://gitlabhost.tld HTTP Clone URL: https://gitlabhost.tld/some-group/some-project.git SSH Clone URL: git@gitlabhost.tld:some-group/some-project.git Elasticsearch: no Geo: no Using LDAP: no Using Omniauth: yes Omniauth Providers: google_oauth2, azure_oauth2
GitLab Shell Version: 7.1.4 Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
Expand for output related to the GitLab application check
Checking GitLab Shell ...
GitLab Shell version >= 7.1.4 ? ... OK (7.1.4) Repo base directory exists? default... yes Repo storage directories are symlinks? default... no Repo paths owned by git:root, or git:git? default... yes Repo paths access is drwxrws---? default... yes hooks directories in repos are links: ... 1/1 ... repository is empty 1/2 ... repository is empty 1/3 ... repository is empty 1/4 ... ok 1/5 ... ok 1/13 ... ok 1/15 ... ok 1/17 ... ok 1/18 ... repository is empty 1/19 ... ok 8/21 ... ok 2/22 ... repository is empty 2/23 ... repository is empty 2/25 ... ok 8/28 ... ok 1/29 ... ok 1/31 ... ok 1/33 ... ok 12/34 ... repository is empty 19/36 ... repository is empty 1/37 ... repository is empty 1/38 ... ok 1/39 ... ok 20/40 ... repository is empty Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Redis available via internal API: OK
Access to /var/opt/gitlab/.ssh/authorized_keys: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Reply by email ...
...
Checking LDAP ...
LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab ...
Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 1/1 ... yes 1/2 ... yes 1/3 ... yes 1/4 ... yes 1/5 ... yes 1/13 ... yes 1/15 ... yes 1/17 ... yes 1/18 ... yes 1/19 ... yes 8/21 ... yes 2/22 ... yes 2/23 ... yes 2/25 ... yes 8/28 ... yes 1/29 ... yes 1/31 ... yes 1/33 ... yes 12/34 ... yes 19/36 ... yes 1/37 ... yes 1/38 ... yes 1/39 ... yes 20/40 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.3.5 ? ... yes (2.4.4) Git version >= 2.9.5 ? ... yes (2.17.1) Git user has default SSH configuration? ... yes Active users: ... 5 Elasticsearch version 5.1 - 5.5? ... skipped (elasticsearch is disabled)
Checking GitLab ... Finished