Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#41570 - [dante] systemd service file - invalid PID file location prevents start

Attached to Project: Community Packages
Opened by Florian Knodt (adlerweb) - Friday, 15 August 2014, 09:25 GMT
Last edited by Sergej Pupykin (sergej) - Monday, 18 August 2014, 09:51 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sergej Pupykin (sergej)
Architecture All
Severity Very Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Version: community/dante 1.4.0-3

When starting dante via systemd the service itself is started correctly, however systemd does not detect a proper start due to a PID-file-problem and times out killing all processes.

Systemd-Log:
---snip---
[...]
Active: failed (Result: timeout) since Fr 2014-08-15 11:01:30 CEST; 17s ago
Process: 24565 ExecStart=/usr/bin/sockd -D -p/run/dante/sockd.pid (code=exited, status=0/SUCCESS)

Aug 15 11:00:00 test sockd[24565]: Aug 15 11:00:00 (1408093200.658856) sockd[24565]: warning: checkconfig(): setting the unprivileged uid to 0 is not recommended for security reasons
Aug 15 11:01:30 test systemd[1]: sockd.service start operation timed out. Terminating.
[...]
---snip---

PID-location:
---snip---
# ls -l /run/dante
ls: cannot access /run/dante: No such file or directory
# mount | grep run
run on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=404692k,mode=700)
# df /run/
Filesystem 1K-blocks Used Available Use% Mounted on
run 2023448 380 2023068 1% /run
---snip---

sockd.conf used for testing
---snip---
logoutput: stderr
internal: eth0 port = 1080
external: eth0
socksmethod: username none
clientmethod: none

user.privileged: root
user.unprivileged: root

client pass {
from: 10.8.0.0/16 port 1-65535 to: 0.0.0.0/0
clientmethod: none
}
---snip---

Steps to reproduce:
1. systemctl start sockd.service
2. wait until timeout

Service does start properly with /run/sockd.pid as shown below. Creating a directory also works, but since /run is tmpfs this is not persistent.

/usr/lib/systemd/system/sockd.service:
---snip---
[Unit]
Description=SOCKS v4 and v5 compatible proxy server and client
After=network.target

[Service]
Type=forking
PIDFile=/run/sockd.pid
ExecStart=/usr/bin/sockd -D -p/run/sockd.pid

[Install]
WantedBy=multi-user.target
---snip---
This task depends upon

Closed by  Sergej Pupykin (sergej)
Monday, 18 August 2014, 09:51 GMT
Reason for closing:  Fixed
Comment by Doug Newgard (Scimmia) - Friday, 15 August 2014, 14:56 GMT
systemd-tmpfiles should be using /usr/lib/tmpfiles.d/sockd.conf to create the needed dir. You need to find out why it isn't on your system.

Loading...