Node fails to join cluster - Current node is unable to service requests
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
Your newly provisioned Stash node fails to join the cluster:
2015-05-07 17:56:09,024 WARN [hz.hazelcast.IO.thread-Acceptor] com.hazelcast.nio.tcp.SocketAcceptor [192.168.1.2]:5701 [seo-stash-beta] [3.3-RC3] com.atlassian.stash.internal.cluster.NodeConnectionException: Current node is unable to service requests
com.atlassian.stash.internal.cluster.NodeConnectionException: Current node is unable to service requests
at com.atlassian.stash.internal.cluster.DefaultClusterJoinManager.checkClientCanJoin(DefaultClusterJoinManager.java:150) ~[DefaultClusterJoinManager.class:na]
at com.atlassian.stash.internal.cluster.DefaultClusterJoinManager.validateClient(DefaultClusterJoinManager.java:107) ~[DefaultClusterJoinManager.class:na]
at com.atlassian.stash.internal.hazelcast.ClusterJoinSocketInterceptor.onAccept(ClusterJoinSocketInterceptor.java:43) ~[ClusterJoinSocketInterceptor.class:na]
at com.hazelcast.nio.tcp.TcpIpConnectionManager.interceptSocket(TcpIpConnectionManager.java:153) ~[TcpIpConnectionManager.class:3.3-RC3]
at com.hazelcast.nio.tcp.SocketAcceptor.configureAndAssignSocket(SocketAcceptor.java:142) [SocketAcceptor.class:3.3-RC3]
at com.hazelcast.nio.tcp.SocketAcceptor.acceptSocket(SocketAcceptor.java:128) [SocketAcceptor.class:3.3-RC3]
at com.hazelcast.nio.tcp.SocketAcceptor.run(SocketAcceptor.java:70) [SocketAcceptor.class:3.3-RC3]
at java.lang.Thread.run(Thread.java:722) [na:1.7.0_09-icedtea]
Cause
The timezone of the affected node does not match that of the cluster:
2015-05-07 17:59:42,508 DEBUG [hz.hazelcast.cached.thread-1] c.hazelcast.nio.tcp.SocketConnector [192.168.1.2]:5701 [seo-stash-beta] [3.3-RC3] Starting to connect to Address[192.168.1.3]:5701
2015-05-07 17:59:42,509 DEBUG [hz.hazelcast.cached.thread-1] c.hazelcast.nio.tcp.SocketConnector [192.168.1.2]:5701 [seo-stash-beta] [3.3-RC3] Connecting to /192.168.1.3:5701, timeout: 0, bind-any: true
2015-05-07 17:59:42,509 DEBUG [hz.hazelcast.cached.thread-1] c.hazelcast.nio.tcp.SocketConnector [192.168.1.2]:5701 [seo-stash-beta] [3.3-RC3] Successfully connected to: Address[192.168.1.3]:5701 using socket Socket[addr=/192.168.1.3,port=5701,localport=52601]
2015-05-07 17:59:42,533 DEBUG [hz.hazelcast.cached.thread-1] c.hazelcast.nio.tcp.SocketConnector [192.168.1.2]:5701 [seo-stash-beta] [3.3-RC3] Could not connect to: /192.168.1.3:5701. Reason: NodeConnectionException[ 'sun.util.calendar.ZoneInfo[id="US/Pacific-New",offset=-28800000,dstSavings=3600000,useDaylight=true,transitions=185,lastRule=java.util.SimpleTimeZone[id=US/Pacific-New,offset=-28800000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=3,startMonth=2,startDay=8,startDayOfWeek=1,startTime=7200000,startTimeMode=0,endMode=3,endMonth=10,endDay=1,endDayOfWeek=1,endTime=7200000,endTimeMode=0]]' but is 'sun.util.calendar.ZoneInfo[id="US/Pacific",offset=-28800000,dstSavings=3600000,useDaylight=true,transitions=185,lastRule=java.util.SimpleTimeZone[id=US/Pacific,offset=-28800000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=3,startMonth=2,startDay=8,startDayOfWeek=1,startTime=7200000,startTimeMode=0,endMode=3,endMonth=10,endDay=1,endDayOfWeek=1,endTime=7200000,endTimeMode=0]]']
2015-05-07 17:59:42,534 DEBUG [hz.hazelcast.cached.thread-1] c.hazelcast.nio.tcp.SocketConnector [192.168.1.2]:5701 [seo-stash-beta] [3.3-RC3] Required property 'timeZone' should be 'sun.util.calendar.ZoneInfo[id="US/Pacific-New",offset=-28800000,dstSavings=3600000,useDaylight=true,transitions=185,lastRule=java.util.SimpleTimeZone[id=US/Pacific-New,offset=-28800000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=3,startMonth=2,startDay=8,startDayOfWeek=1,startTime=7200000,startTimeMode=0,endMode=3,endMonth=10,endDay=1,endDayOfWeek=1,endTime=7200000,endTimeMode=0]]' but is 'sun.util.calendar.ZoneInfo[id="US/Pacific",offset=-28800000,dstSavings=3600000,useDaylight=true,transitions=185,lastRule=java.util.SimpleTimeZone[id=US/Pacific,offset=-28800000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=3,startMonth=2,startDay=8,startDayOfWeek=1,startTime=7200000,startTimeMode=0,endMode=3,endMonth=10,endDay=1,endDayOfWeek=1,endTime=7200000,endTimeMode=0]]'
com.atlassian.stash.internal.cluster.NodeConnectionException: Required property 'timeZone' should be 'sun.util.calendar.ZoneInfo[id="US/Pacific-New",offset=-28800000,dstSavings=3600000,useDaylight=true,transitions=185,lastRule=java.util.SimpleTimeZone[id=US/Pacific-New,offset=-28800000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=3,startMonth=2,startDay=8,startDayOfWeek=1,startTime=7200000,startTimeMode=0,endMode=3,endMonth=10,endDay=1,endDayOfWeek=1,endTime=7200000,endTimeMode=0]]' but is 'sun.util.calendar.ZoneInfo[id="US/Pacific",offset=-28800000,dstSavings=3600000,useDaylight=true,transitions=185,lastRule=java.util.SimpleTimeZone[id=US/Pacific,offset=-28800000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=3,startMonth=2,startDay=8,startDayOfWeek=1,startTime=7200000,startTimeMode=0,endMode=3,endMonth=10,endDay=1,endDayOfWeek=1,endTime=7200000,endTimeMode=0]]'
at com.atlassian.stash.internal.cluster.DefaultClusterJoinManager.checkNoRequirementErrors(DefaultClusterJoinManager.java:284) ~[DefaultClusterJoinManager.class:na]
at com.atlassian.stash.internal.cluster.DefaultClusterJoinManager.checkRequirementsMatchServer(DefaultClusterJoinManager.java:213) ~[DefaultClusterJoinManager.class:na]
at com.atlassian.stash.internal.cluster.DefaultClusterJoinManager.joinServer(DefaultClusterJoinManager.java:81) ~[DefaultClusterJoinManager.class:na]
at com.atlassian.stash.internal.hazelcast.ClusterJoinSocketInterceptor.onConnect(ClusterJoinSocketInterceptor.java:48) ~[ClusterJoinSocketInterceptor.class:na]
at com.hazelcast.nio.tcp.TcpIpConnectionManager.interceptSocket(TcpIpConnectionManager.java:155) ~[TcpIpConnectionManager.class:3.3-RC3]
at com.hazelcast.nio.tcp.SocketConnector.tryToConnect(SocketConnector.java:131) ~[SocketConnector.class:3.3-RC3]
at com.hazelcast.nio.tcp.SocketConnector.run(SocketConnector.java:67) ~[SocketConnector.class:3.3-RC3]
at com.hazelcast.util.executor.CachedExecutorServiceDelegate$Worker.run(CachedExecutorServiceDelegate.java:209) [CachedExecutorServiceDelegate$Worker.class:3.3-RC3]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [na:1.7.0_09-icedtea]
at java.lang.Thread.run(Thread.java:722) [na:1.7.0_09-icedtea]
at com.hazelcast.util.executor.PoolExecutorThreadFactory$ManagedThread.run(PoolExecutorThreadFactory.java:59) [PoolExecutorThreadFactory$ManagedThread.class:3.3-RC3]
... 1 frame trimmed
Resolution
Update the node's time zone to match that of the cluster by symlinking /etc/localtime
to the correct time zone file usually found here: /usr/share/zoneinfo
If the node's time zone matches the other nodes in the cluster but Stash still reports a mismatch, force the JVM to acknowledge the timezone you want by passing an additional parameter to the JVM (Java Virtual Machine):
The following example sets the time zone for Chicago:
-Duser.timezone=America/Chicago
The List of TZ Database Time Zones documentation on Wikipedia contains a comprehensive list of possible time zones that can be set.
Examples of common time zones
Timezone | Code |
---|---|
Sydney | Australia/Sydney |
Los Angeles | America/Los_Angeles |
New York | America/New_York |
Paris | Europe/Paris |
Rome | Europe/Rome |
UTC | UTC |
Madrid | Europe/Madrid |