Problem running OpenHAB (4.1.1) as a windows service on a Windows 10 VM (Hyper-V)

Hi,

I created a new Windows 10 VM (Client) on my Hyper-V system and installed OpenHAB 4.1.1 strictly regarding the “official” guide (all parameters taken 1:1 from the guide, folders also).

All works fine, after the installation and start OpenHAB via “start.bat”, it was “visible” on the localhost and other client in the network.

Then configured OpenHAB as a windows service (regarding the guide).
After first start of the service, all works fine.

Finally after rebooting the OpenHAB VM the windows service seemly was started, but OpenHAB no longer will be “visible”. All web browsers displaying message “OpenHAB is offline” (on localhost and over network).

What’s the problem ???

I tested to stop the windows service and restarting OpenHAB with “Start.bat” and all is fine ?!
Restarting the service no connection is possible.

Why it only works once upto the Windows PC was rebooted and what can I do ?

Thanx for your support.

Hi,
Welcome to the community! (oddly it says your first post but I see you are member since 2017…)
Double check your java environment variables and make sure they are configured under system and not user.
Make sure JAVA_HOME is defined in system variables not user variables.
When you run OpenHAB as a service it runs as system when you launch from start.bat you are launching under user profile.
If that does not help or are correct you need to review the openhab log to see what error is preventing full startup.
Being on a VM and hyper-v is not going to make any difference.
I have many test systems installs I run on a hyper-v cluster and have OpenHAB running as a service that I test bindings and configurations with and they all work just fine.
Only place you may hit some snags is hyper-v and USB but if you run into that challenge there are some solutions to address that as well.

Curiously today morning OH was accessible.
Yesterday I did some further tests with service configuration (change “running under” from “localservice” to the local administrators credentials) but all not working.

Now, I rebooted the VM again and again OH continuously shows offline.

Checking the OH logs, but I’m not sure if there ist anything to find.
A few minutes ago I completely restarted my Hyper-V Host (due to updates), and after that I started the OH VM (without logging in the local account). But still OH is offline.

Here the relevant extract of the “wrapper.log”:

STATUS | wrapper  | 2024/03/14 13:59:53 | --> Wrapper Started as Service
STATUS | wrapper  | 2024/03/14 13:59:53 | Launching a JVM...
INFO   | jvm 1    | 2024/03/14 13:59:56 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
INFO   | jvm 1    | 2024/03/14 13:59:56 |   Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.
INFO   | jvm 1    | 2024/03/14 13:59:56 | 
INFO   | jvm 1    | 2024/03/14 14:00:05 | 14:00:05.282 [Framework Event Dispatcher: Equinox Container: a384ff41-efbe-4e6e-93b1-0a375e2b52d9] ERROR Events.Framework - FrameworkEvent ERROR
INFO   | jvm 1    | 2024/03/14 14:00:05 | java.util.zip.ZipException: Exception in opening zip file: C:\openHAB\userdata\cache\org.eclipse.osgi\63\0\.cp\lib\geronimo-osgi-locator.jar
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.framework.util.SecureAction.getZipFile(SecureAction.java:356) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.storage.bundlefile.ZipBundleFile.doOpen(ZipBundleFile.java:51) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.storage.bundlefile.CloseableBundleFile.internalOpen(CloseableBundleFile.java:140) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.storage.bundlefile.CloseableBundleFile.lockOpen(CloseableBundleFile.java:78) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.storage.bundlefile.CloseableBundleFile.getEntry(CloseableBundleFile.java:274) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.internal.loader.classpath.ClasspathEntry.loadManifest(ClasspathEntry.java:230) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.internal.loader.classpath.ClasspathEntry.<init>(ClasspathEntry.java:77) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.internal.loader.ModuleClassLoader.createClassPathEntry(ModuleClassLoader.java:267) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.createClassPathEntry(ClasspathManager.java:343) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.getClasspath(ClasspathManager.java:295) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.addStandardClassPathEntry(ClasspathManager.java:213) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.addClassPathEntry(ClasspathManager.java:205) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findClassPathEntry(ClasspathManager.java:188) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.buildClasspath(ClasspathManager.java:166) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.<init>(ClasspathManager.java:94) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.internal.loader.EquinoxClassLoader.<init>(EquinoxClassLoader.java:54) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.internal.loader.BundleLoader.createClassLoaderPrivledged(BundleLoader.java:345) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.internal.loader.BundleLoader.getModuleClassLoader(BundleLoader.java:262) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.internal.framework.EquinoxBundle$1.run(EquinoxBundle.java:653) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.internal.framework.EquinoxBundle$1.run(EquinoxBundle.java:1) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at java.security.AccessController.doPrivileged(AccessController.java:318) ~[?:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.internal.framework.EquinoxBundle.getModuleClassLoader(EquinoxBundle.java:646) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.internal.framework.EquinoxBundle.getResource(EquinoxBundle.java:588) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.apache.servicemix.specs.activation.Activator.register(Activator.java:58) ~[org.apache.servicemix.specs.activation-api-1.2.1-1.2.1_3.jar:1.2.1_3]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.apache.servicemix.specs.locator.Activator.start(Activator.java:70) ~[org.apache.servicemix.specs.activation-api-1.2.1-1.2.1_3.jar:1.2.1_3]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.apache.servicemix.specs.activation.Activator.start(Activator.java:46) ~[org.apache.servicemix.specs.activation-api-1.2.1-1.2.1_3.jar:1.2.1_3]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.internal.framework.BundleContextImpl$2.run(BundleContextImpl.java:818) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.internal.framework.BundleContextImpl$2.run(BundleContextImpl.java:1) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at java.security.AccessController.doPrivileged(AccessController.java:569) ~[?:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:810) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:767) [org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:1032) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:371) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.container.Module.doStart(Module.java:605) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.container.Module.start(Module.java:468) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:1847) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$1$1.execute(EquinoxContainerAdaptor.java:136) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1840) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1783) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1745) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1667) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234) [org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345) [org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | Caused by: java.util.zip.ZipException: Invalid CEN header (invalid extra data field size for tag: 0xbfef at 55)
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at java.util.zip.ZipFile$Source.zerror(ZipFile.java:1762) ~[?:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at java.util.zip.ZipFile$Source.checkExtraFields(ZipFile.java:1282) ~[?:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at java.util.zip.ZipFile$Source.checkAndAddEntry(ZipFile.java:1229) ~[?:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at java.util.zip.ZipFile$Source.initCEN(ZipFile.java:1701) ~[?:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at java.util.zip.ZipFile$Source.<init>(ZipFile.java:1479) ~[?:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at java.util.zip.ZipFile$Source.get(ZipFile.java:1441) ~[?:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:718) ~[?:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at java.util.zip.ZipFile.<init>(ZipFile.java:252) ~[?:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at java.util.zip.ZipFile.<init>(ZipFile.java:181) ~[?:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at java.util.zip.ZipFile.<init>(ZipFile.java:195) ~[?:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.framework.util.SecureAction.getZipFile(SecureAction.java:342) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	... 43 more
INFO   | jvm 1    | 2024/03/14 14:00:05 | 14:00:05.438 [Framework Event Dispatcher: Equinox Container: a384ff41-efbe-4e6e-93b1-0a375e2b52d9] ERROR Events.Framework - FrameworkEvent ERROR
INFO   | jvm 1    | 2024/03/14 14:00:05 | java.util.zip.ZipException: Exception in opening zip file: C:\openHAB\userdata\cache\org.eclipse.osgi\63\0\.cp\lib\geronimo-osgi-locator.jar
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.framework.util.SecureAction.getZipFile(SecureAction.java:356) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.storage.bundlefile.ZipBundleFile.doOpen(ZipBundleFile.java:51) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.storage.bundlefile.CloseableBundleFile.internalOpen(CloseableBundleFile.java:140) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.storage.bundlefile.CloseableBundleFile.lockOpen(CloseableBundleFile.java:78) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.storage.bundlefile.CloseableBundleFile.getEntry(CloseableBundleFile.java:274) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.storage.bundlefile.BundleFile.getResourceURL(BundleFile.java:142) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.internal.loader.classpath.ClasspathEntry.findResource(ClasspathEntry.java:213) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalResourceImpl(ClasspathManager.java:421) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalResourceImpl(ClasspathManager.java:401) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalResource(ClasspathManager.java:372) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalResource(ModuleClassLoader.java:327) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.internal.loader.BundleLoader.findLocalResource(BundleLoader.java:911) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.internal.loader.BundleLoader.findResource(BundleLoader.java:693) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.internal.loader.ModuleClassLoader.getResource(ModuleClassLoader.java:205) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.internal.framework.EquinoxBundle.getResource(EquinoxBundle.java:590) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.apache.servicemix.specs.activation.Activator.register(Activator.java:58) ~[org.apache.servicemix.specs.activation-api-1.2.1-1.2.1_3.jar:1.2.1_3]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.apache.servicemix.specs.locator.Activator.start(Activator.java:70) ~[org.apache.servicemix.specs.activation-api-1.2.1-1.2.1_3.jar:1.2.1_3]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.apache.servicemix.specs.activation.Activator.start(Activator.java:46) ~[org.apache.servicemix.specs.activation-api-1.2.1-1.2.1_3.jar:1.2.1_3]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.internal.framework.BundleContextImpl$2.run(BundleContextImpl.java:818) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.internal.framework.BundleContextImpl$2.run(BundleContextImpl.java:1) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at java.security.AccessController.doPrivileged(AccessController.java:569) ~[?:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:810) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:767) [org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:1032) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:371) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.container.Module.doStart(Module.java:605) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.container.Module.start(Module.java:468) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:1847) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$1$1.execute(EquinoxContainerAdaptor.java:136) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1840) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1783) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1745) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1667) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234) [org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345) [org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | Caused by: java.util.zip.ZipException: Invalid CEN header (invalid extra data field size for tag: 0xbfef at 55)
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at java.util.zip.ZipFile$Source.zerror(ZipFile.java:1762) ~[?:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at java.util.zip.ZipFile$Source.checkExtraFields(ZipFile.java:1282) ~[?:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at java.util.zip.ZipFile$Source.checkAndAddEntry(ZipFile.java:1229) ~[?:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at java.util.zip.ZipFile$Source.initCEN(ZipFile.java:1701) ~[?:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at java.util.zip.ZipFile$Source.<init>(ZipFile.java:1479) ~[?:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at java.util.zip.ZipFile$Source.get(ZipFile.java:1441) ~[?:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:718) ~[?:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at java.util.zip.ZipFile.<init>(ZipFile.java:252) ~[?:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at java.util.zip.ZipFile.<init>(ZipFile.java:181) ~[?:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at java.util.zip.ZipFile.<init>(ZipFile.java:195) ~[?:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	at org.eclipse.osgi.framework.util.SecureAction.getZipFile(SecureAction.java:342) ~[org.eclipse.osgi-3.18.0.jar:?]
INFO   | jvm 1    | 2024/03/14 14:00:05 | 	... 35 more

and here the content of current “openhab.log”:

2024-03-14 14:00:17.592 [INFO ] [org.openhab.core.Activator          ] - Starting openHAB 4.1.1 (build Release Build)
2024-03-14 14:00:18.814 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Time zone set to 'Europe/Berlin'.
2024-03-14 14:00:18.831 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Location set to '53.53335307081589,7.687702774783249'.
2024-03-14 14:00:18.832 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Locale set to 'de_DE'.
2024-03-14 14:00:32.947 [WARN ] [.transport.servlet.ServletController] - Can't find the request for http://192.168.1.10:8080/'s Observer 
2024-03-14 14:00:33.112 [WARN ] [.transport.servlet.ServletController] - Can't find the request for http://192.168.1.10:8080/favicon.ico's Observer 
2024-03-14 14:00:48.347 [INFO ] [.core.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007
2024-03-14 14:00:57.743 [WARN ] [.transport.servlet.ServletController] - Can't find the request for http://openhabvm:8080/rest/'s Observer 
2024-03-14 14:00:58.327 [INFO ] [e.automation.internal.RuleEngineImpl] - Rule engine started.
2024-03-14 14:01:11.823 [WARN ] [.transport.servlet.ServletController] - Can't find the request for http://openhabvm:8080/rest/'s Observer 
2024-03-14 14:02:53.531 [WARN ] [.transport.servlet.ServletController] - Can't find the request for http://openhabvm:8080/rest/'s Observer 
2024-03-14 14:03:07.680 [WARN ] [.transport.servlet.ServletController] - Can't find the request for http://192.168.1.10:8080/rest/auth/token's Observer 
2024-03-14 14:03:07.689 [WARN ] [.transport.servlet.ServletController] - Can't find the request for http://192.168.1.10:8080/rest/auth/logout's Observer 
2024-03-14 14:03:07.729 [WARN ] [.transport.servlet.ServletController] - Can't find the request for http://192.168.1.10:8080/rest/'s Observer 
2024-03-14 14:03:11.911 [WARN ] [.transport.servlet.ServletController] - Can't find the request for http://192.168.1.10:8080/rest/'s Observer 
2024-03-14 14:03:16.895 [WARN ] [.transport.servlet.ServletController] - Can't find the request for http://192.168.1.10:8080/rest/'s Observer 

Is there anything to clarify the reason ?

I did some further tests.

  1. Login to VM console (first time after VM host reboot)
  2. checking OH service => running
  3. checking OH connection in browser (with localhost) => OFFLINE
  4. restarting OH service using “services.msc”
  5. waitng 1-2 minutes
  6. checking OH connection in browser (with localhost) => ONLINE !!!

Why the OH service cannot run correctly without login to console and then restarting the service ???

Hi you should not have to change the credentials that the service runs under (at least I have never had to do that in my configurations) running under local service has always worked just fine as long as all my environment variables are set under the system and not under user .
The only other thing I have ever changed after doing the wrapper create and over writing the default one generated with command and replace with the one from the docs and correcting the path to my openhab install to match where I installed OpenHAB was to change the amount of heap and that was personal preference to have a little more responsiveness and let OpenHAB load fully faster.
The only reasons I could think of off the top of my head for you having to log on to the VM before OpenHAB is accessible would be firewall maybe if you do not have the ports open for all profiles then until you actually log on the default firewall rule is undefined and that defaults to public profile. Then once you log on it switches to private or domain (depends on other factors which one of those it selects. obviously)
Or you have some custom item that wants to access the temp (or network mapped) directory to do some actions and maybe that is not available till you log on.

Ok, firewall ist a good idea.
Which ports and for what application should be opened for all network profiles for successful running OH directly after reboot (w.o. login to console) ?

The environment variables are system variables and all other configuration (incl. wrapper conf) are done regarding the guide (content of wrapper.conf completly replaced and the first entry checked/maintained).

But back to the firewall:
While first access to the new OH installation I got a firewall message for Java and marked “private” and “domain” profiles to give access. Thus the third option not. Perhaps this is the issue ?
I’ll try to find the firewall rule(s) and also checking the missing profile.

I have entry’s for openhab any profile and port 8080 and port 8443
I also have entry’s for Zulu Platform X64 Architecture for Public and Private. and Program allow for the install path of java.exe. one for TCP and one for UDP
These are inbound rules
I have nothing special for outbound rules.
Also if I recall correctly when I installed Java it asked if I wanted to allow access for all users or just current user. I seem to recall that is what drove how the good old windows environment variables got configured.
But since you have confirmed they are all correct we can check that box off as well.
If it turns out you are fighting firewall you could modify the local security policy to default to private profile for undefined.

Firewall is(!) the issue !!

After I removed the OpenHAB VM from my domain (for test) I can reboot as often I want and OH always is accessible without login on console. :clap:

But I will try to reintegrate the VM back to domain and again “playing” with the firewall rules.
Perhaps I find the final solution to have both, OH online and having a domain computer.
Your firewall rule hints can be helpful.

One of my test systems is a windows 10 VM on hyper-v and domain joined. I hesitated to mention domain related challenges because many folks just run workgroup.
You can have the domain profile set also your default for undefined the only thing to remember is domain group policy’s override local group policy’s so you may have to configure at the domain policy level.
The other thing you may run into with it being domain joined is after I think a win 10 version I think it was 1703 or 1809 any way one of the later upgrades MSFT enable their own version of MDNS and when you join a domain it also modifies MDNS and no long behaves correctly for discovery in OpenHAB. I saw this for a couple items like shelly devices and also a few other bindings. So you might want to keep that in mind as well.

Now it seems the issue is solved.

First I cheched the firewall rules, but I only found both rules for Zulu Platform, but nothing for openHAB with ports 8080 and 8443. How they was created on your system ?
Changing the Zulu rules activating for all 3 profiles was not the solution.

But regarding to your hint to change the local scurity settings (with “secpol.msc”) and here especially under “Network List Manager Policies” the points “Undefined Networks” and “Identifying Networks” solved it.
I changed both from Location Type “Not configured” to “privat” and thats all.

Thus, perhaps this is a point to integrate into the tutorial/documentation in case of the windows machine is a domain computer. Of cause most of all using windows without a domain, but other someone can investigate many time to find a solution (like me), which really is simple.

Thanx for your support.