Job for httpd.service failed

General support questions
Post Reply
gonzouk
Posts: 2
Joined: 2019/07/29 14:55:40

Job for httpd.service failed

Post by gonzouk » 2019/07/29 15:06:27

Hello,

I've not been using Linux for long, but I'm trying to install Observium on CentOS minimal.

Instructions:
https://www.itzgeek.com/how-tos/linux/i ... stem.html

It's all installed but I just can't start httpd. I've looked all over the Internet for some help, but I think it's got me more confused for a newbie.

I get this:

Code: Select all

[root@localhost observium]# systemctl start httpd
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
then

Code: Select all

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 Mon 2019-07-29 08:03:55 PDT; 6s ago
     Docs: man:httpd(8)
           man:apachectl(8)
  Process: 21159 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
  Process: 21157 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
 Main PID: 21157 (code=exited, status=1/FAILURE)

Jul 29 08:03:54 localhost.localdomain systemd[1]: Starting The Apache HTTP Server...
Jul 29 08:03:54 localhost.localdomain httpd[21157]: httpd: Syntax error on line 353 of /etc/httpd/conf/httpd.conf: Syntax error on line 12 ...section
Jul 29 08:03:54 localhost.localdomain systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Jul 29 08:03:55 localhost.localdomain kill[21159]: kill: cannot find process ""
Jul 29 08:03:55 localhost.localdomain systemd[1]: httpd.service: control process exited, code=exited status=1
Jul 29 08:03:55 localhost.localdomain systemd[1]: Failed to start The Apache HTTP Server.
Jul 29 08:03:55 localhost.localdomain systemd[1]: Unit httpd.service entered failed state.
Jul 29 08:03:55 localhost.localdomain systemd[1]: httpd.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
and

Code: Select all

journalctl -xe
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Documentation: http://www.freedesktop.org/wiki/Software/systemd/multiseat
--
-- A new session with the ID 5 has been created for the user andy.
--
-- The leading process of the session is 21118.
Jul 29 08:03:02 localhost.localdomain sshd[21118]: pam_unix(sshd:session): session opened for user andy by (uid=0)
Jul 29 08:03:06 localhost.localdomain su[10597]: pam_unix(su:session): session closed for user root
Jul 29 08:03:06 localhost.localdomain sshd[10511]: pam_unix(sshd:session): session closed for user andy
Jul 29 08:03:06 localhost.localdomain systemd-logind[663]: Removed session 2.
-- Subject: Session 2 has been terminated
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Documentation: http://www.freedesktop.org/wiki/Software/systemd/multiseat
--
-- A session with the ID 2 has been terminated.
Jul 29 08:03:10 localhost.localdomain su[21141]: (to root) andy on pts/1
Jul 29 08:03:10 localhost.localdomain su[21141]: pam_unix(su:session): session opened for user root by andy(uid=1000)
Jul 29 08:03:54 localhost.localdomain polkitd[661]: Registered Authentication Agent for unix-process:21151:419627 (system bus name :1.43 [/usr/bin/pk
Jul 29 08:03:54 localhost.localdomain systemd[1]: Starting The Apache HTTP Server...
-- Subject: Unit httpd.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit httpd.service has begun starting up.
Jul 29 08:03:54 localhost.localdomain httpd[21157]: httpd: Syntax error on line 353 of /etc/httpd/conf/httpd.conf: Syntax error on line 12 of /etc/ht
Jul 29 08:03:54 localhost.localdomain systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Jul 29 08:03:55 localhost.localdomain kill[21159]: kill: cannot find process ""
Jul 29 08:03:55 localhost.localdomain systemd[1]: httpd.service: control process exited, code=exited status=1
Jul 29 08:03:55 localhost.localdomain systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: Unit httpd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit httpd.service has failed.
--
-- The result is failed.
Jul 29 08:03:55 localhost.localdomain systemd[1]: Unit httpd.service entered failed state.
Jul 29 08:03:55 localhost.localdomain systemd[1]: httpd.service failed.
Jul 29 08:03:55 localhost.localdomain polkitd[661]: Unregistered Authentication Agent for unix-process:21151:419627 (system bus name :1.43, object pa 


I can't seem to scroll down to see the rest of the output as it just says lines

Code: Select all

1642-1681/1681 (END)
Any ideas?

Thanks

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Job for httpd.service failed

Post by TrevorH » 2019/07/29 15:46:20

Line 353 of the default httpd.conf is the one that does "IncludeOptional conf.d/*.conf. It then tells you the error is on line 12 so I would guess that is line 12 of your new observium.conf file (or whatever you called it).

You might also want to look at librenms which was/is a fork of observium done by devs who were unhappy with the observium lead.

Make sure that the file you added for observium is in Apache httpd 2.4 syntax and not 2.2, there are significant differences between the two versions and 2.2 options can cause a 2.4 server to error.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

gonzouk
Posts: 2
Joined: 2019/07/29 14:55:40

Re: Job for httpd.service failed

Post by gonzouk » 2019/07/29 17:53:45

Maybe I should give up on Observium and try librenms.

I didn’t know about this. It’s seems many have moved over as Observium have become money grabbers and it’s harder to install.

librenms looks feature rich too.

Post Reply