Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 578110 - net-irc/znc cannot create PID file
Summary: net-irc/znc cannot create PID file
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Alex Alexander (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-23 16:50 UTC by Rafal Kupiec
Modified: 2016-03-24 14:06 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
znc-info,txt (znc-info,txt,17.87 KB, text/plain)
2016-03-24 11:31 UTC, Rafal Kupiec
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rafal Kupiec 2016-03-23 16:50:25 UTC
When starting znc as a daemon, it is working fine, but execution finishes with the following error:

znc              | * start-stop-daemon: did not create a valid pid in `/run/znc/znc.pid'
znc              | * Failed to start znc                                  [ !! ]
znc              | * ERROR: znc failed to start


Daemon is running in the background, but rc-status says it it stopped:

 znc                                                               [  stopped  ]


znc      11500  0.0  0.0 174228  7704 ?        Ssl  17:05   0:00 /usr/bin/znc --datadir /var/lib/znc
Comment 1 Michael Palimaka (kensington) gentoo-dev 2016-03-24 11:02:34 UTC
emerge --info znc please
Comment 2 Louis Sautier (sbraz) gentoo-dev 2016-03-24 11:04:27 UTC
Did you check that your config contains the line
PidFile = /run/znc/znc.pid?
Comment 3 Rafal Kupiec 2016-03-24 11:31:58 UTC
Created attachment 428916 [details]
znc-info,txt
Comment 4 Rafal Kupiec 2016-03-24 11:33:00 UTC
(In reply to Louis Sautier from comment #2)
> Did you check that your config contains the line
> PidFile = /run/znc/znc.pid?

Yes, I've got this option.
/run/znc is owned by znc:znc and chmod 770.
Comment 5 Louis Sautier (sbraz) gentoo-dev 2016-03-24 11:56:58 UTC
Can you attach the output of /etc/init.d/znc start?
There should be a line which contains the path to the PID file.
Comment 6 Rafal Kupiec 2016-03-24 12:26:51 UTC
znc              | * Starting znc ...
znc              |[ .. ] Checking for list of available modules...
znc              |[ >> ] ok
znc              |[ .. ] Opening config [/var/lib/znc/configs/znc.conf]...
znc              |[ >> ] ok
znc              |[ .. ] Loading global module [webadmin]...
znc              |[ >> ] [/usr/lib64/znc/webadmin.so]
znc              |[ .. ] Loading global module [identfile]...
znc              |[ >> ] [/usr/lib64/znc/identfile.so]
znc              |[ .. ] Loading global module [adminlog]...
znc              |[ >> ] [/usr/lib64/znc/adminlog.so]
znc              |[ .. ] Loading global module [lastseen]...
znc              |[ >> ] [/usr/lib64/znc/lastseen.so]
znc              |[ .. ] Loading global module [partyline]...
znc              |[ >> ] [/usr/lib64/znc/partyline.so]
znc              |[ .. ] Loading global module [fail2ban]...
znc              |[ >> ] [/usr/lib64/znc/fail2ban.so]
znc              |[ .. ] Binding to port [+ABCD]...
znc              |[ >> ] ok
znc              |[ ** ] Loading user [XYZ]
znc              |[ ** ] Loading network [default]
znc              |[ .. ] Loading network module [keepnick]...
znc              |[ >> ] [/usr/lib64/znc/keepnick.so]
znc              |[ .. ] Loading network module [nickserv]...
znc              |[ >> ] [/usr/lib64/znc/nickserv.so]
znc              |[ .. ] Loading network module [savebuff]...
znc              |[ >> ] [/usr/lib64/znc/savebuff.so]
znc              |[ .. ] Loading network module [simple_away]...
znc              |[ >> ] [/usr/lib64/znc/simple_away.so]
znc              |[ .. ] Loading network module [chansaver]...
znc              |[ >> ] [/usr/lib64/znc/chansaver.so]XYZ 6667]...
znc              |[ >> ] ok
znc              |[ .. ] Loading user module [controlpanel]...
znc              |[ >> ] ok
znc              |[ .. ] Loading user module [chansaver]...
znc              |[ >> ] ok
znc              |[ .. ] Loading user module [block_motd]...
znc              |[ >> ] ok
znc              |[ .. ] Loading user module [buffextras]...
znc              |[ >> ] ok
znc              |[ .. ] Loading user module [clientnotify]...
znc              |[ >> ] ok
znc              |[ .. ] Loading user module [log]...
znc              |[ >> ] ok
znc              |[ ** ] Loading user [XYZ]
znc              |[ ** ] Loading network [default]
znc              |[ .. ] Loading network module [keepnick]...
znc              |[ >> ] [/usr/lib64/znc/keepnick.so]
znc              |[ .. ] Loading network module [nickserv]...
znc              |[ >> ] [/usr/lib64/znc/nickserv.so]
znc              |[ .. ] Adding server [XYZ 6667]...
znc              |[ >> ] ok
znc              |[ .. ] Loading user module [block_motd]...
znc              |[ >> ] ok
znc              |[ .. ] Loading user module [chansaver]...
znc              |[ >> ] ok
znc              |[ .. ] Loading user module [clientnotify]...
znc              |[ >> ] ok
znc              |[ .. ] Forking into the background...
znc              |[ >> ] [pid: 8875]
znc              |[ ** ] ZNC 1.6.3 - http://znc.in
znc              | * start-stop-daemon: did not create a valid pid in `/run/znc/znc.pid'
znc              | * Failed to start znc                                                                                                                                                                                                                                 [ !! ]
znc              | * ERROR: znc failed to start
Comment 7 Louis Sautier (sbraz) gentoo-dev 2016-03-24 12:47:46 UTC
I keep thinking there's something wrong with your config. This is what you should see:
[ .. ] Forking into the background...
[ >> ] [pid: 30268]
[ .. ] Writing pid file [/run/znc/znc.pid]...
[ >> ] ok
[ ** ] ZNC 1.6.3 - http://znc.in                                                                                                                                         [ ok ]
Comment 8 Rafal Kupiec 2016-03-24 13:08:41 UTC
# /etc/conf.d/znc

# Location of the znc configuration folder
ZNC_DATADIR="/var/lib/znc"

# User to run znc as
ZNC_USER="znc"

# Group to run znc as
ZNC_GROUP="znc"

# PID file
ZNC_PIDFILE="/run/znc/znc.pid"

# You can use this configuration option to pass additional options to the
# start-stop-daemon, see start-stop-daemon(8) for more details.
# Per default we wait 1000ms after we have started the service to ensure
# that the daemon is really up and running.
ZNC_SSDARGS="--wait 1000"

# The termination timeout (start-stop-daemon parameter "retry") ensures
# that the service will be terminated within a given time (30 + 5 seconds
# per default) when you are stopping the service.
ZNC_TERMTIMEOUT="TERM/30/KILL/5"
Comment 9 Louis Sautier (sbraz) gentoo-dev 2016-03-24 13:12:39 UTC
This is the init script config. What I meant was  this:
# grep PidFile /var/lib/znc/configs/znc.conf 
PidFile = /run/znc/znc.pid

By the way, you should have seen a message on the first merge:
https://gitweb.gentoo.org/repo/gentoo.git/tree/net-irc/znc/files/README.gentoo#n20
Comment 10 Rafal Kupiec 2016-03-24 14:05:45 UTC
Yep, I missed that.
Thanks for help!