daemon_controller
daemon_controller copied to clipboard
ping_command doesn't work with 'localhost' on 64 Bit linux
Giving 'localhost' as host for the ping_command leads to endles ping on a 64 Bit CentOS 7 linux because the internal representation of the sock_addr seems to be incorrect (a lot of zeros and a 1):
CentOS7 (64 Bit)/ruby/2.0/x86_64 gems:
sockaddr = "\n\x00+g\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00"
On 32 Bit CentOS 5 it is correct (representation shows 127.0.0.1 in hex):
CentOS5 (32 Bit)/ruby/2.0/i686 gems:
sockaddr = "\x02\x00+g\x7F\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00"
Changing the string 'localhost' to '127.0.0.1' works on both architectures.