Apache, Mysql Automatically Start After Reboot Under CentOS
Jul 8, 2007
I have one bare server and installed everything myself. however, I found apache, mysqld can not automatically start after reboot, may I know how to enable them to automatically start after reboot?
So Everything was going great! Until I needed to reboot, and then after that only Plesk panel worked not my IP or any domains setup with it.
BUT when I restart Nginx it all starts working again! (Had to /usr/local/psa/admin/bin/httpdmng --reconfigure-all to get the domains to go to the right directory though)
But now everytime I reboot the server Nginx has to be restarted
Can anyone recommend a Apached and MYSQL optimization expert? I just some optimization done on mysql and apache upgraded... but pache wouldn't restart with the following entries:
if i remove above then it starts... but my CPU spikes and I am getting a ton of errors emailed to me:
Invalid SQL: SELECT COUNT(DISTINCT(userid)) AS count FROM vb_session WHERE vb_session.userid>0 AND vb_session.lastactivity>1245294346;
MySQL Error : Out of memory (Needed 8388580 bytes) Error Number : 5 Request Date : Wednesday, June 17th 2009 @ 09:39:06 PM Error Date : Wednesday, June 17th 2009 @ 09:39:06 PM
Its constantly complaining about this same query and i thought i removed all of the vbulletin options...
i am pulling my hair out... cuz my server isn't swapping, ther are 0ver 8GBs in cache.... but my CPU goes up
Here is original problem thread...
[url]
2nd post has recommended config... and my subsequent probs
Anyone know a good script that I can run with cron or something? Mysql seems to be the #1 problem with a lot of my web sites, a restart usually fixes it right away for me, but I can't keep restarting my servers everyday manually.
We are facing apache problem on one of our server.
It is getting restarted automatically within 30 seconds.
Below are the logs.
Please let us know the solution if any asap.
================================================= Feb 14 04:57:00 server monit[5113]: 'apache' failed, cannot open a connection to INET[127.0.0.1:80] via TCP Feb 14 04:57:00 server monit[5113]: 'apache' trying to restart Feb 14 04:57:00 server monit[5113]: 'apache' stop: /etc/init.d/httpd Feb 14 04:57:01 server monit[5113]: 'apache' start: /etc/init.d/httpd ==================================================
Apache Version: 2.2.29 OS Version: Windows 2012 R2 64 bit OS
Restart of apache is happening continuously .... below is snippet of the same.....
Fri Jan 16 11:22:53 2015] [notice] Parent: child process exited with status 3221225477 -- Restarting. [Fri Jan 16 11:22:53 2015] [notice] Apache/2.2.29 (Win32) configured -- resuming normal operations [Fri Jan 16 11:22:53 2015] [notice] Server built: Sep 10 2014 11:38:25 [Fri Jan 16 11:22:53 2015] [notice] Parent: Created child process 11440 [Fri Jan 16 11:22:53 2015] [notice] Child 11440: Child process is running [Fri Jan 16 11:22:53 2015] [notice] Oracle WebLogic plugin build date/time: Feb 9 2011 11:49:26. Change Number: 1386101 [Fri Jan 16 11:22:53 2015] [notice] Child 11440: Acquired the start mutex. [Fri Jan 16 11:22:53 2015] [notice] Child 11440: Starting 64 worker threads. [Fri Jan 16 11:22:53 2015] [notice] Child 11440: Starting thread to listen on port 80. [Fri Jan 16 11:22:53 2015] [notice] Child 11440: Starting thread to listen on port 80. [Fri Jan 16 11:22:54 2015] [notice] Parent: child process exited with status 3221225477 -- Restarting. [Fri Jan 16 11:22:54 2015] [notice] Apache/2.2.29 (Win32) configured -- resuming normal operations
tdot:/# /etc/init.d/mysql start Starting MySQL database server: mysqld.
. . . . ...failed or took more than 6s. Please take a look at the syslog. /usr/bin/mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)' Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists! tdot:/#
/usr/bin/mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)' Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists! mysql has failed, please contact the sysadmin (result was "Warning, no valid mysql.sock file found.mysql has failed").
have googled this to death. solutions are not working.
so far have tried the whole linking mysql.sock to the file in /tmp, changing mysql root password, rebooting, adding socket parameters in my.cnf. nothing works!
Stopping web server: Apache2. www:/# /var/wkscript/tools/panel_manager start LayeredPanel related software starting.Starting system log daemon: syslogd. Starting periodic command scheduler: cron. Starting mail transport agent: Postfix. Starting MySQL database server: mysqld. . . . . . . . . . . . . . ...failed or took more than 6s. Please take a look at the syslog. /usr/bin/mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)' Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists! Starting domain name service: named. Starting ftp server: Running: /usr/sbin/pure-ftpd-mysql -l mysql:/etc/pure-ftpd/db/mysql.conf -l pam -E -O clf:/var/log/pure-ftpd/transfer.log -S 75.126.177.244,21 -u 1000 -B Starting web server: Apache2. Starting web server: Apache2.
If you visit the site, the main page gives this error: Fatal error: Failed to connect to the DB server in /var/wkscript/db.php on line 28
What command could I use to see all the currently running services on my Windows (vista) computer?
I'm trying to start my MySQL server, but it won't start. I think I know what the problem is though I'm not sure. I think that the service name "MySQL" is already running...and I need to remove it or something.
Btw...my apache and php is fine. Though...I cannot use my MySQL from php obviously...since it's not running.
i have made my all pages with .html extension and hence my SEO is based on accordingly. Now i made some changes to htaccess that causes to not inclusion of header and footer pages (both are made with .php extension ). so i decided to change the extension of pages (.html to .php) and it wokrs. due to SEO and large number of pages i want all my pages .php (made later). to get converted automatically with .html in browser. so is it possible using .htaccess rewrite.
I have a cheap managed server and support is of little help BUT they will do what I tell them, where should I tell them to start to fix high mysql load?
The server currently has a large IPB forum, a large 4images gallery, and a couple popular Wordpress blogs, and this combo keeps taking mysql down.
What can I do server side to help this? And what shouldn't I do?
I have test server with > VMware CentOS + Plesk 12...And after reboot, plesk "localhost.localdomain" show me "Apache 2 default page"I do this > service httpd restart, and after all ok. (Show Plesk Default page) no apache page.I want normaly reboot server and show "Plesk default page" no apache...
I just installed mySQL server on a brand new dedicated server and am getting Timeout error occurred trying to start MySQL Daemon. I have uninstalled and reinstalled it a few times and am still getting the same error.
I am getting the error (as listed in the title) on my server. This is a BRAND NEW FRESH install on a brand new server...
OS: Unix Fedora Kernel Version: Kernel 2.6.18-1/2798.fc6 on an i686 Hardware Information: Brand new Dell SC1435 Server Software Version: MySQl 5 Control Panel: Nothing yet
Apache starts ok but when I go to strart MySQL I get the following error...
[root@server112]# /etc/rc.d/init.d/mysqld start Timeout error occurred trying to start MySQL Daemon Starting MySQL: [FAILED]
Does anyone have any ideas? I did some pretty extensive searching... Web Hosting Talk article that basically describes the same error. I followed everything as listed in his suggestion and it didn't change anything.
I spent all my afternoon on this but I couldn't managed to solve this problem out. Hope someone knows the solution for this one.
I've chrooted Apache and now it won't start. I try to run it with chroot /chroot/httpd httpd and it doesn't start but instead enters a single error in a error log. Something about permission being denied and apr_proc_detach constant. The best part is that I managed to run it flawlessly on an another server, but on this one it won't start. If I start it with -X parameter then it runs fine. Has anyone came across this error before? What libraries I should put in chroot environment to avoid the apr_proc_detach permission denied error?
On another computer it runs without problems, so I believe it's problem me not including all the necessary libraries in the environment (I included everything on the ldd /usr/sbin/httpd list).
Attempting to restart httpd [url] Waiting for httpd to restart.... . . . . . . . . . . finished.
httpd status root 24470 1.0 2.3 23356 21692 ? S 20:25 0:00 /usr/local/cpanel/whostmgr/bin/whostmgr ./reshttpd
httpd has failed, please contact the sysadmin.
and : root@part5 [/usr/local/cpanel/apache]# httpd configtest Failed loading 1: 1: cannot open shared object file: No such file or directory PHP Warning: PHP Startup: Unable to load dynamic library './' - ./: cannot read file data: Is a directory in Unknown on line 0 Warning: DocumentRoot [/home/hhhhha/public_html/hostmanager] does not exist httpd: bad user name hhhhha