Bug#901788: i2pd: systemd service does not run

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug#901788: i2pd: systemd service does not run

Matsievskiy S.V.
Package: i2pd
Version: 2.18.0-1+b1
Severity: normal

Dear Maintainer,

I installed package i2pd, did no modifications to settings. It did not run.
I tried to restart service with command systemctl restart i2pd but after that systemctl status i2pd always reports service to be inactive(dead) with return status 0.
File /var/log/i2pd/i2pd.log exists but is empty. Folder /var/run/i2pd does not exist.
I was unable to run i2pd as i2pd user with command sudo -u i2pd -g i2pd /usr/sbin/i2pd.
Running under different user or root seems to work fine.

-- System Information:
Debian Release: buster/sid
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.16.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages i2pd depends on:
ii  adduser                         3.117
ii  libboost-date-time1.62.0        1.62.0+dfsg-5.1
ii  libboost-filesystem1.62.0       1.62.0+dfsg-5.1
ii  libboost-program-options1.62.0  1.62.0+dfsg-5.1
ii  libboost-system1.62.0           1.62.0+dfsg-5.1
ii  libc6                           2.27-3
ii  libgcc1                         1:8.1.0-5
ii  libminiupnpc17                  2.1-1
ii  libssl1.1                       1.1.0h-4
ii  libstdc++6                      8.1.0-5
ii  lsb-base                        9.20170808
ii  zlib1g                          1:1.2.11.dfsg-1

i2pd recommends no packages.

i2pd suggests no packages.

-- no debconf information

Reply | Threaded
Open this post in threaded view
|

Bug#901788: i2pd: systemd service does not run

Adam Borowski-3
On Mon, Jun 18, 2018 at 03:06:01PM +0300, Matsievskiy S.V. wrote:

> Package: i2pd
> Version: 2.18.0-1+b1
>
> I installed package i2pd, did no modifications to settings. It did not run.
> I tried to restart service with command systemctl restart i2pd but after
> that systemctl status i2pd always reports service to be inactive(dead)
> with return status 0.
> File /var/log/i2pd/i2pd.log exists but is empty. Folder /var/run/i2pd does not exist.
> I was unable to run i2pd as i2pd user with command sudo -u i2pd -g i2pd /usr/sbin/i2pd.
> Running under different user or root seems to work fine.

> Init: systemd (via /run/systemd/system)

Data point: I can't seem to reproduce, with openrc (multiple machines+archs)
nor systemd (a fresh VM).

Meow!
--
⢀⣴⠾⠻⢶⣦⠀ There's an easy way to tell toy operating systems from real ones.
⣾⠁⢰⠒⠀⣿⡁ Just look at how their shipped fonts display U+1F52B, this makes
⢿⡄⠘⠷⠚⠋⠀ the intended audience obvious.  It's also interesting to see OSes
⠈⠳⣄⠀⠀⠀⠀ go back and forth wrt their intended target.

Reply | Threaded
Open this post in threaded view
|

Bug#901788: i2pd: systemd service does not run

Matsievskiy S.V.
> Data point: I can't seem to reproduce, with openrc (multiple machines+archs)
> nor systemd (a fresh VM).
>
> Meow!

I've tried this on different machine with similar setup. i2pd actually starts when installed for the first time, but after the reboot it goes down. Purging package and reinstall doesn't help. Only able to start after purging and removing i2pd user and group.

Reply | Threaded
Open this post in threaded view
|

Bug#901788: i2pd: systemd service does not run

Yangfl
Is your pid file right? It seems that i2pd just can't handle it very well.

See https://github.com/PurpleI2P/i2pd/issues/1047 and
https://github.com/PurpleI2P/i2pd/issues/1153

Reply | Threaded
Open this post in threaded view
|

Bug#901788: i2pd: systemd service does not run

Matsievskiy S.V.
I run strace on the process. For some reason it cannot lock pid file.

i2pd.log (52K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Bug#901788: i2pd: systemd service does not run

Yangfl
hmm, what's your permission of /var/run/i2pd/ and
/var/run/i2pd/i2pd.pid just right before and after i2pd starts?

also, which systemd unit file are you using (`systemctl status i2pd`)?

2018-06-19 15:46 GMT+08:00 Matsievskiy S.V. <[hidden email]>:
> I run strace on the process. For some reason it cannot lock pid file.

Reply | Threaded
Open this post in threaded view
|

Bug#901788: i2pd: systemd service does not run

Matsievskiy S.V.
Folder doesn't exist before running program. According to systemd man
page, when provided with PIDFile option, it removes pid file
automatically. Even if I create folder by hand, it gets deleted.

I use stock unit file form /lib/systemd/system/i2pd.service.

When I modified it to get strace output, I removed i2pd daemon option
and systemd PIDFile option.

Reply | Threaded
Open this post in threaded view
|

Bug#901788: i2pd: systemd service does not run

Adam Borowski-3
On Tue, Jun 19, 2018 at 01:37:39PM +0300, Matsievskiy S.V. wrote:
> Folder doesn't exist before running program. According to systemd man page,
> when provided with PIDFile option, it removes pid file automatically. Even
> if I create folder by hand, it gets deleted.
>
> I use stock unit file form /lib/systemd/system/i2pd.service.
>
> When I modified it to get strace output, I removed i2pd daemon option and
> systemd PIDFile option.

Just for completeness: this problem is systemd specific: at least with
openrc starting after reboot works, I have no reason to suspect different
for sysv-rc.

I have no clue about systemd or debugging it, thus that's it from me for
now.


Meow!
--
⢀⣴⠾⠻⢶⣦⠀ There's an easy way to tell toy operating systems from real ones.
⣾⠁⢰⠒⠀⣿⡁ Just look at how their shipped fonts display U+1F52B, this makes
⢿⡄⠘⠷⠚⠋⠀ the intended audience obvious.  It's also interesting to see OSes
⠈⠳⣄⠀⠀⠀⠀ go back and forth wrt their intended target.

Reply | Threaded
Open this post in threaded view
|

Bug#901788: i2pd: systemd service does not run

Matsievskiy S.V.
When I run it from terminal I get the same error. No systemd involved.

Command: strace /usr/sbin/i2pd --conf=/etc/i2pd/i2pd.conf
--tunconf=/etc/i2pd/tunnels.conf --pidfile=/tmp/i2pd.pid
--logfile=/tmp/i2pd.log 2> /tmp/strace_i2pd.log

Reply | Threaded
Open this post in threaded view
|

Bug#901788: i2pd: systemd service does not run

Yangfl
2018-06-20 22:55 GMT+08:00 sergey <[hidden email]>:
> When I run it from terminal I get the same error. No systemd involved.
>
> Command: strace /usr/sbin/i2pd --conf=/etc/i2pd/i2pd.conf
> --tunconf=/etc/i2pd/tunnels.conf --pidfile=/tmp/i2pd.pid
> --logfile=/tmp/i2pd.log 2> /tmp/strace_i2pd.log

can't reproduce, neither sudo -u i2pd -g i2pd /usr/sbin/i2pd nor sudo
-u i2pd -g i2pd /usr/sbin/i2pd --conf=/etc/i2pd/i2pd.conf
--tunconf=/etc/i2pd/tunnels.conf --pidfile=/tmp/i2pd.pid
--logfile=/tmp/i2pd.log, but without systemd, since i'm using a clean
chroot.