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
Windows log file locked which prevents debugging #515
Comments
I got the same issue, too. Anyone can help? |
I´m having the same issue. |
I also have same issue. Please help |
You will have to modify the SECURITY_DESCRIPTOR in util_mosq.c to grant relevant access. For easier access to the log file during testing, I set restrict_read to false in mqtt3_log_init, ie change
to
This gives me a 'regular' log file I can tail, open in Notepad and reload etc. |
The log file issue was introduced by the fix for CVE-2017-9868 which points out that the mosquitto.db file was being created with world readable permissions. The fix should have applied to the creation of new files only and should not attempt to overwrite the security descriptors of existing files. In fact the patched fails when attempting to open any file in "append" mode (such as the log file) so only the first run succeeds and subsequent runs silently fail. |
I´m having the same issue. |
Same for me. Being able to read the file at any time would make things easier. |
This change means that users with the appropriate security permissions can open the log file for reading at the same time that it is being written. Closes eclipse#515.
This change means that users with the appropriate security permissions can open the log file for reading at the same time that it is being written. Closes #515.
Running on Windows 10 interactively, not as a service. Turned on logging parameter as follows:
log_dest file C:\Program Files (x86)\mosquitto\mosquitto.log
Then started mosquitto. Two problems:
The log file is created but cannot be read using notepad whilst mosquitto is running - I get an error: 'the process cannot access the file because it is being used by another process'. This means there is no way to see what mosquitto is currently doing - you have to stop it in order to read the log file it is producing.
After killing mosquitto via CTRL-C, it cannot be started again and prints out the following message:
'Error: Unable to open log file C:\Program Files (x86)\mosquitto\mosquitto.log for writing'. After I delete the log file manually, mosquitto can be started.
The text was updated successfully, but these errors were encountered: