-
Notifications
You must be signed in to change notification settings - Fork 248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
daemonize mode causes error on startup #233
Comments
same here... somone has a fix for this?
Edit:
|
Unfortunately project looks like a bit dead :/. |
The fix is trivial... just stringify this line https://github.com/mthenw/frontail/blob/master/lib/daemonize.js#L68 e.g. from fs.writeFileSync(params.pidPath, proc.pid); to fs.writeFileSync(params.pidPath, String(proc.pid)); |
While somebody takes care of this fix, I have found a workaround for daemonizing it in a Linux environment
$FRONTAIL_LOGFILE=./frontail-log.log
FRONTAIL_PID_FILE=./frontail.pid
$LOGFILE=$1
# start frontail storing pid - put options here before $LOGFILE
frontail $LOGFILE &> $FRONTAIL_LOGFILE & frontail_pid=$!
# write PID to disk
echo "$frontail_pid" > $FRONTAIL_PID_FILE launch daemon: lately you can kill it like this
FRONTAIL_PID_FILE=./frontail.pid
$frontail_pid=cat $FRONTAIL_PID_FILE
kill $frontail_pid
rm $FRONTAIL_PID_FILE Non-linux user should find a similar workaround for their OSes. |
Hello,
we run frontail using following parameters:
-d option causes following error at startup:
log file (/tmp/frontail.log) is created, but empty,
pid file (/tmp/frontail.pid) isn't created at all,
I don't know it is connected, but very often daemonized frontail dies with no trace.
Btw. we use jetty+frontail in dockerized container based on Centos 8
The text was updated successfully, but these errors were encountered: