• Starting Apache Webserver in bookworm

    From Christoph Pleger@21:1/5 to All on Sat Apr 19 10:10:02 2025
    Hello,

    after upgrading a computer from Debian 11 to Debian 12, I am unable to
    start apache2 by systemd. Even configuring the apache2 package hangs
    forever, if I do not kill the related processes and edit /var/lib/dpkg/info/apache2.postinst, commenting out all lines where
    apache2 is tried to be started.

    Trying to explicitly start apache2 for the CLI:

    1. systemctl start apache2

    hangs

    2. cp /etc/init.d/apache2 /root
    /root/apache2 start

    hangs

    3. The only method I found so far that works, from the CLI:

    . /etc/apache2/envvars
    export APACHE_STARTED_BY_SYSTEMD=true
    apache2ctl start

    Any idea?

    Regards
    Christoph

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEHeqYcooFjlnR4zwFcOXIip7d3fEFAmgDWO4ACgkQcOXIip7d 3fHuyBAApq+y/OSxLqfThN2xjoy5f1u9gWQ1QHSt4cjChvXNVfKFyzIYOGkX7lwP TYPABJoBr1plWXwHxKtQLBdi/+aYgD8bbxs3Gwf6c5IGgMXScD2Qc0M1YW1xtIeL MuygxBXQuRt7wUxuTbvQPrEjUxIK2/EpPjs5n5z4tn0KBxLHTtQ3G1gDodMY7RWR MOK4UoNyVPM9juPIiOoDYSrCKCOvNELiOv+2mdBP9o0jVgx0HJjX4X9yibFkabLY d/Mh7JTccQxRFjp40Q/UUw/xszF8VidEc123WGd/IMQqZxjkLTgbv3lQomWcRH1r LJUi5S/JTpM2DDja5x28jJ8oaVTHsmDLH9/TyEvUNq0hI155aKvXw87d5BEi82Cc Jb1aWXmA4/kaAWXj8EAXgSn57wDArMWM2QFhRLsR3I383xCGkgK68K7Q/+3QaEYV nrK3BJs5svF36bmIgohR0ypiWHW9EgvFbkU4BSWyQXWPuZaoJZ1p8eer6TkuFlJA dbwKnSgiYfZ6ICBwocMHcDx3iElnGRNBsGveMDJ04/ssDzlj4v9eey1t+MoJNUfX geX3mFccpwwUZHVVc6SSn38rhRe149JO9z05WBZZFmEFbVyJnaglnmneIgEhYkKU DpZpSMNqRmQE7AX0JD9STsR0JHR9vtJSscI0P1UMUgoc8CxMiyM=
    =9X+k
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Joe@21:1/5 to Christoph Pleger on Sat Apr 19 11:10:01 2025
    On Sat, 19 Apr 2025 10:03:58 +0200
    Christoph Pleger <Christoph.Pleger@cs.tu-dortmund.de> wrote:

    Hello,

    after upgrading a computer from Debian 11 to Debian 12, I am unable to
    start apache2 by systemd. Even configuring the apache2 package hangs
    forever, if I do not kill the related processes and edit /var/lib/dpkg/info/apache2.postinst, commenting out all lines where
    apache2 is tried to be started.

    Trying to explicitly start apache2 for the CLI:

    1. systemctl start apache2

    hangs

    2. cp /etc/init.d/apache2 /root
    /root/apache2 start

    hangs

    3. The only method I found so far that works, from the CLI:

    . /etc/apache2/envvars
    export APACHE_STARTED_BY_SYSTEMD=true
    apache2ctl start

    Any idea?


    See if there are any clues in /var/log/apache2/error.log or the
    earlier files. You'll need root privileges.

    --
    Joe

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andy Smith@21:1/5 to Christoph Pleger on Sat Apr 19 12:00:01 2025
    Hi,

    On Sat, Apr 19, 2025 at 10:03:58AM +0200, Christoph Pleger wrote:
    after upgrading a computer from Debian 11 to Debian 12, I am unable to
    start apache2 by systemd.

    Always check:

    # systemctl status apache2
    # apachectl configtest
    # journalctl -u apache2

    and the contents of apache2's own error.log.

    Thanks,
    Andy

    --
    https://bitfolk.com/ -- No-nonsense VPS hosting

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Christoph Pleger@21:1/5 to All on Tue Apr 22 13:30:01 2025
    Hello,
    # systemctl status apache2
    # apachectl configtest
    # journalctl -u apache2


    I have solved it, and the reason for apache2 not starting with systemd
    was that apache2 waited for nslcd to start, while nslcd waited for time-sync.target and that waited for systemd-time-wait-sync.service. Unfortunately, systemd-time-wait-sync.service with
    TimeoutStartSec=infinity never succeeds at boot time, though it does in
    a manual restart.

    But there is still the question why systemd-time-wait-sync.service
    fails at boot ...

    Regards
    Christoph

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEHeqYcooFjlnR4zwFcOXIip7d3fEFAmgHfVEACgkQcOXIip7d 3fFUyg//fHzXNxTUlz9dewkwhRbSXTEu8v8uYQunJQCEsLnfKvffwtk/QKpqlJKo VNZWSfdpV9vApLx3C9Zfb+wmeu/PSULfEJWPcGIHwhXDoKTGMTVwXlna/JVXn+EG 587khICZdiUmiSMh421sVu7M8bNCFXBeJRE5B99WMHLOW2h5gnJKmbt3nG7Qq8/N lP9ciPZu+1A6VFZcfUWNspODQU8j4sEZG3hvpdWaXUWPi0PRwtB2TS2zhJAjhbeg WPcyxq+i7jWMHuFP3IWC4Ay1diT0Q+afuYM7guGd/LVWl75AWnCV8eGCYqG+syo0 Pxs9AVaui8yfB6cHEzMcpfnErmklxbBaYSh0jkH7voQcUL02zj30dWiapzSnJMi1 ognSBeOeePC6R1A05r9/4N7RqBxpOIufO5fHs6W/IRLmf42uCn6wHiZgN+AFZmIf wEgNpWnWb2lwx+HLp2V929K9GCd9YDnzNPFSMvDEcRzDrc7Gof+eBcSMLndudmuO tQaeQd4u0NgYfuY8+yEyX/nXr0qFKx3GpgN7Y8rYkoG/ktp9nVaohhsTTM8upcrh xuf44lFR3kidDn1deZfBljO4kfHaff5rEOSDORyA06aOx2SHM1Mb2GPAksPwVDF2 czDSB6tIrdpB6Ds7/vxh1LRQdSwSl0++OcamDnTNSNggzhPHnbY=
    =o5dJ
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)