Bitbucket "Discuss that code" and Hipchat Server


I am attempting to set up Bitbucket Server to run the plugin "Discuss that code for Bitbucket Server" against a HipChat Server deployment.

Some versions:

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://HIPCHAT.SERVERNAME.GOES.HERE/admin/api) I then continue to copy this hash to the "Discuss that code"-hook setup on one of the repositories in Bitbucket (on url https://BITBUCKET.SERVERNAME.GOES HERE/projects/PROJECTNAME/repos/dashboard/settings/hooks) 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:

Something i noted: When looking at the link to generate a token, this goes to, 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?

7 answers

1 accepted

2 votes
Answer accepted

I started with unpacking the dtc-122.jar and recursively searching for, 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@&lt;MY.FANCY.BITBUCKET.SERVER&gt;:~# tcpdump -vvvv -s5000 -ieth0 | grep hipchat
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 5000 bytes
    BITBUCKET.SERVER.NAME.HERE.33765 &gt; OUR.DNS.SERVER.NAME.HERE.domain: [bad udp cksum 0x6c6f -&gt; 0xab6b!] 17552+ A? (33)
    BITBUCKET.SERVER.NAME.HERE.33765 &gt; OUR.DNS.SERVER.NAME.HERE.domain: [bad udp cksum 0x6c6f -&gt; 0xee2d!] 59085+ AAAA? (33)
    OUR.DNS.SERVER.NAME.HERE.domain &gt; BITBUCKET.SERVER.NAME.HERE.33765: [udp sum ok] 59085 q: AAAA? 0/1/0 ns: [3m33s] SOA 2 7200 900 1209600 300 (111)
    OUR.DNS.SERVER.NAME.HERE.domain &gt; BITBUCKET.SERVER.NAME.HERE.33765: [udp sum ok] 17552*- q: A? 3/4/0 [1m] A, [1m] A, [1m] A ns: [1h] NS, [1h] NS, [1h] NS, [1h] NS (218)
^C212 packets captured
214 packets received by filter
0 packets dropped by kernel

Seeing that it was talking to, 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 smile

I did a handful of attempts to diskediting the ./com/zaneli/escalade/hipchat/HttpExecutor\$class.class which contains the hardcoded references to, 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.

Kind regards




1 vote
Arbi Dridi Atlassian Team Dec 28, 2016

Hi Jonas, 

I have done a bit of research and came across

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 makes sense. 


Arbi Dridi
Premier Support Engineer | Atlassian

1 vote
Arbi Dridi Atlassian Team Dec 29, 2016

Amazing work, Jonas! Thanks for sharing and Happy New Year!

Thanks Arbi, you too!!

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 smile Not the answer i was hoping for but at least an answer.. Thanks mate, upvoted and confirmed as the answer.

0 votes
Arbi Dridi Atlassian Team Dec 29, 2016

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.  

LOL, just hacked my way around this. Their plugin now works against HipChat Server wink

0 votes
Arbi Dridi Atlassian Team Dec 29, 2016

Wonderful! If you don't mind, would please share it here for the community? 


Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 13, 2019 in Marketplace Apps

Marketplace Spotlight: Marketing apps for Confluence to keep your teams working on the same page


252 views 0 6
Read article

Atlassian User Groups

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!

Find my local user group

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

Groups near you