I have setup the docker swarm manager in one machine with IP 192.168.XXX.XXX by using this command :
docker swarm init --advertise-addr=192.168.XXX.XXX and I got this message :
To add a worker to this swarm, run the following command:
docker swarm join --token SWMTKN-1- 
0jpgak7bm7t4mzluz48gdub06f5036q8yaoo99awkjmlz48vtb- 
1eutz0k1vp37ztmiuxdnglka2 192.168.XXX.XXX:2377
To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions.
In other machine I tried the following command :
docker swarm join --token SWMTKN-1- 
0jpgak7bm7t4mzluz48gdub06f5036q8yaoo99awkjmlz48vtb- 
1eutz0k1vp37ztmiuxdnglka2 192.168.XXX.XXX:2377
and the result was :
error response from daemon : rpc error : code = Unavailable desc = all 
SubConns are in TransientFailure, latest connection error: connection error 
: desc = "transport: Error while dialing dial tcp 192.168.XXX.XXX:2377 : 
connect: connection refused
Docker version :
Client: Docker Engine - Community
 Version:           18.09.0
 API version:       1.39
 Go version:        go1.10.4
 Git commit:        4d60db4
 Built:             Wed Nov  7 00:47:51 2018
 OS/Arch:           windows/amd64
 Experimental:      false
Server: Docker Engine - Community
 Engine:
  Version:          18.09.0
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.4
  Git commit:       4d60db4
  Built:            Wed Nov  7 00:55:00 2018
  OS/Arch:          linux/amd64
  Experimental:     false
I also tried to provide my machine ip 192.168.XXX.XXX on the listen address in swarm init but I 
got the following error : 
docker swarm init --advertise-addr 192.168.XXX.XXX --listen-addr 192.168.XXX.XXX
Error response from daemon: manager stopped: failed to listen on remote API address: listen tcp 192.168.XXX.XXX: bind: cannot assign requested address