Forums LAMPStack

Missing sock

Subscribe to Missing sock 11 post(s), 4 voice(s)

 
Avatar AutoSponge 5 post(s)

When I install the LAMP stack, it works fine—until I reboot. When I reboot I get an error and try to start everything up, Apache starts but MySQL doesn’t. It says that my site can not reach the database. When I try to reach the db through phpmyadmin, the error seems to suggest there is a socket problem but there is no socket file in /tmp where the .cnf file thinks it is.

Should the stack have a sock? Should it be in tmp? Is this a red herring error?

 
Avatar antonio Administrator 508 post(s)

Hi AutoSponge,

The socket file is located at /path/to/installation/mysql/tmp/mysql.sock, not at /tmp. How are you starting the servers?

Cheers

 
Avatar AutoSponge 5 post(s)

I tried the LAMP stack a couple more times. Each time, the sock was missing. Then I tried installing the phpbb2 stack. That had the proper sock file. So I finished my configuration and rebooted. When I booted, I checked to make sure that the service wasn’t started-the site did not load. Then I went to my home/stack/ folder and ran the startup script. It bombed, but with a different error. So, I checked to see if the sock file was there-it was gone!

I still don’t know why it’s happening, but I can repeat it and I don’t have a workaround yet. Any suggestions are appreciated.

UPDATE:

I’ve rebuilt the stack. This time I paid special attention to the sock file. It’s a 0-byte file, completely empty. I could not copy it or back it up in any way. I stopped and started the server. Everything worked. When I rebooted, same error: “phpBB: Critical Error Could not connect to the database”. Phpmyadmin error reads: #2002 the server is not responding.

So I tried to put an empty socket file back in mysql/tmp where, once again, it is missing. That doesn’t work. So far, every time I reinstall, the same thing happens.

The command I use to start services is ./ctlscript.sh start apache

 
Avatar AutoSponge 5 post(s)

I set the tmp folder so everyone (including root) was read only. The sock file is still there (yay) but I get the same error after a reboot (waa).

Any ideas?

 
Avatar AutoSponge 5 post(s)

I went to the command line, trying to get more info:

ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ’/home/autosponge/lampstack/mysql/tmp/mysql.sock’ (111)

I changed some values of usr/local in some config files, I don’t know if that changed anything but…

then I ran ./mysqld instead of ./mysql and it worked.

 
Avatar antonio Administrator 508 post(s)

The command I use to start services is ./ctlscript.sh start apache

You’re only starting the Apache server. Either you use

./ctlscript.sh start mysql

after starting Apache, or you just go the easy way with

./ctlscript start

which will start everything. You can find more information on how to use the control script in the README file. We are working on a GUI tool to control the servers, but we don’t know when it will be released yet.

Cheers

 
Avatar AutoSponge 5 post(s)

ok that makes sense

 
Avatar Wokm4n 2 post(s)

I still got this problem.

After installing LAMPstack it runs fine. When I reboot and start the stack:
sudo /home/richard/Stacks/lampstack-0.9.4/ctlscript.sh start

I get the following output:
Syntax OK
/home/richard/Stacks/lampstack-0.9.4/apache2/scripts/ctl.sh : httpd stopped
/home/richard/Stacks/lampstack-0.9.4/mysql/scripts/ctl.sh : mysql not running
/home/richard/Stacks/lampstack-0.9.4/mysql/scripts/ctl.sh : mysql started at port 3306
nohup: redirecting stderr to stdout
Starting mysqld.bin daemon with databases from /home/richard/Stacks/lampstack-0.9.4/mysql/data
STOPPING server from pid file /home/richard/Stacks/lampstack-0.9.4/mysql/data/Sphynx.pid
080420 15:50:14 mysqld ended

Syntax OK
/home/richard/Stacks/lampstack-0.9.4/apache2/scripts/ctl.sh : httpd started at port 8080

I can’t find the pid file in installation/mysql/tmp nor in installation/mysql/data..

p.s. sorry cant get the code in bq =/

 
Avatar antonio Administrator 508 post(s)

Hi,

You can’t find the pid because MySQL has encountered an error and was shut down. There should be a log in mysql/data explaining the issue, can you post it here?

Cheers

 
Avatar beltran Administrator 389 post(s)

Hi,

It seems that you install BitNami LAMPStack as a non-root user. Try to start without sudo command.

 
Avatar Wokm4n 2 post(s)

Thanks a lot beltran, it works like a charm now! :)

Forums LAMPStack