Error starting Apache 2.4.6 on OpenSuse 13.1 - linux

When I try to start the apache this happens:
Job for apache2.service failed. See ‘systemctl status apache2.service’ and ‘journalctl -xn’ for details.
system.ctl status apache2.service -l returns me this:
Mar 24 23:41:57 glauber-pc.site start_apache2[3249]: httpd2-prefork: Syntax error on line 179 of /etc/apache2/httpd.conf: Syntax error on line 102 of /etc/apache2/default-server.conf: Syntax error on line 1 of /etc/apache2/conf.d/mod_evasive.conf: Cannot load /usr/lib64/apache2/mod_evasive20.so into server: /usr/lib64/apache2/mod_evasive20.so: cannot open shared object file: No such file or directory
Mar 24 23:41:57 glauber-pc.site systemd[1]: apache2.service: main process exited, code=exited, status=1/FAILURE
Mar 24 23:41:57 glauber-pc.site systemd[1]: Failed to start The Apache Webserver.
Mar 24 23:41:57 glauber-pc.site systemd[1]: Unit apache2.service entered failed state.
Everything seems right in those lines, any clue what it can be?

Change the first line in
/etc/apache2/conf.d/mod_evasive.conf
to
LoadModule evasive20_module /usr/lib64/apache2/mod_evasive24.so
(...24.so instead of ...20.so)

Related

Apache LockFile issue

I am trying to migrate from Apache 2.2 on Debian 7 to Apache 2.4 on CentOS 7.
when httpd starts, it fails to start as below.
root# journalctl -xe
Jun 23 14:26:04 ww-test httpd[17716]: AH00526: Syntax error on line 47 of /etc/httpd/conf/httpd.conf:
Jun 23 14:26:04 ww-test httpd[17716]: Invalid command 'LockFile', perhaps misspelled or defined by a module not included in the server configuration
Jun 23 14:26:04 ww-test systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Jun 23 14:26:04 ww-test kill[17718]: kill: cannot find process ""
Jun 23 14:26:04 ww-test systemd[1]: httpd.service: control process exited, code=exited status=1
Jun 23 14:26:04 ww-test systemd[1]: Failed to start The Apache HTTP Server.
vi httpd.conf
45 # The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
46 #
47 LockFile ${APACHE_LOCK_DIR}/accept.lock
48
I installed the related package as below although I am not sure if it is the right one.
============================================================================================================================================================================================
Package Arch Version Repository Size
============================================================================================================================================================================================
Installing:
lockfile-progs x86_64 0.1.15-7.el7 /lockfile-progs-0.1.15-7.el7.x86_64 50 k
Installing for dependencies:
liblockfile x86_64 1.08-17.el7 base 21 k
Transaction Summary
Thanks for reading it.
Replace this line:
LockFile ${APACHE_LOCK_DIR}/accept.lock
To:
Mutex file:/var/httpd/locks default
Directives AcceptMutex, LockFile, RewriteLock, SSLMutex, SSLStaplingMutex, and WatchdogMutexPath have been replaced with a single Mutex directive. You will need to evaluate any use of these removed directives in your 2.2 configuration to determine if they can just be deleted or will need to be replaced using Mutex

Installing Apache/2.4.37 on centos getting Error

I have been trying to install Apache/2.4.37 webserver on centos 8 machine and keep getting the following error
Job for httpd.service failed because the control process exited with error code.
See "systemctl status httpd.service" and "journalctl -xe" for details.
[root#localhost draj]# systemctl status httpd.service
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Drop-In: /usr/lib/systemd/system/httpd.service.d
└─php-fpm.conf
Active: failed (Result: exit-code) since Mon 2020-04-13 17:07:09 +0545; 4min 10s ago
Docs: man:httpd.service(8)
Process: 14004 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 14004 (code=exited, status=1/FAILURE)
Status: "Reading configuration..."
Apr 13 17:07:09 localhost.localdomain systemd[1]: Starting The Apache HTTP Server...
Apr 13 17:07:09 localhost.localdomain httpd[14004]: AH00526: Syntax error on line 122 of /etc/httpd/conf/httpd.conf:
Apr 13 17:07:09 localhost.localdomain httpd[14004]: DocumentRoot '/var/www/html' is not a directory, or is not readable
Apr 13 17:07:09 localhost.localdomain systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE
Apr 13 17:07:09 localhost.localdomain systemd[1]: httpd.service: Failed with result 'exit-code'.
Apr 13 17:07:09 localhost.localdomain systemd[1]: Failed to start The Apache HTTP Server.
Could somebody kindly shed some light on how to fix this problem, thanks !!

Apache/HTTPD service not working

I am trying to start my Apache/HTTPD on my CentOS 7.3-1611 dedicated server.
When I start the service, I'am receiving the following error code:
[root#ns3033129 ~]# service httpd start
Redirecting to /bin/systemctl start httpd.service
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
[root#ns3033129 ~]# systemctl status httpd.service
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2017-06-27 23:14:39 CEST; 9s ago
Process: 18137 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Process: 18134 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 18134 (code=exited, status=1/FAILURE)
Jun 27 23:14:39 ns3033129.ip-149-202-89.eu systemd[1]: Starting The Apache HTTP Server...
Jun 27 23:14:39 ns3033129.ip-149-202-89.eu httpd[18134]: [Tue Jun 27 23:14:39.351580 2017] [so:warn] [pid 18134] AH01574: module ruid2_module is already loaded, skipping
Jun 27 23:14:39 ns3033129.ip-149-202-89.eu httpd[18134]: httpd: Syntax error on line 58 of /etc/httpd/conf/httpd.conf: Syntax error on line 2 of /etc/httpd/conf.d/vesta.conf: Could not open configuration file /home/admi...le or directory
Jun 27 23:14:39 ns3033129.ip-149-202-89.eu systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Jun 27 23:14:39 ns3033129.ip-149-202-89.eu kill[18137]: kill: cannot find process ""
Jun 27 23:14:39 ns3033129.ip-149-202-89.eu systemd[1]: httpd.service: control process exited, code=exited status=1
Jun 27 23:14:39 ns3033129.ip-149-202-89.eu systemd[1]: Failed to start The Apache HTTP Server.
Jun 27 23:14:39 ns3033129.ip-149-202-89.eu systemd[1]: Unit httpd.service entered failed state.
Jun 27 23:14:39 ns3033129.ip-149-202-89.eu systemd[1]: httpd.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
The output of systemctl status httpd clearly said that it is configuration error in your vesta.conf.
Jun 27 23:14:39 ns3033129.ip-149-202-89.eu httpd[18134]: httpd: Syntax error on line 58 of /etc/httpd/conf/httpd.conf: Syntax error on line 2 of /etc/httpd/conf.d/vesta.conf: Could not open configuration file /home/admi...le or directory
Run "httpd -t" to check your httpd configuration before starting the httpd server.

Bug: Varnish 4 install on CentOS 7 (systemctl)

Installed Varnish from yum; but immediate error when initiating via systemctl.
Jul 28 14:11:54 localhost.localdomain varnishd[6546]: .init_func = VGC_function_vcl_init,
Jul 28 14:11:54 localhost.localdomain varnishd[6546]: .fini_func = VGC_function_vcl_fini,
Jul 28 14:11:54 localhost.localdomain varnishd[6546]: };
Jul 28 14:11:54 localhost.localdomain varnishd[6557]: Assert error in main(), mgt/mgt_main.c line 686:
Jul 28 14:11:54 localhost.localdomain varnishd[6557]: Condition((daemon(1,0)) == 0) not true.
Jul 28 14:11:54 localhost.localdomain varnishd[6557]: errno = 19 (No such device)
Jul 28 14:11:54 localhost.localdomain systemd[1]: Failed to read PID from file /var/run/varnish.pid: Invalid argument
Jul 28 14:11:54 localhost.localdomain systemd[1]: varnish.service never wrote its PID file. Failing.
Jul 28 14:11:54 localhost.localdomain systemd[1]: Failed to start Varnish a high-perfomance HTTP accelerator.
Jul 28 14:11:54 localhost.localdomain systemd[1]: Unit varnish.service entered failed state.
SELinux is disabled; package was installed via root. This is a fresh install.
Looks like you need to reboot. ;)
The message:
Failed to read PID from file /var/run/varnish.pid Invalid argument
is non-critical. It is just systemd trying to read the pidfile too early. You can poll status with:
systemctl status varnish
If its "Main PID" entry is matching the contents of /var/run/varnish.pid(and if varnishd is started via systemd, it always does), you can ignore that message. This is fixed in later versions of systemd.

Can not start keystone service

I installed packstack on my fresh installation of Fedora 21 with all updates. When I run
packstack --allinone I received this error:
ERROR : Error appeared during Puppet run: 192.168. 1.*_keystone.pp Error:
Could not start Service[keystone]: Execution of '/sbin/service openstack-keystone
start'` returned 1: Redirecting to /bin/systemctl start openstack-keystone.service
You will find full trace in log /var/tmp/packstack/20141223-022613-whLvTs/manifests
/192.168.1.*_keystone.pp.log
And this is the log:
Notice: /Stage[main]/Cinder::Keystone::Auth/Keystone_user_role[cinder#services]:
Dependency Service[keystone] has failures: true
Warning: /Stage[main]/Cinder::Keystone::Auth/Keystone_user_role[cinder#services]:
Skipping because of failed dependencies
Notice: Finished catalog run in 13.02 seconds
With systemctl status openstack-keystone.service get this:
openstack-keystone.service - OpenStack Identity Service (code-named Keystone)
Loaded: loaded (/usr/lib/systemd/system/openstack-keystone.service; disabled)
Active: failed (Result: start-limit) since Tue 2014-12-23 19:47:36 EET; 1min 59s ago
Process: 22526 ExecStart=/usr/bin/keystone-all (code=exited, status=1/FAILURE)
Main PID: 22526 (code=exited, status=1/FAILURE)
Dec 23 19:47:35 localhost.localdomain systemd[1]: Failed to start OpenStack...
Dec 23 19:47:35 localhost.localdomain systemd[1]: Unit openstack-keystone.s...
Dec 23 19:47:35 localhost.localdomain systemd[1]: openstack-keystone.servic...
Dec 23 19:47:36 localhost.localdomain systemd[1]: start request repeated to...
Dec 23 19:47:36 localhost.localdomain systemd[1]: Failed to start OpenStack...
Dec 23 19:47:36 localhost.localdomain systemd[1]: Unit openstack-keystone.s...
Dec 23 19:47:36 localhost.localdomain systemd[1]: openstack-keystone.servic...
This can happen due SELinux avc denial because of a missing policy.
You can try to put SELinux to permissive mode:
# setenforce 0
A similar bug

Resources