• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Apache2 gets killed but not restarted by Plesk all the time

southy

Basic Pleskian
Hi,

I'm still tring to install a simple basic Plesk on a simple standard Debian image.
I have yet figured out two bugs (see other threads) but still things are not going well.
At the moment, Plesk gives me:
Code:
Unable to restart web server: 
websrvmng failed: websrvmng: Service apache2 failed to start
This is obviously a result of:
Code:
root:~# /usr/local/psa/admin/sbin/websrvmng -p
websrvmng: Service apache2 failed to start
websrvmng: Service apache2 failed to start
or in other words:
Code:
root:~# /etc/init.d/apache2 start
Starting web server: Apache2(98)Address already in use: make_sock: could not bind to address 0.0.0.0:443
no listening sockets available, shutting down

So the thing can't start because it's already running?
No, not true:
Code:
lvps80-86-91-176:~#  netstat -an -t | grep 443
tcp        0      0 0.0.0.0:8443            0.0.0.0:*               LISTEN
Please notice that there is nothing running on 443. So why isn't this socket aviable?

Let's try manually:
Code:
root:~# apache2ctl start
root:~# apache2ctl status
(...blahblah: URL not found -> 404, but obviously an apache running...):

root:~#  netstat -an -t | grep 80
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:8880            0.0.0.0:*               LISTEN
root:~#  netstat -an -t | grep 443
tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:8443            0.0.0.0:*               LISTEN
Hey, it works?!
Seems so, if I access www.server.com, I get the default Plesk error page.

But no, wait, it's getting even better:
Now I try to access www.server.com/8443.
Same Error as in the beginning (see above). To be sure, lets do another netstat:

Code:
tcp        0      0 0.0.0.0:8443            0.0.0.0:*               LISTEN
and:
tcp        0      0 0.0.0.0:8880            0.0.0.0:*               LISTEN
Note that 80 and 443 are missing again.
The very second I access Plesk admin interface, the apache on 443 and 80 vanishes into thin air.

So, to sum it up:
Plesks psa - startscript as well as /etc/init.d/apache2 think that apache cannot be started because there's already something running on 443,which is not true.
If I start manually, it works until I open up the plesk website.

Now, how can we puzzle this together?

If I remember correctly, /etc/init.d/apache2 just calls apache2ctl. So why is there a difference:
- init.d/apache2 brings the stupid stuff about not being able to bind to 443 even though it should be.
- apache2ctl gets the job done.
- Plesk websrvmngr fails with even less information feedback

...and when you finally got the thing running, opening the plesk page shuts it down again.

Could it be that apache is being restartet every time you open the plesk page? But why doesn't it work?

Any ideas?
I'm kind of stuck here and it's quite frustrating that it's not even possible to install this thing on a standard debian image w/out any modificaions. Is the final product as well that buggy as the installation?

Greetings, southy
 
Ok, I've figured some hints out:

seems plesk misconfigures apache2 when installing.
Before the install, /etc/apache2/ports.conf only lists Port 80.
After the installation of Plesk, the file lists 80 & 443. If you remove 443, apache starts working just fine.

So, am I lacking SSL now?
no: netstat:
Code:
tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN     7530/apache2
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN     7530/apache2
It's the same PID, so obviously apache works quite right now.
I don't know why it works because obviously I just diabled that port in ports.conf.
Dos ports.conf just list the non-SSL-Ports??

Anyway, Problem seems to be solved.

I guess the fact that Plesk adds the Port 443 to ports.conf is a bug in Plesk.
Not that that surprises me.

southy
 
Back
Top