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

Broker can't restart with log file on Windows #1080

Closed
lcouz opened this Issue Dec 13, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@lcouz
Copy link

lcouz commented Dec 13, 2018

Hello,
Running on Windows (in service mode) with logging configuration to file : "log_dest file ..." in configuration file, when stop the service, the service can't restart.
By reading the code, in util_mosq.c l.422, "CreateFile" function is called with "CREATE_NEW" parameter.
In cas of an existinf log fille, INVALID_HANDLE_VALUE is returned , this case is not tested in code.
I suggest to use "CREATE_ALWAYS" parameter instead.

Not tested, but problem is probably also present in "application" mode.

@ralight ralight modified the milestones: 1.5.5, 1.5.6 Dec 20, 2018

@big-col

This comment has been minimized.

Copy link

big-col commented Dec 31, 2018

I have the same issue, deleting the current log file enables the mosquitto service to start

lcouz added a commit to lcouz/mosquitto that referenced this issue Jan 7, 2019

FIX eclipse#1080
Fix proposal for : Broker can't restart with log file on Windows eclipse#1080

@lcouz lcouz referenced this issue Jan 7, 2019

Open

FIX #1080 #1

1 of 6 tasks complete
@ralight

This comment has been minimized.

Copy link
Contributor

ralight commented Feb 3, 2019

I've made a change that handles this case for reading an existing file, creating a new file or appending to an existing file. It will be in 1.5.6 soon.

@ralight ralight closed this Feb 3, 2019

ralight added a commit that referenced this issue Feb 8, 2019

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