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

registry rotation on Windows fails #270

Closed
justmara opened this Issue Sep 24, 2014 · 14 comments

Comments

Projects
None yet
@justmara

justmara commented Sep 24, 2014

clean start of logstash-forwarder build from sources as of 23 sept shows this funny error:

2014/09/23 12:35:36.775917 Registrar: precessing 130 events
2014/09/23 12:35:36.776917 registry rotate: rename of .logstash-forwarder to .logstash-forwarder.old - rename .logstash-forwarder .logstash-forwarder.old: The system cannot find the file specified.
2014/09/23 12:35:36.777917 WARNING: (continuing) update of registry returned error: rename .logstash-forwarder .logstash-forwarder.old: The system cannot find the file specified.

And really there is no .logstash-forwarder file, BUT the .logstash-forwarder.new one.
If you manually create this file and start it again, you get new error:

2014/09/23 12:42:23.639208 Registrar: precessing 15 events
2014/09/23 12:42:23.640208 registry rotate: rename of .logstash-forwarder to .logstash-forwarder.old - rename .logstash-forwarder .logstash-forwarder.old: The process cannot access the file because it is being used by another process.
2014/09/23 12:42:23.640208 WARNING: (continuing) update of registry returned error: rename .logstash-forwarder .logstash-forwarder.old: The process cannot access the file because it is being used by another process.

Really? Another process? It is locked by forwarder itself!
And both these error lines keeps spamming stdout every time new events in file found.

@ktodyruik

This comment has been minimized.

Show comment
Hide comment
@ktodyruik

ktodyruik Oct 6, 2014

I'm running logstash-forwarder on windows. I'm seeing this as well. When I stop and restart logstash-forwarder, it also reprocesses the same events. It appears to be saving the offset in .logstash-forwarder.new, but not using it. When I manually copy .logstash-forwarder.new to .logstash-forwarder, it starts from the new offset. Then I'm seeing the same file lock message as described.

ktodyruik commented Oct 6, 2014

I'm running logstash-forwarder on windows. I'm seeing this as well. When I stop and restart logstash-forwarder, it also reprocesses the same events. It appears to be saving the offset in .logstash-forwarder.new, but not using it. When I manually copy .logstash-forwarder.new to .logstash-forwarder, it starts from the new offset. Then I'm seeing the same file lock message as described.

@sooth

This comment has been minimized.

Show comment
Hide comment
@sooth

sooth Nov 12, 2014

I am experiencing this issue as well. Is there a certain flag I need to set at build time for Windows?

sooth commented Nov 12, 2014

I am experiencing this issue as well. Is there a certain flag I need to set at build time for Windows?

@j-maly

This comment has been minimized.

Show comment
Hide comment
@j-maly

j-maly Mar 26, 2015

Seeing this as well. Please update on a fix.

j-maly commented Mar 26, 2015

Seeing this as well. Please update on a fix.

@sledorze

This comment has been minimized.

Show comment
Hide comment
@sledorze

sledorze Apr 2, 2015

Same issue here..

sledorze commented Apr 2, 2015

Same issue here..

@adriaangraas

This comment has been minimized.

Show comment
Hide comment
@adriaangraas

adriaangraas Apr 8, 2015

Also having the same issue. Is somebody aware of a temporary workaround?

adriaangraas commented Apr 8, 2015

Also having the same issue. Is somebody aware of a temporary workaround?

@huksley

This comment has been minimized.

Show comment
Hide comment
@huksley

huksley Apr 9, 2015

Having the same problem. AFAIK fix is in #272 but must be manually merged and compiled.

huksley commented Apr 9, 2015

Having the same problem. AFAIK fix is in #272 but must be manually merged and compiled.

@harryo1968

This comment has been minimized.

Show comment
Hide comment
@harryo1968

harryo1968 May 8, 2015

Hi, sorry to be such a noob. But how can I manually merge and compile using this fix? I can I manually copy the changed lines and recompile?

harryo1968 commented May 8, 2015

Hi, sorry to be such a noob. But how can I manually merge and compile using this fix? I can I manually copy the changed lines and recompile?

@mkuzmin

This comment has been minimized.

Show comment
Hide comment
@mkuzmin

mkuzmin May 8, 2015

@harryo1968 you can always copy files manually, but here is a better approach: https://sethvargo.com/checkout-a-github-pull-request/

mkuzmin commented May 8, 2015

@harryo1968 you can always copy files manually, but here is a better approach: https://sethvargo.com/checkout-a-github-pull-request/

@harryo1968

This comment has been minimized.

Show comment
Hide comment
@harryo1968

harryo1968 May 8, 2015

Awesome! Thanks @mkuzmin !

harryo1968 commented May 8, 2015

Awesome! Thanks @mkuzmin !

@vlaadbrain

This comment has been minimized.

Show comment
Hide comment
@vlaadbrain

vlaadbrain Jul 30, 2015

ping, whats the ETA on fixing this?

vlaadbrain commented Jul 30, 2015

ping, whats the ETA on fixing this?

@jordansissel

This comment has been minimized.

Show comment
Hide comment
@jordansissel

jordansissel Jul 30, 2015

Contributor

there is no ETA at this time.

Contributor

jordansissel commented Jul 30, 2015

there is no ETA at this time.

@suyograo suyograo added the bug label Jul 31, 2015

@radiumx3

This comment has been minimized.

Show comment
Hide comment
@radiumx3

radiumx3 Sep 2, 2015

@jordansissel there is a PR pending with the fix to this, please take a look at it and concider merging maybe ?

radiumx3 commented Sep 2, 2015

@jordansissel there is a PR pending with the fix to this, please take a look at it and concider merging maybe ?

ilidiomartins added a commit to ilidiomartins/logstash-forwarder that referenced this issue Sep 30, 2015

@ruflin

This comment has been minimized.

Show comment
Hide comment
@ruflin

ruflin Oct 6, 2015

This should be fixed in filebeat (next version of logstash-forwarder) with elastic/filebeat#43 and elastic/filebeat#45

ruflin commented Oct 6, 2015

This should be fixed in filebeat (next version of logstash-forwarder) with elastic/filebeat#43 and elastic/filebeat#45

@ruflin

This comment has been minimized.

Show comment
Hide comment
@ruflin

ruflin Oct 7, 2015

As the next release of logstash-forwarder will be filebeat, I will close this issue based on the comment above. In case the issue still exists in filebeat, please reopen or open a new issue directly in the filebeat repo.

ruflin commented Oct 7, 2015

As the next release of logstash-forwarder will be filebeat, I will close this issue based on the comment above. In case the issue still exists in filebeat, please reopen or open a new issue directly in the filebeat repo.

@ruflin ruflin closed this Oct 7, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment