Ive had this problem numerous times (website failed to connect error) before and the web management team tell me that apache2 needs to be restarted, seeing as they are not replying to my emails im gona try and do it myself.
Im having trouble restarting apache. I have a program which executes command lines and it runs as a system service (on windows). when i tell it to restart it loads apache up (i see another httpd.exe appear in task manager) but it doesnt restart it. the command line i used is "httpd.exe -k restart" i have added an environment variable but i have also tried the full path to the exe and still no luck.
If i run the exact same line from a batch file as local admin then it works fine. I also tried getting my program to run that batch file but again it didnt work.
Is there a reason why this would happen? Can only Admin restart it and not SYSTEM? Is there another command i should be using?
I have installed CSF on a VPS with WHM and when i try to restart i get this:
Code: Restarting csf...
Flushing chain `INPUT'Flushing chain `FORWARD'Flushing chain `OUTPUT'Flushing chain `acctboth'Deleting chain `acctboth'Restarting bandmin acctboth chains for cPanelDROP tcp opt -- in * out * 0.0.0.0/0 -> 0.0.0.0/0 tcp dpt:67 DROP udp opt -- in * out * 0.0.0.0/0 -> 0.0.0.0/0 udp dpt:67 DROP tcp opt -- in * out * 0.0.0.0/0 -> 0.0.0.0/0 tcp dpt:68 DROP udp opt -- in * out * 0.0.0.0/0 -> 0.0.0.0/0 udp dpt:68 DROP tcp opt -- in * out * 0.0.0.0/0 -> 0.0.0.0/0 tcp dpt:111 DROP udp opt -- in * out * 0.0.0.0/0 -> 0.0.0.0/0 udp dpt:111 DROP tcp opt -- in * out * 0.0.0.0/0 -> 0.0.0.0/0 tcp dpt:113 DROP udp opt -- in * out * 0.0.0.0/0 -> 0.0.0.0/0 udp dpt:113 DROP tcp opt -- in * out * 0.0.0.0/0 -> 0.0.0.0/0 tcp dpts:135:139 DROP udp opt -- in * out * 0.0.0.0/0 -> 0.0.0.0/0 udp dpts:135:139 DROP tcp opt -- in * out * 0.0.0.0/0 -> 0.0.0.0/0 tcp dpt:445 DROP udp opt -- in * out * 0.0.0.0/0 -> 0.0.0.0/0 udp dpt:445 DROP tcp opt -- in * out * 0.0.0.0/0 -> 0.0.0.0/0 tcp dpt:513 DROP udp opt -- in * out * 0.0.0.0/0 -> 0.0.0.0/0 udp dpt:513 DROP tcp opt -- in * out * 0.0.0.0/0 -> 0.0.0.0/0 tcp dpt:520 DROP udp opt -- in * out * 0.0.0.0/0 -> 0.0.0.0/0 udp dpt:520 iptables: Unknown error 4294967295LOG tcp opt -- in * out * 0.0.0.0/0 -> 0.0.0.0/0 limit: avg 30/min burst 5 LOG flags 0 level 4 prefix `Firewall: *TCP_IN Blocked* ' Error: iptables command [/sbin/iptables -v -A LOGDROPIN -p tcp -m limit --limit 30/m --limit-burst 5 -j LOG --log-prefix 'Firewall: *TCP_IN Blocked* '] failed, at line 280 ...Done. Restarting lfd...
Stopping lfd:[ OK ][ OK ]Starting lfd:Error: You have an unresolved error when starting csf. You need to restart csf successfully before starting lfd[ OK ] ...Done.
dont know where is the error on the iptables, i didn't change any config on iptables.How can I config iptables for CSF?
I resolved this problem earlier by re-installing both php and apache and configuring them all over again.But when i restart my pc ,i get the same error....
We've been thinking about writing our own hosting control panel for our own "tight" hosting setup, so that can alter the panel just to our needs without relying on updates from anybody else.
To read new configurations in Lighttpd or Apache, as far as I know, requires the software to be restarted (for example service apache restart). Are there any negative effects of this, I'm assuming that whilst being restarted there is a small amount of time during which the software is "down" and websites can't be accessed during that period (probably <1 second). Am I correct?
What is the best way to reload configurations into these http servers without service interruption? I notice that DirectAdmin seems to just restart Apache on any function that alters the configuration file - for example adding a new user.
I thought everything was fine after setting up my new VPS with WHM/cPanel - however it turns out I was very, very wrong. I was trying to work out why email wasn't able to send or receive - so I tried to restart the mail service from WHM. This is where the problems started.
I tried to restart different services (all of them) some worked fine - some failed (the ones which are in red below are the ones which failed). The results are below. If anyone has any information or wouldn't mind helping me to resolve this I would appreciate it.
DNS Server (BIND/NSD): Waiting for named to restart..............finished.
named (/usr/sbin/named -u named) running as named with PID 25824
named started ok
-------------------------------------------------------------- FTP Server (ProFTPd/PureFTPd): Waiting for ftpserver to restart..............finished.
pure-authd (/usr/sbin/pure-authd -s /var/run/ftpd.sock -r /usr/sbin/pureauth) running as root with PID 30596
ftpserver started ok
-------------------------------------------------------------- HTTP Server (Apache): Waiting for httpd to restart..............finished.
httpd (/usr/local/cpanel/whostmgr/bin/whostmgr ./reshttpd) running as root with PID 3145 httpd (/usr/local/apache/bin/httpd -k start -DSSL) running as root with PID 3171 httpd (/usr/local/apache/bin/httpd -k start -DSSL) running as root with PID 3177
httpd started ok -------------------------------------------------------------- IMAP Server (Courier/Dovecot): Waiting for imap to restart..............finished.
authdaemond (/usr/sbin/courierlogger -pid=/var/spool/authdaemon/pid -facility=mail -start /usr/libexec/courier-authlib/authdaemond) running as root with PID 7668 authdaemond (/usr/libexec/courier-authlib/authdaemond) running as root with PID 7669 authdaemond (/usr/libexec/courier-authlib/authdaemond) running as root with PID 7670 authdaemond (/usr/libexec/courier-authlib/authdaemond) running as root with PID 7671
imap has failed, please contact the sysadmin (result was "couriertcpd is not running"). -------------------------------------------------------------- Mail Server (Exim): Waiting for exim to restart..............finished.
exim: [ != 220] exim has failed, please contact the sysadmin. -------------------------------------------------------------- POP3 Server (cPPOP): Waiting for cppop to restart..............finished.
authdaemond (/usr/sbin/courierlogger -pid=/var/spool/authdaemon/pid -facility=mail -start /usr/libexec/courier-authlib/authdaemond) running as root with PID 11869 authdaemond (/usr/libexec/courier-authlib/authdaemond) running as root with PID 11870 authdaemond (/usr/libexec/courier-authlib/authdaemond) running as root with PID 11871 authdaemond (/usr/libexec/courier-authlib/authdaemond) running as root with PID 11872
cppop started ok -------------------------------------------------------------- SQL Server (MySQL): Waiting for mysql to restart..............finished.
mysqld_safe (/bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/server.rawpromo.com.pid) running as root with PID 15401 mysqld (/usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/server.rawpromo.com.pid --skip-external-locking) running as mysql with PID 15435
mysql has failed, please contact the sysadmin (result was "mysql has failed"). -------------------------------------------------------------- SSH Server (OpenSSH): Waiting for sshd to restart..............finished.
sshd (/usr/local/cpanel/whostmgr/bin/whostmgr ./ressshd) running as root with PID 19921 sshd (/usr/sbin/sshd) running as root with PID 19949
sshd started ok --------------------------------------------------------------
Installing mod_evasive after serveral attacks on our server.
but when restarting httpd I get this error,
httpd: Syntax error on line 36 of /usr/local/apache/conf/httpd.conf: API module structure 'evasive20_module' in file /usr/lib/httpd/modules/mod_evasive20.so is garbled - expected signature 41503232 but saw 41503230 - perhaps this is not an Apache module DSO, or was compiled for a different Apache version?
way to restart mysql and named if they drop. I'm on cpanel.
I've searched and found the following:
For mysql:
Code: NUMBER=`ps --no-heading --user mysql | wc -l`; [ $NUMBER -eq 0 ] && service mysql restart; For named:
Code: NUMBER=`ps --no-heading --user named | wc -l`; [ $NUMBER -eq 0 ] && service named restart; I have these set to run every 5 minutes, just to check if mysql/named are running. I found out that it doesn't work: I woke up to a whole bunch of sql errors and realized that mysql dropped while I was asleep... I type in "service mysql restart" manually and it restarts as usual, so I know that the command to restart sql works fine, but the restarts aren't triggering in the first place.
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
yesterday i setup my first vps system and now its hosting 2 forums of my. Thing is in evry 10 mints Mysql & courier-imap are restarting..? I know this from the lxadmin alert email. So is it normal or is it a problem in my configuration..? Im running cent os 5 now. And i also check the log.. there is entry like below in it..
Oct 6 13:43:07 vps_10013 pure-ftpd: (?@127.0.0.1) [INFO] Logout. Oct 6 13:43:07 vps_10013 xinetd[8020]: EXIT: ftp status=255 pid=21638 duration=0(sec) Oct 6 13:43:13 vps_10013 xinetd[8020]: EXIT: smtp status=1 pid=21637 duration=6(sec) Oct 6 13:43:48 vps_10013 xinetd[8020]: START: smtp pid=21679 from=63.247.94.194 Oct 6 13:43:49 vps_10013 xinetd[8020]: EXIT: smtp status=1 pid=21679 duration=1(sec) Oct 6 13:44:48 vps_10013 xinetd[8020]: START: smtp pid=21901 from=63.247.94.194 Oct 6 13:44:49 vps_10013 xinetd[8020]: EXIT: smtp status=1 pid=21901 duration=1(sec) Oct 6 13:45:49 vps_10013 xinetd[8020]: START: smtp pid=22163 from=63.247.94.194 Oct 6 13:45:50 vps_10013 xinetd[8020]: EXIT: smtp status=1 pid=22163 duration=1(sec) Oct 6 13:46:49 vps_10013 xinetd[8020]: START: smtp pid=22499 from=63.247.94.194 Oct 6 13:46:50 vps_10013 xinetd[8020]: EXIT: smtp status=1 pid=22499 duration=1(sec) Oct 6 13:47:49 vps_10013 xinetd[8020]: START: smtp pid=23668 from=63.247.94.194 Oct 6 13:47:50 vps_10013 xinetd[8020]: EXIT: smtp status=1 pid=23668 duration=1(sec) Oct 6 13:48:49 vps_10013 xinetd[8020]: START: smtp pid=23920 from=63.247.94.194 Oct 6 13:48:52 vps_10013 xinetd[8020]: EXIT: smtp status=1 pid=23920 duration=3(sec) Oct 6 13:49:49 vps_10013 xinetd[8020]: START: smtp pid=24173 from=63.247.94.194 Oct 6 13:49:53 vps_10013 xinetd[8020]: EXIT: smtp status=1 pid=24173 duration=4(sec) Oct 6 13:50:49 vps_10013 xinetd[8020]: START: smtp pid=26117 from=63.247.94.194 Oct 6 13:50:53 vps_10013 xinetd[8020]: EXIT: smtp status=1 pid=26117 duration=4(sec)
For a while now I've noticed that on Plesk 12 the sw-cp-server init scripts can never restart the sw-cp-server properly. I have to manually kill the master process then restart it:
Code:
# /etc/init.d/sw-cp-server restart Stopping sw-cp-serverd: [FAILED] Starting sw-cp-serverd: nginx: [emerg] bind() to 0.0.0.0:6308 failed (98: Address already in use) nginx: [emerg] bind() to 0.0.0.0:8443 failed (98: Address already in use) nginx: [emerg] bind() to 0.0.0.0:8880 failed (98: Address already in use)
I have a Plesk 12.0.18 (Update #22) running on CentOS 6.6 (Final) and I have a very irritating issue with nginx.
Anytime a customer creates a domain and/or subdomain everything is registered and going wel except that nginx is not restarted/reloaded to reflect the changes and I have to restart nginx manually.
I cannot find anything that causes this, no obvious errors in the logs and or errors in the UI.
Usually our website traffic is about 50 MB/day in our dedicated server. From these past 2 days it's consuming 5 GB/day and Apache2 opens so many processes/connections that our router can't handle and turns our WAN/LAN extremely SLOW!
If the reboot the server, it calms down but soon the apache2 starts again to open the connection (+1000).
I have a problem. When MSN Search robot looks through my VPS, the machine is going "asleep", e.g. Apache2 (Port 80) doesn't answer at all. Here is the last falling:
Code: 23:14:15 up 4 days, 9:06, 5 users, load average: 37.18, 31.25, 27.46 I hardly ever can enter 'pkill apache2' to kill Apache2 processes. Here is my Apache2 configuration (timeouts, prefork, e.g.):
Code: Timeout 30 KeepAlive On MaxKeepAliveRequests 20 KeepAliveTimeout 5
I just wondered if anyone can help me out with an Apache problem. I currently run Debian 3.1 (on 10 GB space and 256 MB of RAM) with Apache 2.0.59 installed through apt-get.
Apache runs with 10 child processes running simultaneously to handle multiple requests at once. I have set up Apache to use virtual hosts for every single account since they are hosted on their own domains/subdomains.
I put in a crontab to restart Apache every 15 minutes. The reason being is because after a while, Apache will start lagging to display web pages. When it's restarted, it works just fine and fast. After roughly 10 minutes now, it will take roughly a minute for the request to finally send the data back to the browser. It's not the web page that causes it, it's Apache or some factor effecting it's performance.
Does anyone know what the cause may be or how to fix it? Personally, I think it might be a memory issue.
But when i tried to start apache i got an error message saying that libphp5.so is corrupted or something.. (garbled - perhaps this is not an Apache module DSO?)
Now i just want to retore php4 working as it was !
i did apt-get remove php5 libapache2-mod-php5 php5-gd php5-mysql and apt-get install php4 libapache2-mod-php4 php4-gd php4-mysql
but i can't find the php4.conf and php4.load on the /modules-enabled or /modules-available
tried to write those files manualy as php4.so exists with other libs.
apache does not load php
Quote:
host:/etc/init.d# apt-get install php4 php4-mysql php4-cli libapache2-mod-php4 Lecture des listes de paquets... Fait Construction de l'arbre des dépendances... Fait Paquets suggérés : php-pear php4-pear Les NOUVEAUX paquets suivants seront installés : libapache2-mod-php4 php4 php4-cli php4-mysql 0 mis à jour, 4 nouvellement installés, 0 à enlever et 275 non mis à jour. Il est nécessaire de prendre 0o/3258ko dans les archives. Après dépaquetage, 6517ko d'espace disque supplémentaires seront utilisés. Sélection du paquet libapache2-mod-php4 précédemment désélectionné. (Lecture de la base de données... 35624 fichiers et répertoires déjà installés.) Dépaquetage de libapache2-mod-php4 (à partir de .../libapache2-mod-php4_6%3a4.4.7-0.dotdeb.0_i386.deb) ... Sélection du paquet php4 précédemment désélectionné. Dépaquetage de php4 (à partir de .../php4_6%3a4.4.7-0.dotdeb.0_all.deb) ... Sélection du paquet php4-cli précédemment désélectionné. Dépaquetage de php4-cli (à partir de .../php4-cli_6%3a4.4.7-0.dotdeb.0_i386.deb) ... Sélection du paquet php4-mysql précédemment désélectionné. Dépaquetage de php4-mysql (à partir de .../php4-mysql_6%3a4.4.7-0.dotdeb.0_i386.deb) ... Paramétrage de libapache2-mod-php4 (4.4.7-0.dotdeb.0) ...
Paramétrage de php4 (4.4.7-0.dotdeb.0) ...
Paramétrage de php4-cli (4.4.7-0.dotdeb.0) ...
Paramétrage de php4-mysql (4.4.7-0.dotdeb.0) ...
host:/etc/init.d# /etc/init.d/apache2 force-reload Forcing reload of web server (apache2)...apache2: Syntax error on line 116 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/php4.load: API module structure `php4_module' in file /usr/lib/apache2/modules/libphp4.so is garbled - perhaps this is not an Apache module DSO?
I'm running Apache 2.0.54 on my server and just recently Apache has been giving me problems that I haven't been able to fix permanently. In my error log, Apache marks down "[error] (88)Socket operation on non-socket: apr_accept: (client socket)" roughly 3 to 4 times a second and then turns off. In SSH, I send a restart command and it tells me it's still running but then it says when I restart it again that it wasn't running.
My main concern is fixing Apache from showing this error and from crashing so much. I did some research and through inconclusive evidence, it seems like a crontab error (ironically Apache doesn't use any cron jobs I can see).
got the VirtualHost entries for Appache, so each Domain points to a folder.
The (Windows-)DNS runs on the server, means i have to create a new DNS Reverse-Lookup and Folder for each Domain seperatly, but this workflow appears to be pretty stupid..
Now my question:
Anyone can tell me how to setup somwhat a "Wildcard / Catchall DNS", and also "Catchall VirtualHost", so each Domain is automatically pointed to the right folder? Any scripts needed for that?