You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After trying to change multiple log settings at once in the MQTT binding, the log4j2.xml file got corrupted.
Here are the settings I tried to change one shot:
After saving and going to check the log viewer, I only had this message and it only appeared when refreshing the web page:
After searching on the web it pointed to a possible log4j2.xml corrupted file and that's exactly what it was. Here is the end of the file, it is not a typo:
<!-- Added by Karaf to prevent debug logging loops, see -->
<!-- https://issues.apache.org/jira/browse/KARAF-5559 -->
<Logger level="WARN" name="org.apache.sshd"/>
<Logger level="INFO" name="org.openhab.persistence.influxdb"/>
<Logger level="INFO" name="org.openhab.io.homekit"/>
<Logger level="TRACE" name="org.openhab.binding.mqtt.generic"/>
</Loggers>
</Configuration>ation>
After correcting the closing tag everything was working fine again.
I tried to reproduce the issue but I did not get it the second time, but I did see that you cannot actually change multiple log settings at once, it only changes one at a time, so this is also a bug since a user, like me, would think after saving and exiting that all changes would be enabled, but no. You actually see it above, only "org.openhab.binding.mqtt.generic" was changed. This issue is maybe linked to the corrupted file.
EDIT:
I managed to reproduce the issue by taking a file I did not edit myself from a backup. There is a difference between the original file and after I edit the file, take a look when I do a cat of the file that becomes corrupted (before it gets corrupted):
And the file after I edit and fix it, nano inserts a newline after the last line which cannot be removed:
It seems that the original file does not have a newline char after the last tag and that seems to cause the broken file issue.
EDIT2:
There is another issue, when you go in the MQTT settings to change the log settings and you don't change any log settings and go back without saving, it says "Changes have not been saved".
The text was updated successfully, but these errors were encountered:
lpn-ch
added
the
bug
An unexpected problem or unintended behavior of the Core
label
Feb 21, 2025
OH 4.3.2 running in a docker
After trying to change multiple log settings at once in the MQTT binding, the log4j2.xml file got corrupted.
Here are the settings I tried to change one shot:
After saving and going to check the log viewer, I only had this message and it only appeared when refreshing the web page:
After searching on the web it pointed to a possible log4j2.xml corrupted file and that's exactly what it was. Here is the end of the file, it is not a typo:
After correcting the closing tag everything was working fine again.
I tried to reproduce the issue but I did not get it the second time, but I did see that you cannot actually change multiple log settings at once, it only changes one at a time, so this is also a bug since a user, like me, would think after saving and exiting that all changes would be enabled, but no. You actually see it above, only "org.openhab.binding.mqtt.generic" was changed. This issue is maybe linked to the corrupted file.
EDIT:
I managed to reproduce the issue by taking a file I did not edit myself from a backup. There is a difference between the original file and after I edit the file, take a look when I do a cat of the file that becomes corrupted (before it gets corrupted):
And the file after I edit and fix it, nano inserts a newline after the last line which cannot be removed:
It seems that the original file does not have a newline char after the last tag and that seems to cause the broken file issue.
EDIT2:
There is another issue, when you go in the MQTT settings to change the log settings and you don't change any log settings and go back without saving, it says "Changes have not been saved".
The text was updated successfully, but these errors were encountered: