openHAB 4.2 Milestone discussion

The fix to the upstream Jollyday library and subsequent upgrade of the library in OH happened after M3. But it is in the snapshots now.

2 Likes

I had some trouble in M4 with the systemInfo binding. Needed to delete the old thing and scan again, then relink items. Maybe just me, but from the release notes it appears the default thing name changed and it didnā€™t like the old one. All was fine on M3

See [systeminfo] Handler factory not found Ā· Issue #16965 Ā· openhab/openhab-addons Ā· GitHub

1 Like

Hello all,

getting this warning

[INFO ] [aml.internal.YamlModelRepositoryImpl] - Adding YAML model automation/js/node_modules/@jamescoyle/vue-icon/pnpm-lock
 [WARN ] [aml.internal.YamlModelRepositoryImpl] - Version is missing or not a number in model automation/js/node_modules/@jamescoyle/vue-icon/pnpm-lock. Ignoring it.

oh-input sendButton location style changed. On older Milestone sendButton is align with input. Now isnā€™t not.

- component: oh-input
  config:
    defaultValue: =items['METEO_Chuva_delay'].state
    disabled: =items.System_Admin.state=='ON'?false:true
    info: Delay (h)
    inputmode: numeric
    item: METEO_Chuva_delay_time
    max: 999
    min: 1
    outline: false
    resizable: true
    sendButton: true
    step: 1
    style:
      --f7-input-bg-color: "#ededed"
      --f7-input-text-color: black
      margin-left: 15px
      width: 75px
    type: number
    validate: true

imagem

@J-N-K : would the reason be we are now searching YAML files in any conf directory ?

Maybe we should restrict the search by ignoring the automation folder ?
Maybe a filter here ?

Since OH4.2M4

I followed the tutorial Displaying the weather forecast with charts (OpenWeatherMap) - #5 by florian-h05

created a thing

Bridge openweathermap:weather-api:api "OpenWeatherMap Account" [apiVersion="3.0", apikey="apikey", language="de"] {
    Thing weather-and-forecast smarthome "Smarthome Weather And Forecast" [location="mylocationis hidden"]
}

than created items

Number:Temperature    OneCall_Forecast_Hourly_Temperature                             "Temperatur [%.1f Ā°C]"                     <temperature>  (gOWM_TimeSeries)  {channel="openweathermap:weather-and-forecast:api:smarthome:forecastHourly#temperature"}

but see in the ui unlinked item (see attached) I than thought to change it to a ui created thing and changed the item to

Number:Temperature    OneCall_Forecast_Hourly_Temperature                             "Temperatur [%.1f Ā°C]"                     <temperature>  (gOWM_TimeSeries)  {channel="openweathermap:weather-and-forecast:456c607133:f56a6adab0:forecastHourly#temperature"}

Now I see to unlinked channels see attached picturesā€¦
the old link is only deleted if i clean the cache.


How can I configure the openweather thing correctly?

Use the UI to configure the thing ā€¦

I have done both but both not working

Use the proper thing type. The one having time series is ā€œonecallā€ not ā€œweather-and-forecastā€.

1 Like

thanks for the hintā€¦

But now I still see the old link see attached picture

I just updated to M4. Everything seems to run.
With the start I get this error:

2024-06-30 19:53:56.878 [ERROR] [aml.internal.YamlModelRepositoryImpl] - bundle org.openhab.core.model.yaml:4.2.0.M4 (217)[org.openhab.core.model.yaml.internal.YamlModelRepositoryImpl(246)] : Error during instantiation of the implementation object

java.lang.reflect.InvocationTargetException: null

	at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]

	at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) ~[?:?]

	at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]

	at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?]

	at java.lang.reflect.Constructor.newInstance(Constructor.java:480) ~[?:?]

	at org.apache.felix.scr.impl.inject.internal.ComponentConstructorImpl.newInstance(ComponentConstructorImpl.java:326) ~[bundleFile:?]

	at org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:286) [bundleFile:?]

	at org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:115) [bundleFile:?]

	at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:1002) [bundleFile:?]

	at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:975) [bundleFile:?]

	at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:776) [bundleFile:?]

	at org.apache.felix.scr.impl.manager.AbstractComponentManager.enableInternal(AbstractComponentManager.java:674) [bundleFile:?]

	at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:437) [bundleFile:?]

	at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.enableComponents(ConfigurableComponentHolder.java:671) [bundleFile:?]

	at org.apache.felix.scr.impl.BundleComponentActivator.initialEnable(BundleComponentActivator.java:310) [bundleFile:?]

	at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:593) [bundleFile:?]

	at org.apache.felix.scr.impl.Activator.access$200(Activator.java:74) [bundleFile:?]

	at org.apache.felix.scr.impl.Activator$ScrExtension.start(Activator.java:460) [bundleFile:?]

	at org.apache.felix.scr.impl.AbstractExtender.createExtension(AbstractExtender.java:196) [bundleFile:?]

	at org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:169) [bundleFile:?]

	at org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:49) [bundleFile:?]

	at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:488) [osgi.core-8.0.0.jar:?]

	at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:420) [osgi.core-8.0.0.jar:?]

	at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232) [osgi.core-8.0.0.jar:?]

	at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:450) [osgi.core-8.0.0.jar:?]

	at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:949) [org.eclipse.osgi-3.18.0.jar:?]

	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234) [org.eclipse.osgi-3.18.0.jar:?]

	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:151) [org.eclipse.osgi-3.18.0.jar:?]

	at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:229) [org.eclipse.osgi-3.18.0.jar:?]

	at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:138) [org.eclipse.osgi-3.18.0.jar:?]

	at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:130) [org.eclipse.osgi-3.18.0.jar:?]

	at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:217) [org.eclipse.osgi-3.18.0.jar:?]

	at org.eclipse.osgi.container.Module.publishEvent(Module.java:499) [org.eclipse.osgi-3.18.0.jar:?]

	at org.eclipse.osgi.container.Module.start(Module.java:486) [org.eclipse.osgi-3.18.0.jar:?]

	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:1847) [org.eclipse.osgi-3.18.0.jar:?]

	at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$1$1.execute(EquinoxContainerAdaptor.java:136) [org.eclipse.osgi-3.18.0.jar:?]

	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1840) [org.eclipse.osgi-3.18.0.jar:?]

	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1783) [org.eclipse.osgi-3.18.0.jar:?]

	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1745) [org.eclipse.osgi-3.18.0.jar:?]

	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1667) [org.eclipse.osgi-3.18.0.jar:?]

	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1) [org.eclipse.osgi-3.18.0.jar:?]

	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234) [org.eclipse.osgi-3.18.0.jar:?]

	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345) [org.eclipse.osgi-3.18.0.jar:?]

Caused by: java.io.UncheckedIOException: java.nio.file.AccessDeniedException: /etc/openhab/_infdb/20240630

	at java.nio.file.FileTreeIterator.fetchNextIfNeeded(FileTreeIterator.java:87) ~[?:?]

	at java.nio.file.FileTreeIterator.hasNext(FileTreeIterator.java:103) ~[?:?]

	at java.util.Iterator.forEachRemaining(Iterator.java:132) ~[?:?]

	at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1845) ~[?:?]

	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]

	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]

	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[?:?]

	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[?:?]

	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]

	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596) ~[?:?]

	at org.openhab.core.model.yaml.internal.YamlModelRepositoryImpl.<init>(YamlModelRepositoryImpl.java:102) ~[?:?]

	... 43 more

Caused by: java.nio.file.AccessDeniedException: /etc/openhab/_infdb/20240630

	at sun.nio.fs.UnixException.translateToIOException(UnixException.java:90) ~[?:?]

	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106) ~[?:?]

	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) ~[?:?]

	at sun.nio.fs.UnixFileSystemProvider.newDirectoryStream(UnixFileSystemProvider.java:440) ~[?:?]

	at java.nio.file.Files.newDirectoryStream(Files.java:482) ~[?:?]

	at java.nio.file.FileTreeWalker.visit(FileTreeWalker.java:301) ~[?:?]

	at java.nio.file.FileTreeWalker.next(FileTreeWalker.java:374) ~[?:?]

	at java.nio.file.FileTreeIterator.fetchNextIfNeeded(FileTreeIterator.java:83) ~[?:?]

	at java.nio.file.FileTreeIterator.hasNext(FileTreeIterator.java:103) ~[?:?]

	at java.util.Iterator.forEachRemaining(Iterator.java:132) ~[?:?]

	at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1845) ~[?:?]

	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]

	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]

	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[?:?]

	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[?:?]

	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]

	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596) ~[?:?]

	at org.openhab.core.model.yaml.internal.YamlModelRepositoryImpl.<init>(YamlModelRepositoryImpl.java:102) ~[?:?]

	... 43 more

In the weekend i updated two systems to M4 and after the updated the UI several time stopped responding.
I had to restart the openhab service to restoreā€¦
Now im very busy so i dowgraded to M3 and and the UI works fine.
Maybe in next days i will try again.
Nobody noticed similar issues?

Yesterday I updated my OH from M2 to M4 (updated all JS scripts to use new persistence api) and today I noticed that one of my rules is failing.

The persistence function item.persistence.deltaSince(ts) does return null now, which perfectly worked on previous versions.

I did some tests and it seems it is failing only on group item with sum aggregation function and it works without problems for regular number item.

Here is a test javascript that can reproduce the problem:

var testIt = (itm, hrs, ts) => {
  console.log("---------- persistence test for item '%s' ------------", itm);

  v = items.getItem(itm).persistence.sumSince(ts);
  console.log("sum since now - %s hours: %s", hrs, v.numericState);

  v = items.getItem(itm).persistence.countSince(ts);
  console.log("count since now - %s hours: %s", hrs, v);

  v = items.getItem(itm).persistence.deltaSince(ts);
  console.log("delta since now - %s hours: %s", hrs, v.numericState);
}

var hrs = 5;
var ts = time.toZDT().minusHours(hrs);

testIt("ShellyCerpadloSpotreba_Den", hrs, ts); // ShellyCerpadloSpotreba_Den is of type Number:Energy
testIt("DumSpotrebaDen", hrs, ts); // DumSpotrebaDen is Group (Number:Energy) with sum aggregation function

which results into this console output:

2024-07-04 09:26:08.805 [INFO ] [nhab.automation.script.ui.scratchpad] - ---------- persistence test for item 'ShellyCerpadloSpotreba_Den' ------------
2024-07-04 09:26:08.901 [INFO ] [nhab.automation.script.ui.scratchpad] - sum since now - 5 hours: 18507.761
2024-07-04 09:26:09.003 [INFO ] [nhab.automation.script.ui.scratchpad] - count since now - 5 hours: 322
2024-07-04 09:26:09.009 [INFO ] [nhab.automation.script.ui.scratchpad] - delta since now - 5 hours: 99.275
2024-07-04 09:26:09.011 [INFO ] [nhab.automation.script.ui.scratchpad] - ---------- persistence test for item 'DumSpotrebaDen' ------------
2024-07-04 09:26:09.122 [INFO ] [nhab.automation.script.ui.scratchpad] - sum since now - 5 hours: 601.5585
2024-07-04 09:26:09.217 [INFO ] [nhab.automation.script.ui.scratchpad] - count since now - 5 hours: 300
2024-07-04 09:26:09.227 [ERROR] [omation.script.javascript.scratchpad] - Failed to execute script: TypeError: Cannot get property "numericState" of null
        at <js>.testIt(<eval>:12)
        at <js>.:program(<eval>:19)
        at org.graalvm.polyglot.Context.eval(Context.java:399)
        at com.oracle.truffle.js.scriptengine.GraalJSScriptEngine.eval(GraalJSScriptEngine.java:458)
        at com.oracle.truffle.js.scriptengine.GraalJSScriptEngine.eval(GraalJSScriptEngine.java:426)
        ... 75 more
2024-07-04 09:26:09.228 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'scratchpad' failed: org.graalvm.polyglot.PolyglotException: TypeError: Cannot get property "numericState" of null

I think it is the same issue like it is described here. Have a look at the code changes:

Iā€™ve already changed it to use new persistence api:

.history.deltaSince(ts) changed to .persistence.deltaSince(ts)

and it works properly for number item, but it stopped working for group item after update to M4.

It looks like this could be fixed by this PR which was merged after M4:

You could switch to the snapshot version to verify.

1 Like

I tried to fix your issue regarding YAML parsing. Let us know if this is really fixed in coming 4.2 RC1.

@milo : you will no more have log about YAML files being in automation sub-folder.

2 Likes

@Lolodomo, @J-N-K - during startup of RC1 I observed this:

2024-07-05 20:17:16.162 [ERROR] [aml.internal.YamlModelRepositoryImpl] - bundle org.openhab.core.model.yaml:4.2.0.RC1 (217)[org.openhab.core.model.yaml.internal.YamlModelRepositoryImpl(168)] : Error during instantiation of the implementation object
java.lang.reflect.InvocationTargetException: null
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) ~[?:?]
        at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
        at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?]
        at java.lang.reflect.Constructor.newInstance(Constructor.java:480) ~[?:?]
        at org.apache.felix.scr.impl.inject.internal.ComponentConstructorImpl.newInstance(ComponentConstructorImpl.java:326) ~[?:?]
        at org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:286) ~[?:?]
        at org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:115) ~[?:?]
        at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:1002) ~[?:?]
        at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:975) ~[?:?]
        at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:776) ~[?:?]
        at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1274) ~[?:?]
        at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1225) ~[?:?]
        at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1232) ~[?:?]
        at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1152) ~[?:?]
        at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:959) ~[?:?]
        at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:895) ~[?:?]
        at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1184) ~[?:?]
        at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:116) ~[?:?]
        at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:123) ~[org.eclipse.osgi-3.18.0.jar:?]
        at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:961) ~[org.eclipse.osgi-3.18.0.jar:?]
        at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234) ~[org.eclipse.osgi-3.18.0.jar:?]
        at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:151) ~[org.eclipse.osgi-3.18.0.jar:?]
        at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:937) ~[org.eclipse.osgi-3.18.0.jar:?]
        at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:874) ~[org.eclipse.osgi-3.18.0.jar:?]
        at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:141) ~[org.eclipse.osgi-3.18.0.jar:?]
        at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:262) ~[org.eclipse.osgi-3.18.0.jar:?]
        at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:500) ~[org.eclipse.osgi-3.18.0.jar:?]
        at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:519) ~[org.eclipse.osgi-3.18.0.jar:?]
        at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:1047) ~[org.eclipse.osgi-3.18.0.jar:?]
        at org.openhab.core.internal.service.WatchServiceImpl.registerWatchService(WatchServiceImpl.java:156) ~[?:?]
        at java.util.concurrent.CompletableFuture$UniRun.tryFire(CompletableFuture.java:787) [?:?]
        at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510) [?:?]
        at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1810) [?:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) [?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) [?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
        at java.lang.Thread.run(Thread.java:840) [?:?]
Caused by: java.io.UncheckedIOException: java.nio.file.AccessDeniedException: /etc/openhab/.git
        at java.nio.file.FileTreeIterator.fetchNextIfNeeded(FileTreeIterator.java:87) ~[?:?]
        at java.nio.file.FileTreeIterator.hasNext(FileTreeIterator.java:103) ~[?:?]
        at java.util.Iterator.forEachRemaining(Iterator.java:132) ~[?:?]
        at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1845) ~[?:?]
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]
        at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[?:?]
        at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[?:?]
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
        at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596) ~[?:?]
        at org.openhab.core.model.yaml.internal.YamlModelRepositoryImpl.<init>(YamlModelRepositoryImpl.java:103) ~[?:?]
        ... 40 more
Caused by: java.nio.file.AccessDeniedException: /etc/openhab/.git
        at sun.nio.fs.UnixException.translateToIOException(UnixException.java:90) ~[?:?]
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106) ~[?:?]
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) ~[?:?]
        at sun.nio.fs.UnixFileSystemProvider.newDirectoryStream(UnixFileSystemProvider.java:440) ~[?:?]
        at java.nio.file.Files.newDirectoryStream(Files.java:482) ~[?:?]
        at java.nio.file.FileTreeWalker.visit(FileTreeWalker.java:301) ~[?:?]
        at java.nio.file.FileTreeWalker.next(FileTreeWalker.java:374) ~[?:?]
        at java.nio.file.FileTreeIterator.fetchNextIfNeeded(FileTreeIterator.java:94) ~[?:?]
        at java.nio.file.FileTreeIterator.hasNext(FileTreeIterator.java:103) ~[?:?]
        at java.util.Iterator.forEachRemaining(Iterator.java:132) ~[?:?]
        at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1845) ~[?:?]
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]
        at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[?:?]
        at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[?:?]
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
        at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596) ~[?:?]
        at org.openhab.core.model.yaml.internal.YamlModelRepositoryImpl.<init>(YamlModelRepositoryImpl.java:103) ~[?:?]
        ... 40 more

I have a .git directory with these permissions:

openhabian@openhabian:/etc/openhab $ ll -la | grep git
drwx-wxr-x   8 openhabian openhab 4.0K Jul  5 20:09 .git/
-rw-rw-r--   1 openhabian openhab    0 Jul 17  2023 .gitignore

My opinion is that there should be no files that are not accessible for openhab in the openhab conf directory. Maybe you can set g+r on the directory and see if that helps. If we want to fix it in code then itā€™s not a one-liner. A solution like Fwd: Files.walk() is unusable because of AccessDeniedException or java - How to ignore AccessDeniedExceptions when using Files.walkFileTree? - Stack Overflow should be implemented.

Edit I can gibt it a try tomorrow, but I wonder why these issues have not been found earlier.

3 Likes