Uploaded files can't open and emoticons aren't loaded on Hipchat Server behind proxy

Still need help?

The Atlassian Community is here for you.

Ask the community

This article only applies to Atlassian's server products. Learn more about the differences between cloud and server.

This is for an outdated version of Hipchat Server

 This article applies to a version of Hipchat Server which will be deprecated soon. After that period the version will no longer be supported.

When will my version be deprecated?

The following versions have been deprecated:

  • Hipchat Server 1.3 (EOL Date: Aug 17, 2017)
  • Hipchat Server 2.0 (EOL Date: Jun 17, 2018)
  • Hipchat Server 2.1 (EOL Date: Dec 8, 2018)

The following version will be deprecated soon:

  • Hipchat Server 2.2 (EOL Date: May 30, 2019)

You can read more about Atlassian's End of Life policy here.

You should upgrade to a more recent version of Hipchat Server as soon as you can to take advantage of new features, and security and bug fixes.

 

At this time, we don't officially support Hipchat Server behind a proxy/load balancer hence we can't guarantee that it will work without any issue. We have a feature request raised regarding this matter at: HCPUB-318 - Getting issue details... STATUS which you can vote and subscribe to.


Problem

The links of uploaded file can't open and emoticons are not loaded after Hipchat Server behind a proxy.

For example, you may see emoticon is accessed on HTTP instead of the expected HTTPS in /var/log/hipchat/web.log:

2017-02-07T20:30:50.178069+00:00 hipchat web[5354]: /index#REQF20447 uid-1 5ms [info] === REQUEST START === url: http://hipchat.atlassian.com/files/img/emoticons/smile.png, method: GET, referrer: https://hipchat.atlassian.com/chat/room/2, server: , remote_addr: 172.31.32.1, user_agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.1 Safari/537.36, x_hipchat_request: public, x_forwarded_for: 65.223.61.1

You may also see the following error in /var/log/hipchat/web.log when accessing a file link:

2017-02-07T21:41:14.773336+00:00 hipchat web[10362]: /index#REQF1F9AB uid-anon 5ms [info] 404 - page does not exist: https://hipchat.atlassian.com/files/photos/111/SZlNITZopnMutlf_125.jpg

Diagnosis

Cause

SSL termination at the load balancer and proxying to port 80 within Hipchat caused the problem. Hipchat's NGINX site configuration for 000-web (/etc/nginx/sites-available/000-web & /etc/nginx/sites-enabled/000-web) is missing or does not include the following for the listener on port 80 as compared to port 443:

include includes/files-site;

Workaround

  1. Specify the following in port 80 directive in nginx files (/etc/nginx/sites-available/000-web & /etc/nginx/sites-enabled/000-web):

    include includes/files-site;
  2. Restart Hipchat Services for the changes to take effect:

    hipchat service --restart

    The changes to 000-web will be overwritten with the stock configuration if the server is rebooted or if any configuration change is made in the Hipchat UI that triggers a full service restart of Hipchat Server. To avoid losing customizations made to 000-web, please ensure that a script is added /home/admin/startup_scripts to restore any custom settings.

 

Last modified on Nov 2, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.