Copy of Unable to Start Chat Session After Server Upgrade to v1.2 Build 1.2.6

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Problem

After a server upgrade to v1.2 build 1.2.6, chat session no longer starts hence no one is able to chat. This is the error message visible in the web client:

PHP Error: Invalid argument supplied for foreach() on 
/hipchat-scm/web/application/models/tetra_proxy_service.php:99

0: /hipchat-scm/web/application/models/tetra_proxy_service.php:99 -> 
exception_handler() 
1: /hipchat-scm/web/application/models/tetra.php:93 -> 
get_not_dead_proxies() 
2: /hipchat-scm/web/application/models/tetra.php:132 -> 
getActiveProxyServices() 
3: /hipchat-scm/web/application/models/user.php:771 -> 
getAvailableProxyServices() 
4: /hipchat-scm/web/application/controllers/chat.php:689 -> 
getTargetService() 
5: /hipchat-scm/web/application/controllers/chat.php:457 -> 
get_config_and_session() 
6: /hipchat-scm/web/application/controllers/chat.php:537 -> new_chat() 
7: in Chat_Controller::index() 
8: /hipchat-scm/web/system/core/Kohana.php:284 -> invokeArgs() 
9: in Kohana::instance() 
10: /hipchat-scm/web/system/core/Event.php:209 -> call_user_func() 
11: /hipchat-scm/web/system/core/Bootstrap.php:55 -> run() 
12: /hipchat-scm/web/www/index.php:109 -> require()

The above error does not reflect the actual problem though. We're working on improving the error output in the UI.

It's important to check the logs instead and the following appears in the /var/log/chef.log

STDERR: error: Failed connect to github.com:443; Connection refused while accessing https://github.com/hipchat/punjab.git/info/refs
fatal: HTTP request failed
---- End output of git clone  "https://github.com/hipchat/punjab.git" "/hipchat/punjab/shared/cached-copy" ----
Ran git clone  "https://github.com/hipchat/punjab.git" "/hipchat/punjab/shared/cached-copy" returned 128
[2015-05-28T14:01:55+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

Diagnosis

Check if Firewall is enabled in your environment and make sure it specifically allow access to the link. You can run

wget https://github.com/hipchat/punjab.git from your server terminal and check for the returned response 200 OK

Cause

Chef is trying to reach out to github.com to download some source code but the server cannot successfully reached out to that due to firewall restrictions. On this type of errors, Chef stops running which leaves the system on a halfway-state, with the binaries from the upgrade, but without the actual configuration changes. The services fail to run because the server is on the new version, but with configuration from the older version.

Workaround

Since the server requires access to https://github.com/hipchat/punjab.git, add this address to your firewall rule and then run this command to re-run Chef and service restart:

hipchat upgrade -r
hipchat service -u

Resolution

The server should not pull an upgrade package from GitHub. The fix will be shipped in the next Hipchat Server build release. We'll update this section accordingly by then.

Last modified on Jan 19, 2018

Was this helpful?

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