HTTPD service is not starting

Issues related to applications and software problems
nageshgsn
Posts: 4
Joined: 2017/12/12 09:08:46

HTTPD service is not starting

Postby nageshgsn » 2017/12/12 09:18:38

Hi,

Apache service not started after installed the OCS Inventory in Centos7, Please help for me to make it working.


[root@blr ~]# service httpd status
Redirecting to /bin/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-12-12 18:42:08 IST; 5h 17min left
Docs: man:httpd(8)
man:apachectl(8)
Process: 1741 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Process: 1276 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 1276 (code=exited, status=1/FAILURE)

Dec 12 18:42:06 blrasset.com systemd[1]: Starting The Apache HTTP Server...
Dec 12 18:42:08 blrasset.com systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Dec 12 18:42:08 blrasset.com kill[1741]: kill: cannot find process ""
Dec 12 18:42:08 blrasset.com systemd[1]: httpd.service: control process exited, code=exited status=1
Dec 12 18:42:08 blrasset.com systemd[1]: Failed to start The Apache HTTP Server.
Dec 12 18:42:08 blrasset.com systemd[1]: Unit httpd.service entered failed state.
Dec 12 18:42:08 blrasset.com systemd[1]: httpd.service failed.



-- Unit httpd.service has failed.
--
-- The result is failed.
Dec 12 14:30:19 blrasset.com systemd[1]: Unit httpd.service entered failed state.
Dec 12 14:30:19 blrasset.com systemd[1]: httpd.service failed.
Dec 12 14:30:19 blrasset.com polkitd[887]: Unregistered Authentication Agent for unix-process:2165:481885 (system bus name :1.68, object path /org/freedesktop/PolicyKit1/Authent
Dec 12 14:40:01 blrasset.com systemd[1]: Started Session 17 of user root.
-- Subject: Unit session-17.scope has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/li ... temd-devel
--
-- Unit session-17.scope has finished starting up.
--
-- The start-up result is done.
Dec 12 14:40:01 blrasset.com systemd[1]: Starting Session 17 of user root.
-- Subject: Unit session-17.scope has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/li ... temd-devel
--
-- Unit session-17.scope has begun starting up.
Dec 12 14:40:01 blrasset.com CROND[2189]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Dec 12 14:42:07 blrasset.com polkitd[887]: Registered Authentication Agent for unix-process:2194:552762 (system bus name :1.71 [/usr/bin/pkttyagent --notify-fd 5 --fallback], ob
Dec 12 14:42:07 blrasset.com systemd[1]: Starting The Apache HTTP Server...
-- Subject: Unit httpd.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/li ... temd-devel
--
-- Unit httpd.service has begun starting up.
Dec 12 14:42:08 blrasset.com systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Dec 12 14:42:08 blrasset.com kill[2211]: kill: cannot find process ""
Dec 12 14:42:08 blrasset.com systemd[1]: httpd.service: control process exited, code=exited status=1
Dec 12 14:42:08 blrasset.com systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: Unit httpd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/li ... temd-devel
--
-- Unit httpd.service has failed.
--
-- The result is failed.
Dec 12 14:42:08 blrasset.com systemd[1]: Unit httpd.service entered failed state.
Dec 12 14:42:08 blrasset.com systemd[1]: httpd.service failed.
Dec 12 14:42:08 blrasset.com polkitd[887]: Unregistered Authentication Agent for unix-process:2194:552762 (system bus name :1.71, object path /org/freedesktop/PolicyKit1/Authent
Last edited by nageshgsn on 2017/12/13 03:48:35, edited 1 time in total.

stevemowbray
Posts: 330
Joined: 2012/06/26 14:20:47

Re: HTTPD service is not starting

Postby stevemowbray » 2017/12/12 09:49:25

You need to look in the apache error log to find out what's causing it to fail.

hunter86_bg
Posts: 856
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: HTTPD service is not starting

Postby hunter86_bg » 2017/12/12 16:56:30

You can check your configuration via

Code: Select all

apachectl configtest

nageshgsn
Posts: 4
Joined: 2017/12/12 09:08:46

Re: HTTPD service is not starting

Postby nageshgsn » 2017/12/13 03:45:32

I'm getting below output,

[root@blrasset ~]# apachectl configtest
Syntax OK
[root@blrasset ~]#

nageshgsn
Posts: 4
Joined: 2017/12/12 09:08:46

Re: HTTPD service is not starting

Postby nageshgsn » 2017/12/13 04:23:38

Checked in the httpd error.log,

[Wed Dec 13 09:39:16.070654 2017] [perl:error] [pid 10016] Can't locate Apache/Ocsinventory/Plugins/Apache.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 . /etc/httpd) at (eval 14) line 2.\n
[Wed Dec 13 09:39:16.070726 2017] [perl:error] [pid 10016] Can't load Perl module Apache::Ocsinventory::Plugins::Apache for server blrasset.com:0, exiting...

nageshgsn
Posts: 4
Joined: 2017/12/12 09:08:46

Re: HTTPD service is not starting

Postby nageshgsn » 2017/12/13 04:34:40

I resolved this problem as below:

Copy the file and folder from installation source,

OCSNG_UNIX_SERVER-2.3.1/Apache/Ocsinventory.pm
OCSNG_UNIX_SERVER-2.3.1/Apache/Ocsinventory

Copy to:

/usr/local/share/perl5/Apache/


Restart service httpd, Now it is working.

Thanks.
Nagesh

User avatar
remirepo
Posts: 267
Joined: 2014/09/21 09:07:12
Location: France
Contact:

Re: HTTPD service is not starting

Postby remirepo » 2017/12/13 06:38:55

To install ocsinventory on CentOS, I heartily recommend to use upstream packages, see
https://www.ocsinventory-ng.org/en/rpm- ... tosfedora/
Remi's Repository - Forum - Blog