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

Handle file creation and locking for Windows #273

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
6 participants
@sdegroot

sdegroot commented Sep 25, 2014

Due to the use of the 'defer' keyword, file handles were kept open too long. This resulted in the error 'The process cannot access the file because it is being used by another process.'.

Another addition is for opening the file .logstash-forwarder. Initially this file will not exist. The Registar for Windows assumes this file exists. Therefore we explicitly tell the OS to create the file when it doesn't exist yet.

See also https://groups.google.com/forum/#!topic/logstash-users/oFDcoGj8Qtc

Sander de Groot
Handle file creation and locking for Windows
Due to the use of the 'defer' keyword, file handles were kept open too long. This resulted in the error 'The process cannot access the file because it is being used by another process.'.

Another addition is for opening the file .logstash-forwarder. Initially this file will not exist. The Registar for Windows assumes this file exists. Therefore we explicitly tell the OS to create the file when it doesn't exist yet.

See also https://groups.google.com/forum/#!topic/logstash-users/oFDcoGj8Qtc
@sdegroot

This comment has been minimized.

Show comment
Hide comment
@sdegroot

sdegroot Sep 25, 2014

I'm fairly new to golang so please check everything thoroughly!

sdegroot commented Sep 25, 2014

I'm fairly new to golang so please check everything thoroughly!

@driskell

This comment has been minimized.

Show comment
Hide comment
@driskell

driskell Sep 25, 2014

Contributor

The create should be fine to leave out. You remove it in registrar_windows anyway and ignore the error.

Apart from that lolls good, but it duplicates #272

Contributor

driskell commented Sep 25, 2014

The create should be fine to leave out. You remove it in registrar_windows anyway and ignore the error.

Apart from that lolls good, but it duplicates #272

@jordansissel jordansissel added the O(0) label Dec 17, 2014

@Tamerz

This comment has been minimized.

Show comment
Hide comment
@Tamerz

Tamerz Feb 2, 2015

This doesn't seem to be included in the master yet. Is there a reason for this? It appears to work for me.

Tamerz commented Feb 2, 2015

This doesn't seem to be included in the master yet. Is there a reason for this? It appears to work for me.

@toebens

This comment has been minimized.

Show comment
Hide comment
@toebens

toebens Aug 3, 2015

yes it looks like #273 as well as #487 is a duplicate bug fix. this has been fixed with #272 already.
unfortunately however #272 still hasn't made it in the master branch because the pull request was not accepted. actually i do not get it why it hasn't been accepted...in the meantime...

toebens commented Aug 3, 2015

yes it looks like #273 as well as #487 is a duplicate bug fix. this has been fixed with #272 already.
unfortunately however #272 still hasn't made it in the master branch because the pull request was not accepted. actually i do not get it why it hasn't been accepted...in the meantime...

@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