———————————————————————
– OVERVIEW / THOUGHT PROCESS –
———————————————————————
This post is simply an eclectic mixture of the various ERROR messages I run into on a daily basis. Maybe this will help someone as they’re googling for their answers one day.
Enjoy!
———————————————————————
– APACHE FAIL (FQDN) –
———————————————————————
ERROR:
shell> service httpd restart
Stopping httpd: [FAILED]
Starting httpd: httpd: apr_sockaddr_info_get() failed for homehost4.webpageandemail.com
httpd: Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName [FAILED]
SOLUTION:
shell> sudo nano /etc/hosts
# add a line that has your Fully Qualified Domain Name (FQDN).
# mine reads: “10.0.1.10 computername.domain.com”
shell> sudo nano /etc/sysconfig/network
# make sure you specify your FQDN: “HOSTNAME=computername.domain.com”
———————————————————————
– MYSQL FAIL –
———————————————————————
ERROR:
shell> mysql -u root -p
Enter password:
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)
shell> sudo service mysqld start
MySQL Daemon failed to start.
Starting mysqld: [FAILED]
LOG FILE (/var/log/mysqld.log):
131207 2:54:11 InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: ‘open’.
InnoDB: Cannot continue operation.
131207 02:54:11 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
SOLUTION:
shell> chown -R mysql:mysql /var/lib/mysql
———————————————————————
– SERVICE HTTPD FAIL –
———————————————————————
ERROR:
shell> sudo service httpd start
Starting httpd: [FAILED]
LOG FILE (/var/log/httpd/ssl_error_log):
[Sat Dec 07 00:17:23 2013] [error] Init: Pass phrase incorrect
[Sat Dec 07 00:17:23 2013] [error] SSL Library Error: 218529960 error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag
[Sat Dec 07 00:17:23 2013] [error] SSL Library Error: 218640442 error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error
SOLUTION:
shell> sudo nano /etc/httpd/conf/httpd.conf
# Look for a line in /etc/httpd/conf/httpd.conf that says “SSLPassPhraseDialog exec:/etc/httpd/conf/passphrase”
# If you don’t know your passphrase, put ‘#’ in front of the line to comment it out
shell> sudo service httpd start
Starting httpd: Apache/2.2.15 mod_ssl/2.2.15 (Pass Phrase Dialog)
Some of your private key files are encrypted for security reasons.
In order to read them you have to provide the pass phrases.
Server computername.domain.com:443 (RSA)
Enter pass phrase:
OK: Pass Phrase Dialog successful.
[ OK ]
———————————————————————
– PYTHON KERBEROS INSTALL FAIL –
———————————————————————
# I was going to install ‘GateOne’ but it requires Python, Tornado, and Kerberos.
# Everything went very well until I got to the kerberos install….
shell> yum groupinstall ‘Development Tools’
shell> wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py
shell> sudo python ez_setup.py
shell> wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py
shell> sudo python get-pip.py
shell> sudo pip install tornado
shell> sudo pip install kerberos
ERROR: krb5-config: command not found
ERROR: command ‘gcc’ failed with exit status 1
# the actual error is posted below the SOLUTION.
# so install the package that contains this command.
LOG FILE (found in failed install message):
# posted below the SOLUTION
SOLUTION:
shell> sudo yum install krb5-devel
shell> sudo pip install kerberos
building ‘kerberos’ extension … [SUCCESS]
———————-
RESULTS FROM FAILED INSTALL:
shell> sudo pip install kerberos
Downloading/unpacking kerberos
Downloading kerberos-1.1.1.tar.gz
Running setup.py egg_info for package kerberos
Installing collected packages: kerberos
Running setup.py install for kerberos
building ‘kerberos’ extension
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python2.6 -c src/kerberos.c -o build/temp.linux-x86_64-2.6/src/kerberos.o sh: krb5-config: command not found
…
———————————————————————
– ANOTHER MYSQL DAEMON ALREADY RUNNING –
———————————————————————
# It was a simple power outage. When the server was back up and running again, the mysqld service wasn’t working. I tried to stop the service, and start it again. I also tried a service restart, and I even tried a ‘sudo shutdown -h now’ … but I just kept getting this error: ‘Another MySQL daemon already running with the same unix socket.’
Unfortunately, this message was the only one I could find. There was nothing in /var/log/mysql.log or in /var/log/messages.
In the end, the fix was simple.
shell> sudo mv /var/lib/mysql/mysql.sock /var/lib/mysql/mysql.sock.old
shell> sudo service mysqld restart
SOLUTION: kill the socket and let mysqld create another one.
—————————————–
Always remember… WHAT IF AND WHY NOT?!?