I am attempting to set up Bitbucket Server to run the plugin "Discuss that code for Bitbucket Server" against a HipChat Server deployment.
Discuss That Code for Bitbucket Server Version 1.2.2
Atlassian Bitbucket v4.12.0 (server)
Atlassian HipChat 2.1.3 (2016.12.08.212350) OVA (vmware)
The HipChat server and Bitbucket is up and running. I installed the plugin, and the next step is configuring the HipChat v1 Administration token. I attempted to create this under "group admin"->"API"-> select type Admin, gave it a name. (https://mibexsoftware.atlassian.net/wiki/display/DTC/Usage) I then continue to copy this hash to the "Discuss that code"-hook setup on one of the repositories in Bitbucket (on url ) as show on the top picture in the documentaion here:
When trying to enable the hook, i get error:
Token not valid: 401: Unauthorized (Auth token invalid. Please see: https://www.hipchat.com/docs/api/auth)
Something i noted: When looking at the link to generate a token, this goes to hipchat.com, not our local HipChat server, making me think the plugin tries to verify the token against the cloud instance rather than our local server.
I also verified that this plugin indeed was for the server version of Bitbucket, not cloud, but i seem to get no further.
Does anyone else manage to make this work?
I started with unpacking the dtc-122.jar and recursively searching for hipchat.com, found a few matches.
I added these lines to /etc/hosts (pure guesses):
And tried again, still claimed the API token was invalid, so I setup a tcpdump session:
root@<MY.FANCY.BITBUCKET.SERVER>:~# tcpdump -vvvv -s5000 -ieth0 | grep hipchat tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 5000 bytes BITBUCKET.SERVER.NAME.HERE.33765 > OUR.DNS.SERVER.NAME.HERE.domain: [bad udp cksum 0x6c6f -> 0xab6b!] 17552+ A? api.hipchat.com. (33) BITBUCKET.SERVER.NAME.HERE.33765 > OUR.DNS.SERVER.NAME.HERE.domain: [bad udp cksum 0x6c6f -> 0xee2d!] 59085+ AAAA? api.hipchat.com. (33) OUR.DNS.SERVER.NAME.HERE.domain > BITBUCKET.SERVER.NAME.HERE.33765: [udp sum ok] 59085 q: AAAA? api.hipchat.com. 0/1/0 ns: hipchat.com. [3m33s] SOA ns-127.awsdns-15.com. awsdns-hostmaster.amazon.com. 2 7200 900 1209600 300 (111) OUR.DNS.SERVER.NAME.HERE.domain > BITBUCKET.SERVER.NAME.HERE.33765: [udp sum ok] 17552*- q: A? api.hipchat.com. 3/4/0 api.hipchat.com. [1m] A 18.104.22.168, api.hipchat.com. [1m] A 22.214.171.124, api.hipchat.com. [1m] A 126.96.36.199 ns: hipchat.com. [1h] NS ns-1217.awsdns-24.org., hipchat.com. [1h] NS ns-127.awsdns-15.com., hipchat.com. [1h] NS ns-1947.awsdns-51.co.uk., hipchat.com. [1h] NS ns-867.awsdns-44.net. (218) ^C212 packets captured 214 packets received by filter 0 packets dropped by kernel
Seeing that it was talking to api.hipchat.com, i added this subdomain to the /etc/hosts to.
Turns out the API end-points are the same between Cloud and Server version, it started working
I did a handful of attempts to diskediting the ./com/zaneli/escalade/hipchat/HttpExecutor\$class.class which contains the hardcoded references to api.hipchat.com, and repackage the jar but after a few fails i figured that this lame workaround is enough for my proof of concept.
Hope this helps someone else.
I have done a bit of research and came across https://www.pixsoftware.nl/fr_BE/shop/product/36041?category=562.
Although the plugin is for Bitbucket Server as you indicated, the plugin vendor mentions:
Please also note that the add-on currently only supports HipChat cloud and not HipChat server.
So your observation about hipchat.com makes sense.
Premier Support Engineer | Atlassian
Hahhaa Hi Arib, i actually wanted to ask you on our last case, but figured ill hit the vendor and answers before asking you, so funny that you show up here too Not the answer i was hoping for but at least an answer.. Thanks mate, upvoted and confirmed as the answer.
Hahaha, thanks Jonas :) Unfortunately, there's not much we can since this is a third party plugin. However, I'm pretty sure you can seek help from Pix Software as I would think adapting it to HipChat Server shouldn't be complex. They certainly know more, though.
Hey Atlassian community, I help lead engineering at Sentry, an open-source error-tracking and monitoring tool that integrates with Jira. We started using Jira Software Cloud internally last year, a...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs