bind is failing, returning EADDRNOTAVAIL

Posted July 3, 2014 5.8k views

I have been moving from another CentOS server to DigitalOcean. I had a software package working on the other server, and it fails on a socket bind: bind() is returning EADDRNOTAVAIL for the machine’s ip address, 91.237.88.XXX ( x’d out the last subnet for security ).

I have been talking to the software package vendor and they did detailed error analysis to find this socket failure. As I mentioned, another server with CentOS 6.4 works. My droplet CentOS is 6.5, and that is the only difference. The software builds on CentOS 6.5 without error, but fails to open the socket. Tech support thinks it is the VPS environment at Digital Ocean.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

Seeing that the software works fine on a CentOS 6.4 server, I would recommend installing it on a CentOS 6.4 droplet instead.

Sorry, but that is not an answer! It turned out I had a wrong digit in the /etc/hosts file that mismatched the “ifconfig -a” inet address. Tech support asked me to check the /etc/hosts file and I found the problem.