Error after adding new ssl certificates

General support questions
Post Reply
barnabythebear
Posts: 7
Joined: 2019/12/04 10:01:11

Error after adding new ssl certificates

Post by barnabythebear » 2020/07/22 11:08:34

Hiya,

After swapping out ssl certificates, I get this error when restarting httpd:

Code: Select all

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 2020-07-21 17:26:24 BST; 14s ago
     Docs: man:httpd(8)
           man:apachectl(8)
  Process: 10686 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
  Process: 857 ExecReload=/usr/sbin/httpd $OPTIONS -k graceful (code=exited, status=0/SUCCESS)
  Process: 10683 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 10683 (code=exited, status=1/FAILURE)

Jul 21 17:26:24 xxxxxxxxxxxx.ac.uk systemd[1]: Starting The Apache HTTP Server...
Jul 21 17:26:24 xxxxxxxxxxxx.ac.uk systemd[1]: httpd.service: main process exited, code=exited, st...URE
Jul 21 17:26:24 xxxxxxxxxxxx.ac.uk kill[10686]: kill: cannot find process ""
Jul 21 17:26:24 xxxxxxxxxxxx.ac.uk systemd[1]: httpd.service: control process exited, code=exited ...s=1
Jul 21 17:26:24 xxxxxxxxxxxx.ac.uksystemd[1]: Failed to start The Apache HTTP Server.
Jul 21 17:26:24 xxxxxxxxxxxx.ac.uksystemd[1]: Unit httpd.service entered failed state.
Jul 21 17:26:24 xxxxxxxxxxxx.ac.uk systemd[1]: httpd.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

Any ideas?

Thank you,

Nige.

pjsr2
Posts: 483
Joined: 2014/03/27 20:11:07

Re: Error after adding new ssl certificates

Post by pjsr2 » 2020/07/22 11:44:06

You seem to use the deprecated command "service" to control your service. It is better to use the systemctl commands.

There is a hint at the end of the error message:
Hint: Some lines were ellipsized, use -l to show in full.
Please follow the instructions from the hint, so we can see the error message in their full glory:

Code: Select all

systemctl status -l httpd
In your postings, include the exact commands you give, do not just copy (parts of) the output, so the reader does not have to guess what you did.

What is the output of the following command?

Code: Select all

apachectl configtest

User avatar
TrevorH
Forum Moderator
Posts: 29051
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Error after adding new ssl certificates

Post by TrevorH » 2020/07/22 13:18:27

What files did you "swap out"? Are their permissions and ownership correct? Did you mv the files from some other location and corrupt their selinux contexts? If so then running restorecon -RFv /path/to/cert.files should help and in future, don't mv them, use cp which does the right thing based on target location. Do you have any errors in /var/log/httpd/error_log? or its ssl_ equivalent.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

barnabythebear
Posts: 7
Joined: 2019/12/04 10:01:11

Re: Error after adding new ssl certificates

Post by barnabythebear » 2020/07/22 14:54:16

Hi,

Thanks for the responses. Sorted.

Running

Code: Select all

apachectl configtest
Pointed to an error in /etc/httpd/conf.d/moodle.conf a typo meant that it couldn't see the bundle.crt

Thanks for your help,

Nigel.

Post Reply

Return to “CentOS 7 - General Support”