Synchrony process get stuck and not cleared in Confluence Upgrade process
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
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.
*Fisheye および Crucible は除く
要約
Sometimes, while doing Confluence upgrade Synchrony process get stuck and not being killed or cleared by the upgrade process. This creates a problem of starting the Synchrony after an upgrade and we get the below error in the atlassian-synchrony.log
2020-12-08 15:56:47,437 DEBUG [225:StdOutHandler [/opt/atlassian/confluence/jre/bin/java]] 2020-12-08 14:56:47,435 ERROR [main] [com.hazelcast.instance.AddressPicker] [LOCAL] [confluencesd_HA-Synchrony] [3.11.4] Cannot bind to a given address: /x.x.x.x Hazelcast cannot start. Port [5701] is already in use and auto-increment is disabled.
2020-12-08 15:56:47,437 DEBUG [225:StdOutHandler [/opt/atlassian/confluence/jre/bin/java]] com.hazelcast.core.HazelcastException: Cannot bind to a given address: /x.x.x.x. Hazelcast cannot start. Port [5701] is already in use and auto-increment is disabled.
環境
This is a common behavior in Server and Datacenter environment.
診断
Synchrony runs on 8091 (Default) port in Server and 5701 (default) in Data Center. If we see below error message in atlassian-synchrony.log similar to 8091 port as well:
2020-12-08 15:56:47,437 DEBUG [225:StdOutHandler [/opt/atlassian/confluence/jre/bin/java]] 2020-12-08 14:56:47,435 ERROR [main] [com.hazelcast.instance.AddressPicker] [LOCAL] [confluencesd_HA-Synchrony] [3.11.4] Cannot bind to a given address: /x.x.x.x Hazelcast cannot start. Port [5701] is already in use and auto-increment is disabled.
2020-12-08 15:56:47,437 DEBUG [225:StdOutHandler [/opt/atlassian/confluence/jre/bin/java]] com.hazelcast.core.HazelcastException: Cannot bind to a given address: /x.x.x.x. Hazelcast cannot start. Port [5701] is already in use and auto-increment is disabled.
To diagnose, Stop the Confluence and try to check if the port is currently initialized and used by the old Synchrony process. We can run a couple of commands:
Linux
1. netstat -tulpn
2. lsof -i @localhost:8091 (If Synchrony Port is 8091)
Windows
1. netstat -an
ソリューション
If we get any process is running after stopping the Confluence releated to Synchrony, please kill those processes so that Port will be free. In the next Confluence restart, we will not see such error "Cannot bind to a given address" or "Port is already in use".