Starting openHAB as a Service for openHAB 3.0.0.M1

There was a problem creating openHAB service version 3.0.0.M1
There were no problems with version 2.5.9, the service started fine.
Java 11 version installed for openHAB 3.0.0.M1
May need other settings for openHAB2-wrapper.conf ?

Service start error:
Failed to start service “openHAB3”.
System error.
System error 1067.
The process ended unexpectedly.

Please check the folders referenced in wrapper.conf.
Intead of „openhab2“ it‘s just „openhab“ now.

Do you need to replace it with “openHAB” everywhere?


openHAB2-wrapper.conf for Windows Service Installation

openHAB installation dir (Adapt this first setting to your system)


Wrapper Properties


Java Application


Java Parameters"%KARAF_HOME%""%KARAF_BASE%""%KARAF_DATA%""%KARAF_ETC%""%JAVA_HOME%\jre\lib\endorsed;%JAVA_HOME%\lib\endorsed;%KARAF_HOME%\lib\endorsed""%JAVA_HOME%\jre\lib\ext;%JAVA_HOME%\lib\ext;%KARAF_HOME%\lib\ext""%OPENHAB_HOME%""%OPENHAB_HOME%\conf""%OPENHAB_HOME%\runtime""%OPENHAB_HOME%\userdata""%OPENHAB_USERDATA%\logs""%OPENHAB_HOME%\userdata\config""%KARAF_ETC%\""%OPENHAB_LOGDIR%"

Wrapper Logging Properties


Wrapper Windows Properties

wrapper.ntservice.description=openHAB 2 Service

I’ve replace all openHAB2 text with openhab but still getting erroes.

C:\WINDOWS\system32>net start “openhab”
The openhab service is starting…
The openhab service could not be started.

A system error has occurred.

System error 1067 has occurred.

The process terminated unexpectedly.

please read this

It is most likely a wrong Java-Home path …

Unfortunately, this is not the problem. OpenHAB 3 works great if started manually via start.bat.
But the service still does not start.

Its partly a Java 11 problem. it doesn’t like the below in in the wrapper config."%JAVA_HOME%\jre\lib\endorsed;%JAVA_HOME%\lib\endorsed;%KARAF_HOME%\lib\endorsed""%JAVA_HOME%\jre\lib\ext;%JAVA_HOME%\lib\ext;%KARAF_HOME%\lib\ext"

endorsed and ext directories are no longer supported in Java 11.

if you remove the lines then the Windows service will start but then there’s other issues.
The core seems to run but the Web interface fails.
I get the following in the Openhab Log every time i try to access the web interface

2020-10-25 23:02:07.079 [WARN ] [.transport.servlet.ServletController] - Can’t find the request for http://localhost:8080/rest/auth/token’s Observer
2020-10-25 23:02:07.095 [WARN ] [.transport.servlet.ServletController] - Can’t find the request for http://localhost:8080/rest/auth/logout’s Observer
2020-10-25 23:02:07.127 [WARN ] [.transport.servlet.ServletController] - Can’t find the request for http://localhost:8080/rest/ui/tiles’s Observer
2020-10-25 23:02:07.251 [WARN ] [.transport.servlet.ServletController] - Can’t find the request for http://localhost:8080/rest/events/states’s Observer
2020-10-25 23:02:07.251 [WARN ] [.transport.servlet.ServletController] - Can’t find the request for http://localhost:8080/rest/items’s Observer
2020-10-25 23:02:07.267 [WARN ] [.transport.servlet.ServletController] - Can’t find the request for http://localhost:8080/rest/'s Observer

haven’t go much further than that but are still trying…

Ok Guys, I got it working.

A few minor changes to the Wrapper config file in Userdata/etc

1. Totally remove the below lines."%JAVA_HOME%\jre\lib\endorsed;%JAVA_HOME%\lib\endorsed;%KARAF_HOME%\lib\endorsed""%JAVA_HOME%\jre\lib\ext;%JAVA_HOME%\lib\ext;%KARAF_HOME%\lib\ext"

2. Add the belows lines under #Java Application.\lib\jdk9plus\*.jar\lib\endorsed\*.jar

You probably dont need the Endorsed path (Mine worked without it) but it doesn’t hurt.
I also renumbered the parameters to account for the 2 lines I removed.

I’m no Java expert but this worked for me.

I’ve included my modified wrapper config below.

openHAB-wrapper.txt (2.9 KB)

1 Like

Perfect - That worked for me. Thank you.

1 Like

@Keith_Irving - Can you give more details on the location / name of the config file? Thanks :slight_smile:

The exact path depends on where you’ve got OpenHab stored but mine is C:\OpenHab\userdata\etc
The Config file is openHAB-wrapper.conf

You, of course, need to have done Starting OpenHab as a Service as per before doing any changes I have made.

Under Linux there are environment variables set to define the areas where OH looks for different files.
I would assume that is also the case for Windows. So checking for the environment variables should help to identify the location.

Thanks @Keith_Irving This should be then var/lib/openhab/etc/ within my hassle free openHABian installation. Nevertheless this config file does not exist in my folder. As I have the same issues this could have solved it. Strange.

Guys… This is for running OpenHab as a service ON WINDOWS!!..Not Linux

There is no Environment variable unless you manually set one. (as the wrapper config file does)
The OpenHabian problem , being linux , would be a totally different issue…

@Keith_Irving Ok got it. Nevertheless I have the same issue when starting OH3:

[.transport.servlet.ServletController] - Can't find the request for http://...

My OH3 stable version in Docker gives the same error messages at starting. What can this be?

I’m not 100% sure, but in my opinion, these warnings appear when I open the basicUI.

2021-01-14 12:28:48.931 [WARN ] [.transport.servlet.ServletController] - Can't find the request for's Observer

How you’ve solved it?