Re: Apache suspend/resume (again)

2024-09-22 Thread Tim via users
On Sun, 2024-09-22 at 15:16 +0100, Patrick O'Callaghan wrote: > All other network functions are working, including DNS. The problem > is exclusively with Apache, not because it's failing (nothing in the > journal suggests that and there's nothing in its own error.log) but > because the system is ex

Re: Apache suspend/resume (again)

2024-09-22 Thread Tim via users
On Sun, 2024-09-22 at 17:33 +0100, Patrick O'Callaghan wrote: > Sep 09 07:55:05 Bree systemd[1]: systemd-suspend.service: Deactivated > successfully. <-- > ---Where is this coming > from? > Sep 09 07:55:05 Bree systemd[1]: Finished systemd-susp

Re: Apache suspend/resume (again)

2024-09-22 Thread Chris Adams
Once upon a time, Todd Zullinger said: > FWIW, apachectl in Fedora is a wrapper around systemctl, for > folks who have trained themselves to use apachectl. Ahh, didn't know that. > I'm not advocating for its use, as I think it's more work to > call it than it is to use systemctl consistently as

Re: Apache suspend/resume (again)

2024-09-22 Thread Todd Zullinger
Chris Adams wrote: > Once upon a time, Patrick O'Callaghan said: >> On suspend: >> Sep 09 01:01:44 Bree systemd[1]: Starting systemd-suspend.service - System >> Suspend... >> Sep 09 01:01:44 Bree systemd[1]: httpd.service: Sent signal SIGWINCH to main >> process 332400 (httpd) on client request.

Re: Apache suspend/resume (again)

2024-09-22 Thread Chris Adams
Once upon a time, Patrick O'Callaghan said: > On suspend: > Sep 09 01:01:44 Bree systemd[1]: Starting systemd-suspend.service - System > Suspend... > Sep 09 01:01:44 Bree systemd[1]: httpd.service: Sent signal SIGWINCH to main > process 332400 (httpd) on client request. <-- From "apachectl grace

Re: Apache suspend/resume (again)

2024-09-22 Thread Patrick O'Callaghan
On Sun, 2024-09-22 at 09:49 -0500, Chris Adams wrote: > For any service that doesn't handle active network changes, you should > stop it before suspend and start it after resume, after the network is > back online.  I don't think network-online.target is sufficient for > this, I think it only activ

Re: Valeton GP-100

2024-09-22 Thread Barry Scott
> On 19 Sep 2024, at 16:56, Patrick O'Callaghan wrote: > > 0024:err:ole:com_get_class_object class > {4ce576fa-83dc-4f88-951c-9d0782b4e376} not registered > 0024:err:ole:create_server class {4ce576fa-83dc-4f88-951c-9d0782b4e376} not > registered > 0024:err:ole:com_get_class_object no class ob

Re: Apache suspend/resume (again)

2024-09-22 Thread Chris Adams
Once upon a time, Patrick O'Callaghan said: > No. All other network functions are working, including DNS. The problem > is exclusively with Apache, not because it's failing (nothing in the > journal suggests that and there's nothing in its own error.log) but > because the system is explicitly halt

Re: Apache suspend/resume (again)

2024-09-22 Thread Patrick O'Callaghan
On Sun, 2024-09-22 at 12:38 +0100, Barry Scott wrote: > > > On 22 Sep 2024, at 12:00, Patrick O'Callaghan wrote: > > > > Tried that with this drop-in: > > > > # cat /etc/systemd/system/httpd.service.d/override.conf > > > > [Unit] > > After=network-online.target > > Wants=network-onlin

Re: Apache suspend/resume (again)

2024-09-22 Thread Patrick O'Callaghan
On Sun, 2024-09-22 at 21:45 +0930, Tim via users wrote: > Barry Scott: > > > Does httpd recover if you unplug the network cable and then plug it back > > > in? > > Patrick O'Callaghan: > > It does. The problem only ever occurs on suspend (or hibernate)/resume. > > In fact it occasionally doesn't

Re: Apache suspend/resume (again)

2024-09-22 Thread Patrick O'Callaghan
On Sun, 2024-09-22 at 09:41 -0400, Todd Zullinger wrote: > If using the socket activation doesn't work for some reason, > it's probably worth adding a script to restart httpd on > resume via /usr/lib/systemd/system-sleep.  A number of > packages do this. It's working now. My bad. I had enabled it

Re: Apache suspend/resume (again)

2024-09-22 Thread Patrick O'Callaghan
On Sun, 2024-09-22 at 09:46 -0400, Jonathan Billings wrote: > On Sep 21, 2024, at 09:35, francis.montag...@inria.fr wrote: > > > > HI. > > > > > On Sat, 21 Sep 2024 13:16:49 +0100 Patrick O'Callaghan wrote: > > > 4. The journal (see below) shows that httpd does resume with the rest > > > of the

Re: Apache suspend/resume (again)

2024-09-22 Thread Patrick O'Callaghan
On Sun, 2024-09-22 at 14:29 +0200, francis.montag...@inria.fr wrote: > On Sun, 22 Sep 2024 12:16:59 +0100 Patrick O'Callaghan wrote: > > > I enabled httpd.socket (and made no other changes), did a daemon- > > reload, then manually stopped Apache, but connecting to it doesn't > > restart it again.

Re: Apache suspend/resume (again)

2024-09-22 Thread Jonathan Billings
On Sep 21, 2024, at 09:35, francis.montag...@inria.fr wrote: > > HI. > >> On Sat, 21 Sep 2024 13:16:49 +0100 Patrick O'Callaghan wrote: >> 4. The journal (see below) shows that httpd does resume with the rest >> of the system, but then is immediately deactivated. The reason for this >> is not st

Re: Apache suspend/resume (again)

2024-09-22 Thread Todd Zullinger
francis.montag...@inria.fr wrote: > On Sun, 22 Sep 2024 12:16:59 +0100 Patrick O'Callaghan wrote: > >> I enabled httpd.socket (and made no other changes), did a daemon- >> reload, then manually stopped Apache, but connecting to it doesn't >> restart it again. > > You need to start httpd.socket,

Re: Apache suspend/resume (again)

2024-09-22 Thread Francis . Montagnac
On Sun, 22 Sep 2024 12:16:59 +0100 Patrick O'Callaghan wrote: > I enabled httpd.socket (and made no other changes), did a daemon- > reload, then manually stopped Apache, but connecting to it doesn't > restart it again. You need to start httpd.socket, not only enable it (enable is for starting it

Re: Apache suspend/resume (again)

2024-09-22 Thread Tim via users
Barry Scott: > > Does httpd recover if you unplug the network cable and then plug it back in? Patrick O'Callaghan: > It does. The problem only ever occurs on suspend (or hibernate)/resume. > In fact it occasionally doesn't happen then either, which suggests a > race of some sort. > Network hardw

Re: Apache suspend/resume (again)

2024-09-22 Thread Barry Scott
> On 22 Sep 2024, at 12:00, Patrick O'Callaghan wrote: > > Tried that with this drop-in: > > # cat /etc/systemd/system/httpd.service.d/override.conf > > [Unit] > After=network-online.target > Wants=network-online.target > > It made no difference. That only changes what happens when

Re: Apache suspend/resume (again)

2024-09-22 Thread Patrick O'Callaghan
On Sun, 2024-09-22 at 12:00 +0100, Patrick O'Callaghan wrote: > > You might also consider using the httpd.socket activation > > method.  Then httpd will be started when a request for the > > web service arrives. > > > > > > I'll take a look at that. I enabled httpd.socket (and made no other cha

Re: Apache suspend/resume (again)

2024-09-22 Thread Patrick O'Callaghan
On Sun, 2024-09-22 at 13:42 +0930, Tim via users wrote: > On Sat, 2024-09-21 at 13:16 +0100, Patrick O'Callaghan wrote: > > Here's the relevant section from the journal: > > > > Sep 21 13:04:12 Bree systemd[1]: httpd.service: Deactivated successfully. > > Sep 21 13:04:12 Bree systemd[1]: httpd.ser

Re: Apache suspend/resume (again)

2024-09-22 Thread Patrick O'Callaghan
On Sat, 2024-09-21 at 15:35 +0200, francis.montag...@inria.fr wrote: > HI. > > On Sat, 21 Sep 2024 13:16:49 +0100 Patrick O'Callaghan wrote: > > > 4. The journal (see below) shows that httpd does resume with the rest > > of the system, but then is immediately deactivated. The reason for this > >

Re: Apache suspend/resume (again)

2024-09-22 Thread Patrick O'Callaghan
On Sat, 2024-09-21 at 18:05 +0100, Barry Scott wrote: > > > On 21 Sep 2024, at 13:16, Patrick O'Callaghan wrote: > > > > I assume there's a systemd mechanism for getting httpd to wait for the > > network before resuming, but I've no idea how to accomplish this. > > Once the service is started s

Re: Apache suspend/resume (again)

2024-09-22 Thread Patrick O'Callaghan
On Sat, 2024-09-21 at 09:49 -0400, Todd Zullinger wrote: > Patrick O'Callaghan wrote: > > 1. I run httpd via systemd for a small personal web service. This > > works. > > > > 2. I suspend my system overnight and wake it automatically in the > > morning). This turns out to be irrelevant, because th

Re: Apache suspend/resume (again)

2024-09-22 Thread Patrick O'Callaghan
On Sun, 2024-09-22 at 13:35 +0930, Tim via users wrote: > On Sat, 2024-09-21 at 13:16 +0100, Patrick O'Callaghan wrote: > > I assume there's a systemd mechanism for getting httpd to wait for the > > network before resuming, but I've no idea how to accomplish this. > > I run Apache on my CentOS PC,