11191
(Иван Гаряев)
October 23, 2020, 9:57am
1
Hello!
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.
hmerk
(Hans-Jörg Merk)
October 23, 2020, 10:01am
2
Please check the folders referenced in wrapper.conf.
Intead of „openhab2“ it‘s just „openhab“ now.
11191
(Иван Гаряев)
October 23, 2020, 10:15am
3
Do you need to replace it with “openHAB” everywhere?
Summary
openHAB2-wrapper.conf for Windows Service Installation
openHAB installation dir (Adapt this first setting to your system)
set.default.OPENHAB_HOME=C:\openhab-3.0.0.M1
Wrapper Properties
set.default.OPENHAB_CONF=%OPENHAB_HOME%\conf
set.default.OPENHAB_RUNTIME=%OPENHAB_HOME%\runtime
set.default.OPENHAB_USERDATA=%OPENHAB_HOME%\userdata
set.default.OPENHAB_LOGDIR=%OPENHAB_USERDATA%\logs
set.default.KARAF_HOME=%OPENHAB_RUNTIME%
set.default.KARAF_BASE=%OPENHAB_USERDATA%
set.default.KARAF_DATA=%OPENHAB_USERDATA%
set.default.KARAF_ETC=%OPENHAB_USERDATA%\etc
set.default.PATH=%PATH%;%KARAF_BASE%\lib;%KARAF_HOME%\lib
Java Application
wrapper.working.dir=%KARAF_BASE%
wrapper.java.command=%JAVA_HOME%\bin\java
wrapper.java.mainclass=org.apache.karaf.wrapper.internal.service.Main
wrapper.java.classpath.1=%KARAF_HOME%\lib\boot*.jar
wrapper.java.classpath.2=%KARAF_DATA%\lib\wrapper*.jar
wrapper.java.library.path.1=%KARAF_DATA%\lib\wrapper\
Java Parameters
wrapper.java.additional.1=-Dkaraf.home=“%KARAF_HOME%”
wrapper.java.additional.2=-Dkaraf.base=“%KARAF_BASE%”
wrapper.java.additional.3=-Dkaraf.data=“%KARAF_DATA%”
wrapper.java.additional.4=-Dkaraf.etc=“%KARAF_ETC%”
wrapper.java.additional.5=-Dcom.sun.management.jmxremote
wrapper.java.additional.6=-Dkaraf.startLocalConsole=false
wrapper.java.additional.7=-Dkaraf.startRemoteShell=true
wrapper.java.additional.8=-Djava.endorsed.dirs=“%JAVA_HOME%\jre\lib\endorsed;%JAVA_HOME%\lib\endorsed;%KARAF_HOME%\lib\endorsed”
wrapper.java.additional.9=-Djava.ext.dirs=“%JAVA_HOME%\jre\lib\ext;%JAVA_HOME%\lib\ext;%KARAF_HOME%\lib\ext”
wrapper.java.additional.10=-Dopenhab.home=“%OPENHAB_HOME%”
wrapper.java.additional.11=-Dopenhab.conf=“%OPENHAB_HOME%\conf”
wrapper.java.additional.12=-Dopenhab.runtime=“%OPENHAB_HOME%\runtime”
wrapper.java.additional.13=-Dopenhab.userdata=“%OPENHAB_HOME%\userdata”
wrapper.java.additional.14=-Dopenhab.logdir=“%OPENHAB_USERDATA%\logs”
wrapper.java.additional.15=-Dfelix.cm.dir=“%OPENHAB_HOME%\userdata\config”
wrapper.java.additional.16=-Dorg.osgi.service.http.port=8080
wrapper.java.additional.17=-Dorg.osgi.service.http.port.secure=8443
wrapper.java.additional.18=-Djava.util.logging.config.file=“%KARAF_ETC%\java.util.logging.properties”
wrapper.java.additional.19=-Dkaraf.logs=“%OPENHAB_LOGDIR%”
wrapper.java.additional.20=-Dfile.encoding=UTF-8
wrapper.java.maxmemory=512
Wrapper Logging Properties
wrapper.console.format=PM
wrapper.console.loglevel=INFO
wrapper.logfile=%OPENHAB_USERDATA%\logs\wrapper.log
wrapper.logfile.format=LPTM
wrapper.logfile.loglevel=INFO
wrapper.logfile.maxsize=10m
wrapper.logfile.maxfiles=5
wrapper.syslog.loglevel=NONE
Wrapper Windows Properties
wrapper.console.title=openHAB2
wrapper.ntservice.name=openHAB2
wrapper.ntservice.displayname=openHAB2
wrapper.ntservice.description=openHAB 2 Service
wrapper.ntservice.dependency.1=
wrapper.ntservice.starttype=AUTO_START
wrapper.ntservice.interactive=false
Daniel101
(Daniel)
October 23, 2020, 11:23am
4
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.
hmerk
(Hans-Jörg Merk)
October 24, 2020, 9:12pm
5
please read this
hi i’m having a little error while running the openhab. i did all the instructions from openhab websit http://docs.openhab.org/installation/windows.html . the openhab is installed but not running. showing that openhab service could not be started an error occured system error 1067 the process terminated unexpectedly. am using windows 8.1, any instructions will be helpful. thanks [CaptureJAVA]
It is most likely a wrong Java-Home path …
11191
(Иван Гаряев)
October 25, 2020, 4:17am
6
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.
wrapper.java.additional.8=-Djava.endorsed.dirs="%JAVA_HOME%\jre\lib\endorsed;%JAVA_HOME%\lib\endorsed;%KARAF_HOME%\lib\endorsed"
wrapper.java.additional.9=-Djava.ext.dirs="%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.
wrapper.java.additional.8=-Djava.endorsed.dirs="%JAVA_HOME%\jre\lib\endorsed;%JAVA_HOME%\lib\endorsed;%KARAF_HOME%\lib\endorsed"
wrapper.java.additional.9=-Djava.ext.dirs="%JAVA_HOME%\jre\lib\ext;%JAVA_HOME%\lib\ext;%KARAF_HOME%\lib\ext"
2. Add the belows lines under #Java Application.
wrapper.java.classpath.3=%KARAF_HOME%\lib\jdk9plus\*.jar
wrapper.java.classpath.4=%KARAF_HOME%\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
Daniel101
(Daniel)
October 26, 2020, 4:28pm
9
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
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 https://www.openhab.org/docs/installation/windows.html before doing any changes I have made.
Wolfgang_S
(Wolfgang_S)
November 14, 2020, 8:41am
12
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://...
ljsquare
(Laurens Jan Merkx)
December 23, 2020, 10:08am
16
My OH3 stable version in Docker gives the same error messages at starting. What can this be?
Olymp
(Sergey M)
January 14, 2021, 4:30am
17
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 http://192.168.89.2:8080/rest/sitemaps/events/subscribe's Observer