Your message dated Tue, 17 May 2022 13:50:59 +0200
with message-id <[email protected]>
and subject line Re: Bug#1011103: inn2: Unable to start inn2
status=238/STATE_DIRECTORY error
has caused the Debian Bug report #1011103,
regarding inn2: Unable to start inn2 status=238/STATE_DIRECTORY error
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
1011103: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1011103
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: inn2
Version: 2.6.4-2
Severity: important
Dear Maintainer,
*** Reporter, please consider answering these questions, where appropriate ***
We are building a bullseye replacement of a buster server that uses inn2 to
act as a local usenet server. When we try to start the service using
"systemctl start inn2.service" we get this error message:
? inn2.service - InterNetNews
Loaded: loaded (/lib/systemd/system/inn2.service; enabled; vendor preset:
enabled)
Active: failed (Result: exit-code) since Fri 2022-05-13 15:28:34 PDT; 18s ago
Docs: man:innd(8)
Process: 3284 ExecStart=/usr/lib/news/bin/rc.news (code=exited,
status=238/STATE_DIRECTORY)
Main PID: 3284 (code=exited, status=238/STATE_DIRECTORY)
CPU: 1ms
May 13 15:28:34 usenet-dev.stanford.edu systemd[1]: Starting InterNetNews...
May 13 15:28:34 usenet-dev.stanford.edu systemd[3284]: inn2.service: Failed to
set up special execution directory in /var/lib: Not a directory
May 13 15:28:34 usenet-dev.stanford.edu systemd[3284]: inn2.service: Failed at
step STATE_DIRECTORY spawning /usr/lib/news/bin/rc.news: Not a directory
May 13 15:28:34 usenet-dev.stanford.edu systemd[1]: inn2.service: Main process
exited, code=exited, status=238/STATE_DIRECTORY
May 13 15:28:34 usenet-dev.stanford.edu systemd[1]: inn2.service: Failed with
result 'exit-code'.
May 13 15:28:34 usenet-dev.stanford.edu systemd[1]: Failed to start
InterNetNews.
Starting the service with /etc/init.d/inn2 does _not_ result in an error.
-- System Information:
Debian Release: 11.3
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 5.10.0-13-amd64 (SMP w/1 CPU thread)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE,
TAINT_UNSIGNED_MODULE
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/bash
Init: systemd (via /run/systemd/system)
Versions of packages inn2 depends on:
ii cron [cron-daemon] 3.0pl1-137
pn inn2-inews <none>
ii libc6 2.31-13+deb11u3
ii libcrypt1 1:4.4.18-4
ii libdb5.3 5.3.28+dfsg1-0.8
pn libmime-tools-perl <none>
ii libpam0g 1.4.0-9+deb11u1
ii libperl5.32 5.32.1-4+deb11u2
pn libpython3.9 <none>
ii libsasl2-2 2.1.27+dfsg-2.1+deb11u1
ii libssl1.1 1.1.1n-0+deb11u1
ii libsystemd0 247.3-7
ii lsb-base 11.1.0
ii perl 5.32.1-4+deb11u2
ii perl-base [perlapi-5.32.1] 5.32.1-4+deb11u2
ii postfix [mail-transport-agent] 3.5.6-1+b1
ii procps 2:3.3.17-5
pn time <none>
ii zlib1g 1:1.2.11.dfsg-2
inn2 recommends no packages.
Versions of packages inn2 suggests:
pn gnupg1 <none>
pn libgd-perl <none>
ii libkrb5-3 1.18.3-6+deb11u1
ii wget 1.21-1+deb11u1
--- End Message ---
--- Begin Message ---
On May 17, [email protected] wrote:
> On 5/16/2022 3:06 PM, Marco d'Itri wrote:
> > On May 16, Richard Landster <[email protected]> wrote:
> >
> > > May 13 15:28:34 usenet-dev.stanford.edu systemd[3284]: inn2.service:
> > > Failed to set up special execution directory in /var/lib: Not a directory
> > > May 13 15:28:34 usenet-dev.stanford.edu systemd[3284]: inn2.service:
> > > Failed at step STATE_DIRECTORY spawning /usr/lib/news/bin/rc.news: Not a
> > > directory
> > I think that there is something unusual in your system: how do /var/
> > and /var/lib/ look like?
>
> usenet-dev:/etc/news# ls -lrtd /var
> drwxr-xr-x 12 root root 4096 May 13 13:34 /var
> usenet-dev:/etc/news# ls -lrtd /var/lib
> drwxr-xr-x 25 root root 4096 May 13 15:28 /var/lib
> usenet-dev:/etc/news# ls -lrtd /var/lib/news
> lrwxrwxrwx 1 root root 18 May 13 13:19 /var/lib/news -> /var/spool/news/db
>
> usenet-dev:/etc/news# df -h
> Filesystem Size Used Avail Use% Mounted on
> udev 3.9G 0 3.9G 0% /dev
> tmpfs 796M 1.5M 795M 1% /run
> /dev/sda1 15G 2.5G 12G 18% /
> tmpfs 3.9G 0 3.9G 0% /dev/shm
> tmpfs 5.0M 0 5.0M 0% /run/lock
> /dev/sda3 1007M 2.0M 954M 1% /var/cache/openafs
> AFS 2.0T 0 2.0T 0% /afs
> /dev/sdb1 196G 77G 110G 42% /var/spool/news
>
>
> >
> > > Starting the service with /etc/init.d/inn2 does _not_ result in an error.
> > I do not understand this, because the init script sources
> > /lib/lsb/init-functions which sources
> > /lib/lsb/init-functions.d/40-systemd which makes it just run systemctl
> > anyway.
> >
>
> You are correct, of course. I made a copy of /etc/init.d/inn2 called
> /etc/init.d/inn2-custom and ran that without the error the systemd version
> gave me. Sorry for the confusion.
> In any event I have found the issue. As you can see from the above
> /var/lib/news is a symbolic link. In the service file StateDirectory is set
> to news which resolves to /var/lib/news. It seems that systemd does not like
> StateDirectory to be a symbolic link. Lesson learned.
Yes, it's that. You can easily override StateDirectory locally:
cat <<END > /lib/systemd/system/inn2.service.d/no-state-dir.conf
[Service]
StateDirectory=
END
--
ciao,
Marco
signature.asc
Description: PGP signature
--- End Message ---