Apache cannot be started with the error "(98)Address already in use: make_sock: could not bind to address [::]:443 no listening sockets available, shutting down.

Создана:

2016-11-16 12:55:07 UTC

Изменена:

2017-08-16 22:30:49 UTC

2

Помогла ли вам статья?


Есть вопросы?

Отправить запрос

Apache cannot be started with the error "(98)Address already in use: make_sock: could not bind to address [::]:443 no listening sockets available, shutting down.

Applicable to:

  • Plesk for Linux/Unix

Synopsis

All the domains stopped working.

When trying to start Apache Web server, you get the following error in the console and in error_log :

"(98)Address already in use: make_sock: could not bind to address [::]:443 no listening sockets available, shutting down"

(It is also possible that the error discusses the 80 port.)

Cause

This error means that some other process already uses 443 (80) port and Apache cannot bind to it.

Resolution

First of all make sure that the "Listen" directive is specified only once in the Apache configuration for one port. Check the httpd.conf and conf.d/* files in order to find it (on some OS'es, SUSE Linux  and /etc/apache2/* should be checked).

Next, try to determine which process uses the port with the following command:

/usr/sbin/lsof -i | grep http
httpd 24717 apache 4u IPv6 9672930 TCP *:https (LISTEN)

The above command shows that the "TCP *:https" port is used by "httpd" process with PID 24717.

Look into contents of this file to find the command with which the process was started.:

cat /proc/24717/cmdline
/usr/sbin/httpd-kgraceful

(24717 is the process' PID).

  • If it is really an Apache (httpd) binary, then such a problem may have occurred if Apache failed to stop properly. You need to kill this process and start Apache again.
  • If you see that some other program uses the 443/80 port, you need to find from where it was started and determine what it is, because it could be a malicious script. Here is an example where such a script was disguised:

    # ls -l /proc/24717/exe
    lrwxrwxrwx 1 apache apache 0 May 13 10:16 /proc/24717/exe -> /tmp/.www/httpd
    

If you found a malicious script on your server it is important to find out where it came from. Unfortunately this topic is too long and is out of this article's and Parallels support scope.

Была ли эта статья полезной?
Пользователи, считающие этот материал полезным: 2 из 16
Еще есть вопросы? Отправить запрос
Войдите в службу, чтобы оставить комментарий.