httpd does not autoboot

Asked 2 years ago, Updated 2 years ago, 96 views

We are using AWS EC2 to raise the web server.
I set the automatic boot setting in chkconfig httpdon.

At one point, I had to restart the server, and when I restarted it,
httpd is no longer autostarting.

Since it was not started, I became the root user and started the service.
A description appeared that the port was already in use.Below is the list.

[ec2-user@ip-172-31-31-137~]$ps-ef | grep http
ec2-user239223630 15:38 pts / 00:00:00 grep --color=auto http


[ec2-user@ip-172-31-31-137~] $su
Password:
[root@ip-172-31-31-137ec2-user] # service httpd start
Starting httpd:(98)Address already in use:AH00072:make_sock:could not bind to address[::]:80
(98) Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
AH00015—Unable to open logs
                                                           [FAILED]

[root@ip-172-31-31-137ec2-user] # lsof | grep http
sshd2208 root5u IPv4 96420t0 TCP*: https (LISTEN)
sshd2208 root6u IPv6 96440t0 TCP*: https (LISTEN)
sshd2208 root7u IPv496460t0TCP*: http (LISTEN)
sshd2208 root8u IPv6 96480t0 TCP*: http (LISTEN)

You can now kill the process number and start httpd, but
Would it be possible to disable this operation every time the server reboots?

Please let me know what the cause is.

Thank you for your cooperation.

centos apache

2022-09-30 20:23

1 Answers

Regarding the following part of your question, sshd is
80 and 443 ports. It looks like you are LISTENing. Did you set up any sshd settings?

[root@ip-172-31-31-137ec2-user] #lsof | grep http
sshd2208 root5u IPv4 96420t0 TCP*: https (LISTEN)
sshd2208 root6u IPv6 96440t0 TCP*: https (LISTEN)
sshd2208 root7u IPv496460t0TCP*: http (LISTEN)
sshd2208 root8u IPv6 96480t0 TCP*: http (LISTEN)


2022-09-30 20:23

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.