· devops-2

telnet/netcat: Waiting for a port to be open


$ telnet 10.0.0.1 8081
Trying 10.0.0.1...
telnet: connect to address 10.0.0.1: Operation timed out
telnet: Unable to connect to remote host

$ nc -v -w 1 10.0.0.1 8081
nc: connect to 10.0.0.1 port 8081 (tcp) failed: Connection refused

$ watch "nc -v -w 1 10.0.0.1 8081"

Every 2.0s: nc -v -w 1 10.0.0.1 8081                         Sun Jan 20 15:48:05 2013

nc: connect to 10.0.0.1 port 8081 (tcp) timed out: Operation now in progress

Every 2.0s: nc -v -w 1 10.0.0.1 8081                         Sun Jan 20 15:49:53 2013

Connection to 10.0.0.1 8081 port [tcp] succeeded!
  • LinkedIn
  • Tumblr
  • Reddit
  • Google+
  • Pinterest
  • Pocket