Wednesday, June 15, 2011

error : (98)Address already in use: make_sock: could not bind to address

(98)Address already in use: make_sock: could not bind to address

I would like to state first of all I am a novice with Linux, but have working in IT for 15 years. I have been searching the web on this issue for almost 2 days (off and on), and have found that my particular issue was not the same as the norm for this particular error code. I would like to give back (if you will).

Apparently having a cert.key password protected will hang Apache2 (maybe Apache as well). The solution was to remove the password on the cert.key and that solved my problem.

The general consensus with resolving this issue did help me figure out that apache2 was running but waiting for password on boot-up. The following command which you will find everywhere out in the cloud is as follows:

sudo netstat -ltnp | grep ':80' (it is important to note that apache was hanging and it did not matter what port I decided to investigate)

This would return the following:
tcp6 0 0 :::80 :::* LISTEN 1047/apache2

Then I ran the following command:

sudo kill -9 1047 (the pid that appears on your particular instance)

I was able to restart Apache and everything was groovy until I rebooted.

I suspected the password and started researching the how to remove the passphrase off of the cert key and found the following article:

The following part of the page actually helped me:

Always backup the original key first (just in case)!

# cp www.key www.key.origThen unencrypt the key with openssl. You’ll need the passphrase for the decryption process:

# openssl rsa -in www.key -out new.keyNow copy the new.key to the www.key file and you’re done. Next time you restart the web server, it should not prompt you for the passphrase.

I hope this helps and saves someone some valuable time.
credit to : hhabashy &
Reply With Quote

No comments:

Post a Comment