{"action":"created","issue":{"url":"https://api.github.com/repos/mozilla-services/heka/issues/1020","repository_url":"https://api.github.com/repos/mozilla-services/heka","labels_url":"https://api.github.com/repos/mozilla-services/heka/issues/1020/labels{/name}","comments_url":"https://api.github.com/repos/mozilla-services/heka/issues/1020/comments","events_url":"https://api.github.com/repos/mozilla-services/heka/issues/1020/events","html_url":"https://github.com/mozilla-services/heka/issues/1020","id":40023247,"number":1020,"title":"Log rotating fails on Windows when using heka LogstreamerInput","user":{"login":"majj","id":543810,"avatar_url":"https://avatars.githubusercontent.com/u/543810?v=3","gravatar_id":"","url":"https://api.github.com/users/majj","html_url":"https://github.com/majj","followers_url":"https://api.github.com/users/majj/followers","following_url":"https://api.github.com/users/majj/following{/other_user}","gists_url":"https://api.github.com/users/majj/gists{/gist_id}","starred_url":"https://api.github.com/users/majj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/majj/subscriptions","organizations_url":"https://api.github.com/users/majj/orgs","repos_url":"https://api.github.com/users/majj/repos","events_url":"https://api.github.com/users/majj/events{/privacy}","received_events_url":"https://api.github.com/users/majj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/mozilla-services/heka/milestones/12","html_url":"https://github.com/mozilla-services/heka/milestones/1.0","labels_url":"https://api.github.com/repos/mozilla-services/heka/milestones/12/labels","id":820135,"number":12,"title":"1.0","description":"Heka 1.0 release","creator":{"login":"rafrombrc","id":151364,"avatar_url":"https://avatars.githubusercontent.com/u/151364?v=3","gravatar_id":"","url":"https://api.github.com/users/rafrombrc","html_url":"https://github.com/rafrombrc","followers_url":"https://api.github.com/users/rafrombrc/followers","following_url":"https://api.github.com/users/rafrombrc/following{/other_user}","gists_url":"https://api.github.com/users/rafrombrc/gists{/gist_id}","starred_url":"https://api.github.com/users/rafrombrc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rafrombrc/subscriptions","organizations_url":"https://api.github.com/users/rafrombrc/orgs","repos_url":"https://api.github.com/users/rafrombrc/repos","events_url":"https://api.github.com/users/rafrombrc/events{/privacy}","received_events_url":"https://api.github.com/users/rafrombrc/received_events","type":"User","site_admin":false},"open_issues":20,"closed_issues":11,"state":"open","created_at":"2014-10-09T17:24:21Z","updated_at":"2015-09-23T16:55:00Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2014-08-12T04:13:12Z","updated_at":"2016-04-21T22:46:00Z","closed_at":null,"body":"Config:\r\n\r\n[client_log]\r\ntype = \"LogstreamerInput\"\r\nrescan_interval  = \"5s\"\r\nlog_directory = \"E:\\\\mabodev\\\\mabo.io\\\\py\\\\heka\"\r\nfile_match = 'heka_tcp\\.log\\.?(?P<Seq>\\d*)'\r\npriority = [\"^Seq\"]\r\n\r\n===================\r\nError :\r\n\r\nTraceback (most recent call last):\r\n  File \"C:\\Python27\\lib\\site-packages\\logbook\\handlers.py\", line 214, in handle\r\n    self.emit(record)\r\n  File \"C:\\Python27\\lib\\site-packages\\logbook\\handlers.py\", line 775, in emit\r\n    self.perform_rollover()\r\n  File \"C:\\Python27\\lib\\site-packages\\logbook\\handlers.py\", line 767, in perform_rollover\r\n    rename(self._filename, self._filename + '.1')\r\n  File \"C:\\Python27\\lib\\site-packages\\logbook\\helpers.py\", line 159, in rename\r\n    os.rename(src, dst)\r\nWindowsError: [Error 32] The process cannot access the file because it is being used by another process\r\n\r\nIs there something  wrong in my configuration?"},"comment":{"url":"https://api.github.com/repos/mozilla-services/heka/issues/comments/213148558","html_url":"https://github.com/mozilla-services/heka/issues/1020#issuecomment-213148558","issue_url":"https://api.github.com/repos/mozilla-services/heka/issues/1020","id":213148558,"user":{"login":"justenwalker","id":222027,"avatar_url":"https://avatars.githubusercontent.com/u/222027?v=3","gravatar_id":"","url":"https://api.github.com/users/justenwalker","html_url":"https://github.com/justenwalker","followers_url":"https://api.github.com/users/justenwalker/followers","following_url":"https://api.github.com/users/justenwalker/following{/other_user}","gists_url":"https://api.github.com/users/justenwalker/gists{/gist_id}","starred_url":"https://api.github.com/users/justenwalker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justenwalker/subscriptions","organizations_url":"https://api.github.com/users/justenwalker/orgs","repos_url":"https://api.github.com/users/justenwalker/repos","events_url":"https://api.github.com/users/justenwalker/events{/privacy}","received_events_url":"https://api.github.com/users/justenwalker/received_events","type":"User","site_admin":false},"created_at":"2016-04-21T22:45:59Z","updated_at":"2016-04-21T22:45:59Z","body":"Seems like this is still a problem on the latest `dev` branch. Any chance of this being fixed?\r\n\r\nI think there is an underlying limitation in Golang that it does not pass FILE_SHARE_DELETE access mode... This make any log rolling method fail to rename files being watched by Heka logstreamer.\r\n\r\nSee:\r\n- [CR 8203043](https://codereview.appspot.com/8203043/)\r\n- [SO Question](http://stackoverflow.com/questions/23897174/is-it-possible-to-open-a-file-allowing-another-processes-to-delete-this-file)"}}