Error encountered creating link between Bitbucket Server and HipChat Server
The error illustrated below occurs when trying to re-configure Bitbucket Server to HipChat Server integration.
Error encountered creating your hipchat link Something went wrong integrating Bitbucket and HipChat. We probably had trouble connecting to the HipChat server. Check that the connection between your server and HipChat is working correctly and try again.
After clicking "Connect HipChat" from Bitbucket Server and you get re-directed to HipChat. Clicking the Install button from HipChat redirects you to the error shown above.
2015-11-05 16:00:00,000 WARN [http-nio-8080-exec-3] cs3gallery @FBIWLAx996x452x3 igxs9o 127.0.0.1 "POST /rest/hipchat/integration/latest/installation/complete HTTP/1.1" c.a.p.h.rest.HipChatLinkResource javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
- Mostly experienced while trying to upgrade the HipChat integration from the Old API to the new and improved Oauth2 authentication method.
- You may notice that you have to re-login again to Bitbucket Server after trying to integrate with HipChat.
- For some reason Bitbucket server may have encountered a problem with creating the integration e.g. in one case, this may have failed due to a client side (browser specific) problem.
- The problem could occur if the base URL configured in Bitbucket Server is not the same as the URL you use to log on to Bitbucket Server usually, this could trigger a XSRF exception (same reason you may need to re-login to Bitbucket server) which will also create this kind of error.
- It could also be that you need to import the certificate from HipChat into the server where Bitbucket Server is running.
- Try to remove the existing integration from the HipChat end.
- If you're using HipChat cloud (hipchat.com), login to your HipChat admin
- From the Integrations section (https://xxx.hipchat.com/admin/addons), remove the existing integrations with Bitbucket Server by clicking on the (...) icon in the far right of the Integration, and selecting uninstall.
- From the API tab, click the delete icons on the far right of the token corresponding to your Bitbucket Server integration to remove it.
- Try again from Bitbucket Server to "Connect HipChat"
- Try again with a different browser to rule-out client side issues.
- Follow this troubleshooting guide to import the SSL certificate: Unable to connect to SSL services due to "PKIX Path Building Failed" error