{"action":"opened","issue":{"url":"https://api.github.com/repos/driskell/log-courier/issues/99","labels_url":"https://api.github.com/repos/driskell/log-courier/issues/99/labels{/name}","comments_url":"https://api.github.com/repos/driskell/log-courier/issues/99/comments","events_url":"https://api.github.com/repos/driskell/log-courier/issues/99/events","html_url":"https://github.com/driskell/log-courier/issues/99","id":55125392,"number":99,"title":"after SIGHUP log-courier does not release deleted files","user":{"login":"gfa","id":64407,"avatar_url":"https://avatars.githubusercontent.com/u/64407?v=3","gravatar_id":"","url":"https://api.github.com/users/gfa","html_url":"https://github.com/gfa","followers_url":"https://api.github.com/users/gfa/followers","following_url":"https://api.github.com/users/gfa/following{/other_user}","gists_url":"https://api.github.com/users/gfa/gists{/gist_id}","starred_url":"https://api.github.com/users/gfa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gfa/subscriptions","organizations_url":"https://api.github.com/users/gfa/orgs","repos_url":"https://api.github.com/users/gfa/repos","events_url":"https://api.github.com/users/gfa/events{/privacy}","received_events_url":"https://api.github.com/users/gfa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-22T08:09:53Z","updated_at":"2015-01-22T08:09:53Z","closed_at":null,"body":"in our precise servers when logfiles are rotated log-courier keeps them open, it does not matter if i sent sighup to it, it won't release ultil i restart log-courier\r\n\r\n$ ps -ef |grep log-c\r\nroot      5164     1  0 Jan12 ?        00:07:01 /usr/local/sbin/log-courier -config /etc/logstash/logstash-client.conf\r\nroot@ip-58-215-138-115:~# kill -HUP 5164\r\n\r\nroot@ip-58-215-138-115:~# lsof -n -p 5164\r\nCOMMAND    PID USER   FD   TYPE     DEVICE  SIZE/OFF    NODE NAME\r\nlog-couri 5164 root  cwd    DIR        8,1      4096       2 /\r\nlog-couri 5164 root  rtd    DIR        8,1      4096       2 /\r\nlog-couri 5164 root  txt    REG        8,1   6842584 1308590 /usr/local/sbin/log-courier\r\nlog-couri 5164 root  mem    REG        8,1   1811128  931480 /lib/x86_64-linux-gnu/libc-2.15.so\r\nlog-couri 5164 root  mem    REG        8,1    135366  931474 /lib/x86_64-linux-gnu/libpthread-2.15.so\r\nlog-couri 5164 root  mem    REG        8,1    149280  931385 /lib/x86_64-linux-gnu/ld-2.15.so\r\nlog-couri 5164 root    0u   CHR        1,3       0t0    1029 /dev/null\r\nlog-couri 5164 root    1u   CHR      136,3       0t0       6 /dev/pts/3\r\nlog-couri 5164 root    2u   CHR      136,3       0t0       6 /dev/pts/3\r\nlog-couri 5164 root    3u  IPv4  334871615       0t0     TCP 127.0.0.1:1234 (LISTEN)\r\nlog-couri 5164 root    4u  0000        0,9         0    7171 anon_inode\r\nlog-couri 5164 root    5r   REG        8,1  72577442 1049715 /var/log/upstart/nova-api.log.1 (deleted)\r\nlog-couri 5164 root    6r   REG        8,1  74403075 1050759 /var/log/nova/nova-api.log.1 (deleted)\r\nlog-couri 5164 root    7r   REG        8,1  74694666 1053196 /var/log/upstart/nova-api.log.1 (deleted)\r\nlog-couri 5164 root    8r   REG        8,1 934668409 1050824 /var/log/nova/nova-conductor.log.1 (deleted)\r\nlog-couri 5164 root    9r   REG        8,1 937271817 1050801 /var/log/upstart/nova-conductor.log.1 (deleted)\r\nlog-couri 5164 root   10r   REG        8,1    669696 1047404 /var/log/nova/nova-consoleauth.log\r\nlog-couri 5164 root   11r   REG        8,1    927348 1050891 /var/log/upstart/nova-consoleauth.log.1 (deleted)\r\nlog-couri 5164 root   12r   REG        8,1  72296939 1048501 /var/log/nova/nova-api.log.1 (deleted)\r\nlog-couri 5164 root   13r   REG        8,1 937227619 1050495 /var/log/nova/nova-conductor.log.1 (deleted)\r\nlog-couri 5164 root   14r   REG        8,1  72044747 1053904 /var/log/nova/nova-api.log.1 (deleted)\r\nlog-couri 5164 root   15r   REG        8,1    670289 1050863 /var/log/openvswitch/ovs-vswitchd.log.1 \r\n[snip]\r\n\r\nroot@ip-58-215-138-115:~# lc-admin \r\nLog Courier version 1.1.28.gd11a1b4 client\r\n\r\nAttempting connection to tcp:127.0.0.1:1234...\r\nConnected\r\n\r\n> help\r\nAvailable commands:\r\n  reload    Reload configuration\r\n  status    Display the current shipping status\r\n  exit      Exit\r\n> reload\r\nConfiguration reload successful ---> it took some time until finish\r\n> status\r\n\"State: /var/log/nova/nova-api.log (0xc208dcd200)\":\r\n  Status: Running\r\n  Harvester:\r\n    Speed (Lps): 0.00\r\n    Speed (Bps): 0.00\r\n    Processed lines: 0\r\n    Current offset: 110\r\n    Last EOF Offset: 0\r\n    Status: Idle\r\n    Dead timer: 8h16m12s\r\n\"State: /var/log/nova/nova-api.log (Orphan / 0xc208004a20)\":\r\n  Status: Running\r\n  Harvester:\r\n    Speed (Lps): 0.00\r\n    Speed (Bps): 0.00\r\n    Processed lines: 0\r\n    Current offset: 56783231\r\n    Last EOF Offset: 56783119\r\n    Status: Idle\r\n    Dead timer: 0s\r\n\"State: /var/log/nova/nova-api.log (Orphan / 0xc208005920)\":\r\n  Status: Running\r\n  Harvester:\r\n    Speed (Lps): 0.00\r\n    Speed (Bps): 0.00\r\n    Processed lines: 0\r\n    Current offset: 112\r\n    Last EOF Offset: 0\r\n    Status: Idle\r\n    Dead timer: 0s\r\n\"State: /var/log/nova/nova-api.log (Orphan / 0xc208005980)\":\r\n  Status: Running\r\n  Harvester:\r\n    Speed (Lps): 0.00\r\n    Speed (Bps): 0.00\r\n    Processed lines: 0\r\n    Current offset: 112\r\n    Last EOF Offset: 0\r\n    Status: Idle\r\n    Dead timer: 0s\r\n\"State: /var/log/nova/nova-api.log (Orphan / 0xc208d40060)\":\r\n  Status: Running\r\n  Harvester:\r\n    Speed (Lps): 0.00\r\n    Speed (Bps): 0.00\r\n    Processed lines: 0\r\n    Current offset: 112\r\n    Last EOF Offset: 0\r\n    Status: Idle\r\n    Dead timer: 0s\r\n\"State: /var/log/nova/nova-api.log (Orphan / 0xc208d40240)\":\r\n  Status: Running\r\n  Harvester:\r\n    Speed (Lps): 0.00\r\n    Speed (Bps): 0.00\r\n    Processed lines: 0\r\n    Current offset: 112\r\n    Last EOF Offset: 0\r\n    Status: Idle\r\n    Dead timer: 0s\r\n\"State: /var/log/nova/nova-api.log (Orphan / 0xc208d41560)\":\r\n  Status: Running\r\n  Harvester:\r\n    Speed (Lps): 0.00\r\n    Speed (Bps): 0.00\r\n    Processed lines: 0\r\n    Current offset: 112\r\n    Last EOF Offset: 0\r\n    Status: Idle\r\n    Dead timer: 0s\r\n\"State: /var/log/nova/nova-api.log (Orphan / 0xc208d41c20)\":\r\n  Status: Running\r\n  Harvester:\r\n    Speed (Lps): 0.00\r\n    Speed (Bps): 0.00\r\n    Processed lines: 0\r\n    Current offset: 112\r\n    Last EOF Offset: 0\r\n    Status: Idle\r\n    Dead timer: 0s\r\n\"State: /var/log/nova/nova-api.log (Orphan / 0xc208dcc420)\":\r\n  Status: Running\r\n  Harvester:\r\n    Speed (Lps): 0.00\r\n    Speed (Bps): 0.00\r\n    Processed lines: 0\r\n    Current offset: 112\r\n    Last EOF Offset: 0\r\n    Status: Idle\r\n    Dead timer: 0s\r\n\"State: /var/log/nova/nova-api.log (Orphan / 0xc208ee8ae0)\":\r\n  Status: Running\r\n  Harvester:\r\n    Speed (Lps): 0.00\r\n    Speed (Bps): 0.00\r\n    Processed lines: 0\r\n    Current offset: 112\r\n    Last EOF Offset: 0\r\n    Status: Idle\r\n    Dead timer: 0s\r\n\"State: /var/log/nova/nova-api.log (Orphan / 0xc208ee92c0)\":\r\n  Status: Running\r\n  Harvester:\r\n    Speed (Lps): 0.00\r\n    Speed (Bps): 0.00\r\n    Processed lines: 0\r\n    Current offset: 189\r\n    Last EOF Offset: Never\r\n    Status: Alive\r\n\"State: /var/log/nova/nova-cert.log (0xc208d41e00)\":\r\n  Status: Dead\r\n\"State: /var/log/nova/nova-cert.log (Orphan / 0xc208004ba0)\":\r\n  Status: Running\r\n  Harvester:\r\n    Speed (Lps): 0.00\r\n    Speed (Bps): 0.00\r\n    Processed lines: 0\r\n    Current offset: 147\r\n    Last EOF Offset: Never\r\n    Status: Alive\r\n\"State: /var/log/nova/nova-conductor.log (0xc208dcca80)\":\r\n  Status: Running\r\n  Harvester:\r\n    Speed (Lps): 0.00\r\n    Speed (Bps): 0.00\r\n    Processed lines: 0\r\n    Current offset: 1316\r\n    Last EOF Offset: Never\r\n    Status: Alive\r\n\"State: /var/log/nova/nova-conductor.log (Orphan / 0xc208004a80)\":\r\n  Status: Running\r\n  Harvester:\r\n    Speed (Lps): 80.00\r\n    Speed (Bps): 28124.00\r\n    Processed lines: 80\r\n    Current offset: 699161818\r\n    Last EOF Offset: 699160505\r\n    Status: Idle\r\n    Dead timer: 0s\r\n[snip]\r\n\r\nroot@ip-58-215-138-115:~# lsof -n -p 5164\r\nCOMMAND    PID USER   FD   TYPE     DEVICE  SIZE/OFF    NODE NAME\r\nlog-couri 5164 root  cwd    DIR        8,1      4096       2 /\r\nlog-couri 5164 root  rtd    DIR        8,1      4096       2 /\r\nlog-couri 5164 root  txt    REG        8,1   6842584 1308590 /usr/local/sbin/log-courier\r\nlog-couri 5164 root  mem    REG        8,1   1811128  931480 /lib/x86_64-linux-gnu/libc-2.15.so\r\nlog-couri 5164 root  mem    REG        8,1    135366  931474 /lib/x86_64-linux-gnu/libpthread-2.15.so\r\nlog-couri 5164 root  mem    REG        8,1    149280  931385 /lib/x86_64-linux-gnu/ld-2.15.so\r\nlog-couri 5164 root    0u   CHR        1,3       0t0    1029 /dev/null\r\nlog-couri 5164 root    1u   CHR      136,3       0t0       6 /dev/pts/3\r\nlog-couri 5164 root    2u   CHR      136,3       0t0       6 /dev/pts/3\r\nlog-couri 5164 root    3u  IPv4  334871615       0t0     TCP 127.0.0.1:1234 (LISTEN)\r\nlog-couri 5164 root    4u  0000        0,9         0    7171 anon_inode\r\nlog-couri 5164 root    5r   REG        8,1  72577442 1049715 /var/log/upstart/nova-api.log.1 (deleted)\r\nlog-couri 5164 root    6r   REG        8,1  74403075 1050759 /var/log/nova/nova-api.log.1 (deleted)\r\nlog-couri 5164 root    7r   REG        8,1  74694666 1053196 /var/log/upstart/nova-api.log.1 (deleted)\r\nlog-couri 5164 root    8r   REG        8,1 934668409 1050824 /var/log/nova/nova-conductor.log.1 (deleted)\r\nlog-couri 5164 root    9r   REG        8,1 937271817 1050801 /var/log/upstart/nova-conductor.log.1 (deleted)\r\nlog-couri 5164 root   10r   REG        8,1    669899 1047404 /var/log/nova/nova-consoleauth.log\r\nlog-couri 5164 root   11r   REG        8,1    927348 1050891 /var/log/upstart/nova-consoleauth.log.1 (deleted)\r\nlog-couri 5164 root   12r   REG        8,1  72296939 1048501 /var/log/nova/nova-api.log.1 (deleted)\r\nlog-couri 5164 root   13r   REG        8,1 937227619 1050495 /var/log/nova/nova-conductor.log.1 (deleted)\r\nlog-couri 5164 root   14r   REG        8,1  72044747 1053904 /var/log/nova/nova-api.log.1 (deleted)\r\n\r\n\r\nlog-courier -version\r\nLog Courier version 1.1.28.gd11a1b4\r\n\r\nwe have workaround it restarting it every night after logrotate, so is not a big concern for us right now\r\n\r\nthanks anyway for this great software\r\n"}}