Unable to restart httpd following adding cert for https

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
awilson
Posts: 224
Joined: Mon Mar 21, 2016 1:20 pm

Unable to restart httpd following adding cert for https

Post by awilson »

Hi. We just created a certfile signed using our MS AD Certificate Services. After setting the /etc/httpd/conf.d/ssl.conf file to point to the new certificate I'm not able to get httpd to restart. There is a message that port 443 is already in use.

[root@lussvpnagxi00 conf.d]# service httpd start
Starting httpd: [Thu Apr 25 19:20:11 2019] [warn] module ssl_module is already loaded, skipping
[Thu Apr 25 19:20:11 2019] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
(98)Address already in use: make_sock: could not bind to address [::]:443
[ OK ]

This persists after replacing the original conf file. I moved the ssl.conf file to another name and then httpd starts. There were users on the system at the time. I didn't think it would matter or require downtime. I made this change on a test server earlier with no issues.

Any thoughts on this?

Thanks!
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Unable to restart httpd following adding cert for https

Post by npolovenko »

Hello, @awilson. Are you following this tutorial to set up the ssl?
https://assets.nagios.com/downloads/nag ... s%20XI.pdf

Can you zip and upload all apache config files from this folder?
/etc/httpd/conf.d
And also the main apache config:
/etc/httpd/conf/httpd.conf
Finally, I'd like to see the apache error_log and ssl_error_log from /var/log/httpd folder.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
awilson
Posts: 224
Joined: Mon Mar 21, 2016 1:20 pm

Re: Unable to restart httpd following adding cert for https

Post by awilson »

Hi.
Yes, we followed the linked document. We didn't do the php step though.

The requested files are attached.

Thanks!
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Unable to restart httpd following adding cert for https

Post by scottwilkerson »

Your attachment didn't have a /etc/httpd/conf.d/ssl.conf in it.

The error you were getting suggests that there are multiple .conf files in the /etc/httpd/conf.d directory that are both trying to load the same configuration info.

You likely need to move your backup copies to a different location
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
awilson
Posts: 224
Joined: Mon Mar 21, 2016 1:20 pm

Re: Unable to restart httpd following adding cert for https

Post by awilson »

I'm sorry. I had to rename the ssl.conf file to sslSAVE.Apr252019. That was the only way to get the system back up.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Unable to restart httpd following adding cert for https

Post by scottwilkerson »

You would need to rename that back to ssl.conf and also rename sslBACKUP.conf to sslBACKUP.confOLD

If you have 2 files that end in .conf that both have these configs you will have an error like you had
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
awilson
Posts: 224
Joined: Mon Mar 21, 2016 1:20 pm

Re: Unable to restart httpd following adding cert for https

Post by awilson »

Thank you for catching that. I'll make the changes and confirm.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Unable to restart httpd following adding cert for https

Post by scottwilkerson »

awilson wrote:Thank you for catching that. I'll make the changes and confirm.
sounds good
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked