• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Configuration template error / Apache ports

Olivier77

New Pleskian
Hello everybody,

After having enabled fail2ban, my websites indicated Gateway Error. I resolved the problem with disabling Nginx (?). I finally disabled fail2ban.
This morning, when I added an email address, the plesk needed to reload configuration and my websites went down. Apache can't start.

The Webserver Configurations troubleshooter tells me that it can't create configuration templates because :

Can not restart web server: httpd stop failed
0 /usr/sbin/apache2 processes are killed
0 ../lib/apache2/mpm-prefork/apache2 processes are killed
Service /etc/init.d/apache2 failed to start
httpd stop failed
0 /usr/sbin/apache2 processes are killed
0 ../lib/apache2/mpm-prefork/apache2 processes are killed


Apache can't restart because :
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80

Same thing with port 443.

When I launch a netstat, this is the "init" process which listens my port 80.

I don't understand why I can't use these ports since it worked for a while.

Thank you very much for your help.
 
Try to kill process which uses port 80 and start httpd service manually.
 
It is the "init" process which uses port 80. I'm not a expert in Linux but I think I can't kill it, right ?
 
What is output of commands

# lsof -i tcp:80
# lsof -i tcp:443

?
 
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
init 9242 www-data 5u IPv6 222682352 0t0 TCP *:http (LISTEN)
init 9243 www-data 5u IPv6 222682352 0t0 TCP *:http (LISTEN)


COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
init 9242 www-data 7u IPv6 222682356 0t0 TCP *:https (LISTEN)
init 9243 www-data 7u IPv6 222682356 0t0 TCP *:https (LISTEN)
 
Show me output

# ps xaf | grep -C4 9242
# ps xaf | grep -C4 9243
 
# ps xaf | grep -C4 9242
9391 ? Ss 0:05 /usr/sbin/sshd
30002 ? Ss 0:00 \_ sshd: root@pts/0
30004 pts/0 Ss 0:00 \_ -bash
31448 pts/0 R+ 0:00 \_ ps xaf
31449 pts/0 S+ 0:00 \_ grep -C4 9242
13311 ? Ss 0:00 svnserve -d -r /var/svn/
29942 ? S 0:00 \_ svnserve -d -r /var/svn/
30916 ? S 0:00 \_ svnserve -d -r /var/svn/
3631 ? S 0:00 \_ svnserve -d -r /var/svn/
--
26124 ? S 0:00 \_ /bin/sh -i
21001 ? S 0:12 /bin/sh -i
26097 ? S 0:00 \_ /bin/sh -i
15528 ? Ss 0:00 sw-engine-fpm: master process (/etc/sw-engine/sw-engine-fpm.conf)
9242 ? Ss 40:33 init -k start
9243 ? Ss 29:40 init -k start



# ps xaf | grep -C4 9243
9391 ? Ss 0:05 /usr/sbin/sshd
30002 ? Ss 0:00 \_ sshd: root@pts/0
30004 pts/0 Ss 0:00 \_ -bash
31705 pts/0 R+ 0:00 \_ ps xaf
31706 pts/0 S+ 0:00 \_ grep -C4 9243
13311 ? Ss 0:00 svnserve -d -r /var/svn/
29942 ? S 0:00 \_ svnserve -d -r /var/svn/
30916 ? S 0:00 \_ svnserve -d -r /var/svn/
3631 ? S 0:00 \_ svnserve -d -r /var/svn/
--
21001 ? S 0:12 /bin/sh -i
26097 ? S 0:00 \_ /bin/sh -i
15528 ? Ss 0:00 sw-engine-fpm: master process (/etc/sw-engine/sw-engine-fpm.conf)
9242 ? Ss 40:34 init -k start
9243 ? Ss 29:41 init -k start
 
svnserv uses port 80. Why you have configured it so?

Kill these processes with

# kill -TERM 9242 9243
# kill -KILL 9242 9243

And then

# /usr/local/psa/admin/sbin/httpdmng --reconfigure-all
 
Why is it configured like this ? I don't know...

By the way, I've killed the processes and rebuild configuration, it's working now.
In first approach, I didn't want to kill these processes, but I had to.

Thank you very much.
 
svnserv is third-party not Plesk related software and uses webserver's port 80. It is incorrect configuration at least.
 
Hi Olivier77,

please consider as well to use "Like" and/or "Best Answer" options here in the forum, to improve the forum and to help forum users to find answers to their questions and/or issues/problems. You find these options on the bottom of each post here in the forum.
 
Back
Top