Tried a new installation and starting OH2 as a service on Windows. Unzipped openhab-2.4.0 to c:\controller, started via start_debug.bat, opened browser to localhost:8080 and selected standard installation, then followed the Windows service wrapper installation guide, but I get System error 1067 has occurred.
openhab> feature:install service-wrapper
openhab> wrapper:install --name "openHAB2" --display "Controller" --description "Controller Service"
Creating missing directory: C:\controller\userdata\bin
Creating file: C:\controller\userdata\bin\openHAB2-wrapper.exe
Creating file: C:\controller\userdata\etc\openHAB2-wrapper.conf
Creating file: C:\controller\userdata\bin\openHAB2-service.bat
Creating missing directory: C:\controller\userdata\lib\wrapper
Creating file: C:\controller\userdata\lib\wrapper\wrapper.dll
Creating file: C:\controller\userdata\lib\wrapper\karaf-wrapper.jar
Creating file: C:\controller\userdata\lib\wrapper\karaf-wrapper-main.jar
Setup complete. You may wish to tweak the JVM properties in the wrapper configuration file:
C:\controller\userdata\etc\openHAB2-wrapper.conf
before installing and starting the service.
MS Windows system detected:
To install the service, run:
C:> C:\controller\userdata\bin\openHAB2-service.bat install
Once installed, to start the service run:
C:> net start "openHAB2"
Once running, to stop the service run:
C:> net stop "openHAB2"
Once stopped, to remove the installed the service run:
C:> C:\controller\userdata\bin\openHAB2-service.bat remove
openhab> logout
PS C:\controller> cd userdata\bin
PS C:\controller\userdata\bin> .\openHAB2-service.bat install
wrapper | Controller installed.
C:\controller\userdata\bin> net start "openHAB2"
The Controller service is starting.................
The Controller service could not be started.
A system error has occurred.
System error 1067 has occurred.
The process terminated unexpectedly.
wrapper.log shows
INFO | jvm 5 | 2019/03/19 09:27:15 | Error: Could not find or load main class Files\Zulu\zulu-8.jre.lib.endorsed;C:\Program
ERROR | wrapper | 2019/03/19 09:27:15 | JVM exited while loading the application.
FATAL | wrapper | 2019/03/19 09:27:15 | There were 5 failed launches in a row, each lasting less than 300 seconds. Giving up.
FATAL | wrapper | 2019/03/19 09:27:15 | There may be a configuration problem: please check the logs.
STATUS | wrapper | 2019/03/19 09:27:15 | <-- Wrapper Stopped
Its the Error: Could not find or load main class Files\Zulu\zulu-8.jre.lib.endorsed;C:\Program in the wrapper.log that has me intrigued. Please let me know what info and can provide to troubleshoot.
I copied and pasted your version of the openHAB2-wrapper.conf and it worked! Thank you. Yours looks significantly different that the auto-generated version, for example there is no mention of OPENHAB_HOME=C:\controller.
Hey - if you want to try something experimental… I put together an actual windows installer that includes an openhab service that you don’t need to setup (it starts openhab using the same karaf.bat as the command line and doesn’t require special config setups). As a bonus, you can also setup update/backup schedules as well (and includes a full uninstaller)
Fully experimental but feel free to give it a try …