I cannot connect jira server to bitbucket cloud.
When trying to connect i receive the following error:
The authentication with Bitbucket has failed. Please check your OAuth settings.
I've checked the team account name, OAuth Key and Secret 10 times, and i'm 100% sure they are correct.
I've checked the atlassion-jira.log and found the following error:
2018-08-29 13:06:12,629 http-nio-8080-exec-3 WARN balticode 786x49775x1 h4dbnl [some ip adresses here] /secure/admin/AddBitbucketOrganization.jspa [c.a.j.p.d.s.bitbucket.webwork.AddBitbucketOrganization] Error redirect user to bitbucket server.
java.lang.IllegalArgumentException: Response body is incorrect. Can't extract a token from an empty string
A little bit of searching on google resulted in this link. However, when looking at my server configuration, timezone is set correctly and synced with NTP, see screenshot: http://prntscr.com/ko7kdx
What else could be wrong? Using jira software 7.11.0
Thanks in advance!
Menno,
Are you behind a proxy by any chance? If so, if you bypass the proxy does the issue persist? You can also try putting Jira in Safe Mode to see if an add-on is causing the issue.
For the workaround is there a way to manually sync it to double-check?
Lastly you can try recreating the OAuth consumer:
Log in Bitbucket using the the right team or user account
From Bitbucket settings -> OAuth, Revoke the JIRA access -> Delete the existing JIRA OAuth consumer
Add a new OAuth consumer as follows:
- Name: any name
- Callback URL: http://jira:8080 (Jira URL)
- Grant ALL Permissions
- Save
Use the new tokens for adding DVCS Account in JIRA
If the problem persists, follow these steps to enable debug logging so that we can have more visibility on what happens in the backend:
From JIRA, go to JIRA Administration -> System -> Logging and Profiling
Click Configure logging level for another package
Add org.apache.http as package name -> Leave logging level as TRACE -> Add
Click Configure logging level for another package (again)
Add com.atlassian.jira.plugins.dvcs as package name -> Leave logging level as TRACE -> Add
Add the DVCS Account again for JIRA to log the DEBUG messages
Generate a fresh Support Zip
Once you have that, I can make a support ticket for you so you can send it to us and we can investigate.
Regards,
Shannon
Dear Shannon,
Thank you for your response.
Our jira is running behind apache, so it's accessible by a url without port 8080 behind it.
I've also tried to use our server ip address with port 8080 behind it in the OAuth consumer settings callback url field, but that also didn't work.
Trying safe mode also didn't improve anything, still the same error message.
I've also generated a new OAuth customer for the team with all permissions, but unfortunateley that also din't solve the problem.
I've generated a support zip like you requested. Please note i received the following message after generating:
Support ZIP has been created but some items might be missing
Do i need to upload it here or do i need to wait until a support ticket has been created?
Thank you :)
Menno
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you, Menno!
I created the support ticket now, so please check your email for that link.
You can then attach your support ticket directly to the case and we can have a look at your logs.
Regards,
Shannon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have the same error. The above solutions do not work. Did you solve the problem?
Maciej
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes. Basically I just repeated the steps suggested by @Shannon S multiple times and after about 5 attempts it somehow worked. So i hope that's also the case for you...
Below are the steps I did like 5 times. Good luck... :S
Lastly you can try recreating the OAuth consumer:
Log in Bitbucket using the the right team or user account
From Bitbucket settings -> OAuth, Revoke the JIRA access -> Delete the existing JIRA OAuth consumer
Add a new OAuth consumer as follows:
- Name: any name
- Callback URL: http://jira:8080 (Jira URL)
- Grant ALL Permissions
- Save
Use the new tokens for adding DVCS Account in JIRA
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Had the same issue. The problem was caused by the current time that was set on the Jira instance. It was just wrong. After I fixed the local time on the machine I was able to connect both applications again.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.