I'm getting this error when trying to start apache on a new Centos 7 VPS server.
httpd[1297]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:443
The thing is, virtually nothing is running.
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 194784 3544 ? Ss 03:51 0:00 init -z
root 2 0.0 0.0 0 0 ? S 03:51 0:00 [kthreadd/219]
root 3 0.0 0.0 0 0 ? S 03:51 0:00 [khelper/219]
root 64 0.0 0.1 85220 7820 ? Ss 03:51 0:00 /usr/lib/systemd/systemd-journald
root 70 0.0 0.0 41568 1724 ? Ss 03:51 0:00 /usr/lib/systemd/systemd-udevd
root 104 0.0 0.0 11076 988 ? Ss 03:51 0:00 /usr/bin/rsync --daemon --no-detach
root 106 0.0 0.0 26328 1676 ? Ss 03:51 0:00 /usr/lib/systemd/systemd-logind
dbus 107 0.0 0.0 58032 2264 ? Ss 03:51 0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
root 119 0.0 0.0 22696 1528 ? Ss 03:51 0:00 /usr/sbin/crond -n
root 124 0.0 0.0 6452 816 tty1 Ss+ 03:51 0:00 /sbin/agetty --noclear --keep-baud console 115200 38400 9600 vt220
root 126 0.0 0.0 6452 816 tty2 Ss+ 03:51 0:00 /sbin/agetty --noclear tty2 linux
rpc 127 0.0 0.0 69172 1136 ? Ss 03:51 0:00 /sbin/rpcbind -w
root 370 0.0 0.1 112764 4320 ? Ss 03:51 0:00 /usr/sbin/sshd -D
root 377 0.0 0.1 258460 5684 ? Ssl 03:51 0:00 /usr/sbin/rsyslogd -n
root 795 0.0 0.1 150452 5508 ? Ss 03:52 0:00 sshd: root@pts/0
root 797 0.0 0.0 11900 2064 pts/0 Ss 03:52 0:00 -bash
root 1307 0.0 0.0 51660 1708 pts/0 R+ 04:00 0:00 ps auxwwww
Nothing is already listening on port 443
lsof -i
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
rsync 104 root 4u IPv4 24457457 0t0 TCP *:rsync (LISTEN)
rsync 104 root 5u IPv6 24457458 0t0 TCP *:rsync (LISTEN)
rpcbind 127 rpc 6u IPv4 24457493 0t0 UDP *:sunrpc
rpcbind 127 rpc 7u IPv4 24457494 0t0 UDP *:iris-beep
rpcbind 127 rpc 8u IPv4 24457495 0t0 TCP *:sunrpc (LISTEN)
rpcbind 127 rpc 9u IPv6 24457496 0t0 UDP *:sunrpc
rpcbind 127 rpc 10u IPv6 24457497 0t0 UDP *:iris-beep
rpcbind 127 rpc 11u IPv6 24457498 0t0 TCP *:sunrpc (LISTEN)
sshd 370 root 3u IPv4 24458438 0t0 TCP *:infolibria (LISTEN)
sshd 370 root 4u IPv6 24458447 0t0 TCP *:infolibria (LISTEN)
Changing the port to 444 or 4444 gives the same can't bind error. I created a new self signed cert for this host.
Running httpd with -e debug
shows all of the modules being loaded then the error. Nothing helpful and nothing in between. I'm out of ideas. I'm using the default ssl.conf with only the path to the cert changed. If I remove the ssl.conf file or comment out the Listen directive in it apache will start but obviously doesn't listen for SSL.
ps
andlsof
are the wrong tools for checking this.ss -t -a -n
is better. – Jenny D Jul 5 '18 at 5:14Listen
line in your http config, so that Apache tries to bind the same port more than once. Please include your config if you want any help with apache. – Jenny D Jul 5 '18 at 5:15