openhab / openhab-distro

The binary distribution of openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.3k stars 391 forks source link

Exception when using log in console (unrecognized configuration) #1411

Closed lolodomo closed 4 months ago

lolodomo commented 2 years ago

This is apparently relative to unrecognized configuration (but I changed nothing).

openhab> log:set DEBUG org.openhab.binding.sonos
14:14:47.663 [Karaf ssh console user openhab] ERROR org.apache.karaf.shell.support.ShellUtil - Exception caught while executing command
java.lang.IllegalStateException: Unrecognized configuration
        at org.apache.karaf.log.core.internal.LogServiceImpl.getDelegate(LogServiceImpl.java:63) ~[?:?]
        at org.apache.karaf.log.core.internal.LogServiceImpl.setLevel(LogServiceImpl.java:106) ~[?:?]
        at org.apache.karaf.log.command.SetLogLevel.execute(SetLogLevel.java:48) ~[?:?]
        at org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:84) ~[?:?]
        at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:68) ~[?:?]
        at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:86) ~[?:?]
        at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:599) ~[?:?]
        at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:526) ~[?:?]
        at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:415) ~[?:?]
        at org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:416) ~[?:?]
        at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229) ~[?:?]
        at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59) ~[?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
        at java.lang.Thread.run(Thread.java:834) [?:?]
Error executing command: Unrecognized configuration

for a command log:tail, it shows the first lines and then quickly fails:

14:10:04.203 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Date' changed from 2022-08-08T14:09:04.195+0200 to 2022-08-08T14:10:04.196+0200
14:14:53.810 [Karaf ssh console user openhab] ERROR org.apache.karaf.shell.support.ShellUtil - Exception caught while executing command
java.lang.IllegalStateException: Unrecognized configuration
        at org.apache.karaf.log.core.internal.LogServiceImpl.getDelegate(LogServiceImpl.java:63) ~[?:?]
        at org.apache.karaf.log.core.internal.LogServiceImpl.getLevel(LogServiceImpl.java:81) ~[?:?]
        at org.apache.karaf.log.command.LogTail$LogServiceTracker.addingService(LogTail.java:94) ~[?:?]
        at org.apache.karaf.log.command.LogTail$LogServiceTracker.addingService(LogTail.java:76) ~[?:?]
        at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:943) ~[osgi.core-7.0.0.jar:?]
        at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:871) ~[osgi.core-7.0.0.jar:?]
        at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256) ~[osgi.core-7.0.0.jar:?]
        at org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183) ~[osgi.core-7.0.0.jar:?]
        at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:321) ~[osgi.core-7.0.0.jar:?]
        at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:264) ~[osgi.core-7.0.0.jar:?]
        at org.apache.karaf.log.command.LogTail.execute(LogTail.java:54) ~[?:?]
        at org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:84) ~[?:?]
        at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:68) ~[?:?]
        at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:86) ~[?:?]
        at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:599) ~[?:?]
        at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:526) ~[?:?]
        at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:415) ~[?:?]
        at org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:416) ~[?:?]
        at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229) ~[?:?]
        at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59) ~[?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
        at java.lang.Thread.run(Thread.java:834) [?:?]
Error executing command: Unrecognized configuration

I am running snapshot 2970.

lolodomo commented 2 years ago

I just installed snapshot from yesterday (3038) and I can't reproduce the problem. @wborn @J-N-K : was it a known issue in snapshot 2970 (which was a build just before or just after release of v3.3) ?

J-N-K commented 2 years ago

I have never seen this exception. I don't think anything has changed here.

wborn commented 2 years ago

I've also never seen it, maybe it has a similar root cause as your other issue https://github.com/openhab/openhab-distro/issues/1285.

lolodomo commented 4 months ago

I believe I did not encountered this issue since a very long time.