I have an error after updating my packages. When trying to start my webserver, it throws the following error.
$ sudo service apache2 restart
* Restarting web server apache2 [fail]
* The apache2 configtest failed.
Output of config test was:
AH00526: Syntax error on line 84 of /etc/apache2/apache2.conf:
Invalid command 'LockFile', perhaps misspelled or defined by a module not included in the server configuration
Action 'configtest' failed.
The Apache error log may have more information.
And the Apache error log is (from file /var/log/apache2/error.log):
[Sat Aug 17 01:30:03 2013] [notice] Apache/2.2.22 (Ubuntu) PHP/5.4.17RC1 configured -- resuming normal operations
[Sat Aug 17 01:41:38 2013] [notice] caught SIGTERM, shutting down
[Sat Aug 17 03:10:11.132425 2013] [mpm_prefork:notice] [pid 4182] AH00163: Apache/2.4.6 (Ubuntu) PHP/5.5.1-2+debphp.org~raring+2 configured -- resuming normal operations
[Sat Aug 17 03:10:11.143718 2013] [core:notice] [pid 4182] AH00094: Command line: '/usr/sbin/apache2'
[Sat Aug 17 03:13:56.527245 2013] [mpm_prefork:notice] [pid 4182] AH00169: caught SIGTERM, shutting down
What things do I have to do to recover or fix my server up?
Replace in apache2.conf:
LockFile /var/lock/apache2/accept.lock
with
Mutex file:${APACHE_LOCK_DIR} default
Actually, it is better to use a semaphore. Under Unix systems it is a lot faster and uses fewer resources.
And the option is just this:
Mutex sem
Related
Apache and MySQL failed to start in XAMPP 7.1.27-1. I got the above error, below is the error log.
[Tue Dec 29 10:21:26.460495 2020] [lbmethod_heartbeat:notice] [pid 15627] AH02282: No slotmem from mod_heartmonitor
[Tue Dec 29 10:21:26.467621 2020] [mpm_prefork:notice] [pid 15627] AH00163: Apache/2.4.38 (Unix) OpenSSL/1.0.2r PHP/7.1.27 mod_perl/2.0.8-dev Perl/v5.16.3 configured -- resuming normal operations
[Tue Dec 29 10:21:26.467685 2020] [core:notice] [pid 15627] AH00094: Command line: '/Applications/XAMPP/xamppfiles/bin/httpd -E /Applications/XAMPP/xamppfiles/logs/error_log -D SSL -D PHP'
[Fri Jan 15 06:55:08.753700 2021] [mpm_prefork:notice] [pid 15627] AH00169: caught SIGTERM, shutting down
I have used the lsof -i list and kill -9 PROCESS_ID to kill all processes that run under localhost. I have also changed the apache port, but still apache and MySQL not running.
Try the following command
sudo /Applications/XAMPP/xamppfiles/bin/httpd -k start
Currently, this is my temporary solution.
1: Edit this file
sudo nano /Applications/XAMPP/xamppfiles/etc/my.cnf
2: Add this line, then save the file
innodb_force_recovery = 1
3: then start MySQL with the below code
sudo /Applications/XAMPP/bin/mysql.server start
4: comment the added line in my.cnf, then save the file
#innodb_force_recovery = 1
5: Stop the MySQL
sudo /Applications/XAMPP/bin/mysql.server stop
6: Use XAMPP Manager to start MySQL
When you restart your PC, you have to repeat these steps.
My apache server keep shutting down by itself. When I check my error logs, I can see 15 files names like this
error.log.$NUMBER$.gz
The content of every error.log file is the following :
[mpm_prefork:notice] [pid 29495] AH00163: Apache/2.4.10 (Debian) OpenSSL/1.0.1t configured -- resuming normal operations
[core:notice] [pid 29495] AH00094: Command line: '/usr/sbin/apache2'
[mpm_prefork:notice] [pid 29495] AH00171: Graceful restart requested, doing restart
I can restart apache with no problem but i know in a few days it will shutdown again...
What am i missing ?
This sounds like a normal restart due to eg. log rotation.
I have a apache2 server on RHEL 6 and in the past 3 days I have been getting an intermittent 503 response. Its just a couple in a 1000+ request. I had a look at cpu/mem/disk and all seem fine also i dont have any errors in the logs. Any idea what it could be?
Below is my error log which does not seem to be the issue due to the times being vastly different
[mpm_prefork:notice] [pid 19899] AH00170: caught SIGWINCH, shutting down gracefully
[ssl:warn] [pid 1188] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[mpm_prefork:notice] [pid 1188] AH00163: Apache/2.4.6 (Red Hat Enterprise Linux) OpenSSL/1.0.1e-fips configured -- resuming normal operations
[core:notice] [pid 1188] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
im using vesta cp i remove the keys on the settings of the domain and the apache is not working how can i make it work again
Restarting web server apache2
...fail!
The apache2 configtest failed.
Output of config test was:
apache2: Syntax error on line 83 of /etc/apache2/apache2.conf: Syntax error on line 3 of /etc/apache2/conf.d/vesta.conf: Syntax error on line 1 of /home/admin/conf/web/sapache2.conf: without matching section
Action 'configtest' failed.
The Apache error log may have more information.
Error log
[Sun Dec 04 06:43:37.530259 2016] [:notice] [pid 1881]
mod_ruid2/0.9.8 enabled
[Sun Dec 04 06:43:37.535379 2016] [ssl:warn] [pid 1881] AH02292:
Init: Name-based SSL virtual hosts only work for clients with TLS
server name indication support (RFC 4366)
[Sun Dec 04 06:43:37.535844 2016] [mpm_prefork:notice] [pid 1881]
AH00163: Apache/2.4.7 (Ubuntu) mod_fcgid/2.3.9 PHP/5.5.9-1ubuntu4.17
OpenSSL/1.0.1f configured -- resuming normal operations
[Sun Dec 04 06:43:37.535858 2016] [core:notice] [pid 1881] AH00094:
Command line: '/usr/sbin/apache2'
[Mon Dec 05 18:42:53.735381 2016] [mpm_prefork:notice] [pid 1881]
AH00169: caught SIGTERM, shutting down
Run as root this command:
v-rebuild-user admin
I have issues with the server constantly. It seems to fail every few hours and I cannot tell why.
This morning I had 503 on all of my websites, I tried to restart Apache but
# service apache2 restart
[....] Restarting web server: apache2(98)Address already in use: make_sock: could not bind to address 127.0.0.1:8080
no listening sockets available, shutting down
Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
failed!
I found out some of processes were still running. Killing them helped to restart Apache.
# grep -ri listen /etc/apache2
/etc/apache2/apache2.conf:# supposed to determine listening ports for incoming connections, and which
/etc/apache2/apache2.conf:# Include list of ports to listen on and which to use for name based vhosts
/etc/apache2/ports.conf:Listen 127.0.0.1:8080
/etc/apache2/ports.conf:#Listen 127.0.0.1:443
/etc/apache2/ports.conf:# Listen 443
/etc/apache2/ports.conf:# Listen 443
# killall -9 apache2
# service apache2 restart
[ ok ] Restarting web server: apache2.
I still have no idea how to prevent it from failing, here are some logs that I totally don't understand. Please help :)
From the time when it failed:
[Sun May 31 06:26:00 2015] [notice] FastCGI: process manager initialized (pid 9466)
[Sun May 31 06:26:00 2015] [error] python_init: Python version mismatch, expected '2.7.2+', found '2.7.3'.
[Sun May 31 06:26:00 2015] [error] python_init: Python executable found '/usr/bin/python'.
[Sun May 31 06:26:00 2015] [error] python_init: Python path being used '/usr/lib/python2.7/:/usr/lib/python2.7/plat-linux2:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload'.
[Sun May 31 06:26:00 2015] [notice] mod_python: Creating 8 session mutexes based on 1000 max processes and 0 max threads.
[Sun May 31 06:26:00 2015] [notice] mod_python: using mutex_directory /tmp
[Sun May 31 06:26:01 2015] [notice] Apache/2.2.22 (Debian) mod_fastcgi/mod_fastcgi-SNAP-0910052141 Phusion_Passenger/5.0.8 PHP/5.5.25-1~dotdeb+7.1 mod_python/3.3.1 Python/2.7.3 mod_ssl/2.2.22 OpenSSL/1.0.1e mod_wsgi/3.3 configured -- resuming normal operations
[Sun May 31 06:26:01 2015] [warn] long lost child came home! (pid 17083)
[Sun May 31 06:26:01 2015] [warn] long lost child came home! (pid 17328)
[Sun May 31 06:26:01 2015] [warn] long lost child came home! (pid 17329)
[Sun May 31 06:26:01 2015] [warn] long lost child came home! (pid 17330)
And this is logged basically constantly:
[Sun May 31 13:36:03 2015] [warn] Couldn't set uid/gid/priority, closing connection.
[Sun May 31 13:36:03 2015] [warn] (itkmpm: pid=30911 uid=1001, gid=1001) itk_post_perdir_config(): setgid(1005): Operation not permitted
[Sun May 31 13:36:03 2015] [warn] Couldn't set uid/gid/priority, closing connection.
[Sun May 31 13:36:03 2015] [warn] (itkmpm: pid=30897 uid=1001, gid=1001) itk_post_perdir_config(): setgid(1005): Operation not permitted
[Sun May 31 13:36:03 2015] [warn] Couldn't set uid/gid/priority, closing connection.
[Sun May 31 13:36:04 2015] [warn] (itkmpm: pid=30930 uid=1001, gid=1001) itk_post_perdir_config(): setgid(33): Operation not permitted
[Sun May 31 13:36:04 2015] [warn] Couldn't set uid/gid/priority, closing connection.
[Sun May 31 13:36:06 2015] [warn] (itkmpm: pid=30938 uid=1001, gid=1001) itk_post_perdir_config(): setgid(33): Operation not permitted