Hipchat Server is not listening on ports 5222 and 5223

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.

Problem

XMPP ports 5222 and 5223 are not listening on Hipchat Server 1.3.1 or later, contrary to the documented inbound port requirements. This can be observed using the netstat command, as in the following example output in Hipchat Server 2.2.4:

admin@hipchat:~$ netstat -an |grep -i 52 |grep -i listen
tcp        0      0 0.0.0.0:5221            0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:5232            0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:5233            0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:5242            0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:5243            0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:5211            0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:5280            0.0.0.0:*               LISTEN
unix  2      [ ACC ]     STREAM     LISTENING     18452    public/showq

Cause

No processes on Hipchat Server v1.3.1 or later listen on XMPP ports 5222 and 5223. Instead, these ports are open at the kernel level and are routed via internal NAT rules to their appropriate processes.

The internal routing rules can be found using the iptables command as follows:

iptables -t nat -L -n -v


Below is a sample output of the above command showing destination ports 5222 and 5223 routed to tetra-proxy processes listening on ports 5232 and 5233 on Hipchat Server 2.2.4:

root@hipchat-server:/home/admin# iptables -t nat -L -n -v
Chain PREROUTING (policy ACCEPT 6947 packets, 474K bytes)
 pkts bytes target     prot opt in     out     source               destination
    0     0 DNAT       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:5222 state NEW statistic mode nth every 2 /* tetra-proxy-0-chat-port */ to::5232
    0     0 DNAT       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:5223 state NEW statistic mode nth every 2 /* tetra-proxy-0-chat-port-ssl */ to::5233
    0     0 DNAT       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:5222 state NEW statistic mode nth every 1 /* tetra-proxy-1-chat-port */ to::5242
    0     0 DNAT       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:5223 state NEW statistic mode nth every 1 /* tetra-proxy-1-chat-port-ssl */ to::5243

Chain INPUT (policy ACCEPT 6939 packets, 468K bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain OUTPUT (policy ACCEPT 138K packets, 9009K bytes)
 pkts bytes target     prot opt in     out     source               destination
    8   480 DNAT       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:5222 state NEW statistic mode nth every 2 /* tetra-proxy-0-chat-port */ to::5232
    0     0 DNAT       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:5223 state NEW statistic mode nth every 2 /* tetra-proxy-0-chat-port-ssl */ to::5233
    7   420 DNAT       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:5222 state NEW statistic mode nth every 1 /* tetra-proxy-1-chat-port */ to::5242
    0     0 DNAT       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:5223 state NEW statistic mode nth every 1 /* tetra-proxy-1-chat-port-ssl */ to::5243

Chain POSTROUTING (policy ACCEPT 138K packets, 9010K bytes)
 pkts bytes target     prot opt in     out     source               destination

Workaround/Resolution

This is the intended behavior of Hipchat Server v1.3.1 or later and no resolution or workaround is required.

Last modified on Jan 19, 2018

Was this helpful?

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