Question: I currently have a situation where I have to find the next value after my current move. 

Currently I have below:

```
 SELECT CONVERT(CHAR(17), PlannedStartDateUTC,13) 
 FROM   VisitMovement VM 
 WHERE  vm.VisitMovement_GUID = (SELECT VM2.VisitMovement_GUID 
                                 FROM VisitMovement VM2 
                                 WHERE vm2.OrderIndex = (VisitMovement.OrderIndex +10) 
                                   AND VM2.Visit_GUID = VisitMovement.Visit_GUID )) AS [Estimated Move],

```

Which works by using `VisitMovement.OrderIndex` to find the next move. However, in some situations the `OrderIndex` might not be +10 but +20. 

I can't understand how I would logically write this to find the next move.

Any more information please get in touch.

Answer: 
How have defined the ip of the local server in each node? If you have given the public ip, then the listener would have failed to connect to the port. You must specify 0.0.0.0 for the current node 

```
server.1=0.0.0.0:2888:3888
server.2=192.168.10.10:2888:3888
server.3=192.168.2.1:2888:3888

```

This change must be performed at the other nodes too.
I had the same error log, in my case, i use hostname of my node in `zookeeper.conf`.

My nodes were on virtual machine in **Centos 8**.

Like @user2286693 said, my mistake was the resolution mechanism:

Since `node1`, when I ping node1:

```
PING node1(localhost (::1)) 56 data bytes

```

I check my `/etc/hosts` file and I find:

```
127.0.0.1   localhost localhost.localdomain localhost4 
localhost4.localdomain4 node1

```

I replace this line by:

```
127.0.0.1   localhost localhost.localdomain localhost4 
localhost4.localdomain4

```

and it's working!

Hope this help someone!