gearmand 0.20 does daemonize with --daemon
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Gearman |
Fix Released
|
Medium
|
Brian Aker |
Bug Description
[root@dev1 ~]# /usr/local/
ERROR [ main ] Failed to listen on :::4730
Now it is stuck in foreground
Looking at the processes there is a parent and child processes - the child has all the sockets open.
When I hit ctrl+C - the parent process exits and no longer holds the foreground of my tty.
The child is functioning ok (both before and after ctrl+C)
Stopping the child works only after several tries with
-------------
[root@dev1 ~]# /usr/local/
[root@dev1 ~]# /usr/local/
[root@dev1 ~]# /usr/local/
[root@dev1 ~]# /usr/local/
[root@dev1 ~]# /usr/local/
[root@dev1 ~]# /usr/local/
[root@dev1 ~]# /usr/local/
[root@dev1 ~]# /usr/local/
[root@dev1 ~]# /usr/local/
[root@dev1 ~]# /usr/local/
[root@dev1 ~]# /usr/local/
[root@dev1 ~]# /usr/local/
[root@dev1 ~]# /usr/local/
ERROR [ 3 ] GEARMAND_
[root@dev1 ~]#
-------------
The following always works on the first try
-------------
[root@dev1 ~]# socat tcp-connect:
shutdown
OK
[root@dev1 ~]#
-------------
The GEARMAND_
Looking at stdin/stder/stdout - it indeed seems like gearmand is not properly daemonized
With 0.14
---------
[root@jobs1a ~]# lsof -p $(pgrep gearmand) | awk '$4 ~ /^(0|1|2)u$/'
gearmand 6877 gearmand 0u CHR 1,3 935 /dev/null
gearmand 6877 gearmand 1u CHR 1,3 935 /dev/null
gearmand 6877 gearmand 2u CHR 1,3 935 /dev/null
[root@jobs1a ~]#
---------
While with 0.20
---------
[root@dev1 ~]# lsof -p $(pgrep gearmand) | awk '$4 ~ /^(0|1|2)u$/'
gearmand 31329 gearmand 0u IPv4 551721 TCP dev1.internal:
gearmand 31329 gearmand 1u CHR 136,2 4 /dev/pts/2
gearmand 31329 gearmand 2u CHR 136,2 4 /dev/pts/2
[root@dev1 ~]#
---------
Thanks
Alex
Changed in gearmand: | |
assignee: | nobody → Brian Aker (brianaker) |
importance: | Undecided → Medium |
status: | New → In Progress |
Changed in gearmand: | |
status: | In Progress → Fix Committed |
Changed in gearmand: | |
status: | Fix Committed → Fix Released |
I too have observed this behavior. I got around it by using start-stop-daemon on ubuntu and run it as root.