strange…
I don’t have any suggestions at the moment…
Also, since your java -version is showing Oracle, then your system is configured to use it as default (you can check with update-alternatives --config java)
Maybe try to start OH2 in debug mode: /usr/share/openhab2/start_debug.sh to see if something useful is posted?
2017-06-20 01:14:34.278 [WARN ] [tty.util.component.AbstractLifeCycle] - FAILED 0.0.0.0:8443@49129fad{SSL-http/1.1}{0.0.0.0:8443}: java.net.BindException: Address already in use
java.net.BindException: Address already in use
at sun.nio.ch.Net.bind0(Native Method)[:1.8.0_131]
at sun.nio.ch.Net.bind(Net.java:433)[:1.8.0_131]
at sun.nio.ch.Net.bind(Net.java:425)[:1.8.0_131]
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)[:1.8.0_131]
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)[:1.8.0_131]
at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:321)
at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:236)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.server.Server.doStart(Server.java:366)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.ops4j.pax.web.service.jetty.internal.JettyServerImpl$1.start(JettyServerImpl.java:287)
at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:222)
at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:196)
at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:180)
at org.ops4j.pax.web.service.internal.HttpServiceProxy.registerServlet(HttpServiceProxy.java:64)
at org.openhab.ui.dashboard.internal.DashboardService.activate(DashboardService.java:55)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_131]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_131]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_131]
at java.lang.reflect.Method.invoke(Method.java:498)[:1.8.0_131]
at org.apache.felix.scr.impl.inject.BaseMethod.invokeMethod(BaseMethod.java:224)[32:org.apache.felix.scr:2.0.6]
at org.apache.felix.scr.impl.inject.BaseMethod.access$500(BaseMethod.java:39)[32:org.apache.felix.scr:2.0.6]
at org.apache.felix.scr.impl.inject.BaseMethod$Resolved.invoke(BaseMethod.java:617)[32:org.apache.felix.scr:2.0.6]
at org.apache.felix.scr.impl.inject.BaseMethod.invoke(BaseMethod.java:501)[32:org.apache.felix.scr:2.0.6]
at org.apache.felix.scr.impl.inject.ActivateMethod.invoke(ActivateMethod.java:302)[32:org.apache.felix.scr:2.0.6]
at org.apache.felix.scr.impl.inject.ActivateMethod.invoke(ActivateMethod.java:294)[32:org.apache.felix.scr:2.0.6]
at org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:297)[32:org.apache.felix.scr:2.0.6]
at org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:108)[32:org.apache.felix.scr:2.0.6]
at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:906)[32:org.apache.felix.scr:2.0.6]
at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:879)[32:org.apache.felix.scr:2.0.6]
at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:748)[32:org.apache.felix.scr:2.0.6]
at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1012)[32:org.apache.felix.scr:2.0.6]
at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:968)[32:org.apache.felix.scr:2.0.6]
at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1215)[32:org.apache.felix.scr:2.0.6]
at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1136)[32:org.apache.felix.scr:2.0.6]
at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:945)[32:org.apache.felix.scr:2.0.6]
at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:881)[32:org.apache.felix.scr:2.0.6]
at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1167)[32:org.apache.felix.scr:2.0.6]
at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:127)[32:org.apache.felix.scr:2.0.6]
at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:914)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:862)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:801)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:225)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
# openHAB 2 service configuration
#
# Additional options for the JAVA_OPTS environment variable.
# These will be appended to the execution of the openHAB Java runtime in front of all other options.
#
# A couple of independent examples:
# EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyAMA0"
# EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0:/dev/ttyS0:/dev/ttyS2:/dev/ttyACM0:/dev/ttyAMA0"
# EXTRA_JAVA_OPTS="-Djna.library.path=/lib/arm-linux-gnueabihf/ -Duser.timezone=Europe/Berlin -Dgnu.io.rxtx.SerialPorts=/dev/ttyS0"
EXTRA_JAVA_OPTS=""
# The ports openHAB will bind its HTTP/HTTPS web server to.
OPENHAB_HTTP_PORT=8081
OPENHAB_HTTPS_PORT=8444
On the other hand… that’s only a warning… (that OH2 couldn’t bring up its https interface)
You were able to run PaperUI on 8080 (so that was free) and install the MQTT binding…
so… something else is wrong…
anyway… fix the 8443 port issue and continue debugging
Here’s something, though … so I appended the two additional lines for ports 8081 and 8444, saved the file, restarted services, and both ports 8080 and 8443 are still active, and 8081/8444 don’t do a thing.
you don’t need tomcat. I asked if it was installed to see if that process was taking up tcp 8443 (that would cause the warning {0.0.0.0:8443}: java.net.BindException: Address already in use)
If you stop OH2 service: do you see any other process using tcp 8443?
ok… strange…
I have to check if there is any difference for Ubuntu (I use Debian)…
it should have worked
Any other useful info in the openhab.log when you start the service using start_debug.sh?
I am not sure if start_debug.sh will use /etc/defaults/openhab2
Maybe try: systemctl start openhab2 to make sure that it will use the file
Hit ‘’ for a list of available commands
and ‘[cmd] --help’ for help on a specific command.
Hit ‘’ or type ‘system:shutdown’ or ‘logout’ to shutdown openHAB.
openhab> log:tail
02:38:12.926 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at http://192.168 .1.29:8080
02:38:12.928 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at https://192.16 8.1.29:8443
02:39:06.997 [INFO ] [smarthome.event.ExtensionEvent ] - Extension ‘package-expert’ has been installed.
02:39:09.536 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Started HABmin servlet at /habmin
02:39:09.567 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
02:39:09.589 [INFO ] [assic.internal.servlet.WebAppServlet] - Started Classic UI at /classicui/app
02:39:09.664 [INFO ] [basic.internal.servlet.WebAppServlet] - Started Basic UI at /basicui/app
02:39:09.684 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
02:39:09.705 [INFO ] [smarthome.event.ExtensionEvent ] - Extension ‘misc-restdocs’ has been installed.
02:39:09.706 [INFO ] [smarthome.event.ExtensionEvent ] - Extension ‘transformation-javascript’ has been installed.
02:39:09.706 [INFO ] [smarthome.event.ExtensionEvent ] - Extension ‘ui-habpanel’ has been installed.
02:39:09.707 [INFO ] [smarthome.event.ExtensionEvent ] - Extension ‘transformation-regex’ has been installed.
02:39:09.708 [INFO ] [smarthome.event.ExtensionEvent ] - Extension ‘transformation-jsonpath’ has been installed.
02:39:09.708 [INFO ] [smarthome.event.ExtensionEvent ] - Extension ‘transformation-xpath’ has been installed.
02:39:09.709 [INFO ] [smarthome.event.ExtensionEvent ] - Extension ‘ui-basic’ has been installed.
02:39:09.709 [INFO ] [smarthome.event.ExtensionEvent ] - Extension ‘transformation-map’ has been installed.
02:39:09.710 [INFO ] [smarthome.event.ExtensionEvent ] - Extension ‘ui-classic’ has been installed.
02:39:09.710 [INFO ] [smarthome.event.ExtensionEvent ] - Extension ‘ui-habmin’ has been installed.
02:39:09.711 [INFO ] [smarthome.event.ExtensionEvent ] - Extension ‘transformation-xslt’ has been installed.
02:39:09.711 [INFO ] [smarthome.event.ExtensionEvent ] - Extension ‘transformation-exec’ has been installed.
02:39:09.711 [INFO ] [smarthome.event.ExtensionEvent ] - Extension ‘ui-paper’ has been installed.
02:39:09.712 [INFO ] [smarthome.event.ExtensionEvent ] - Extension ‘transformation-scale’ has been installed.
02:39:48.640 [INFO ] [smarthome.event.ExtensionEvent ] - Extension ‘binding-mqtt1’ has been installed.
root@TigieMontana:/etc/openhab2/services# ls
addons.cfg mqtt.cfg mqtt-eventbus.cfg readme.txt runtime.cfg
Checking the file now …
Woohoo! I think we got it. Interesting how the stable release was challenging, but the the current snapshot was the ticket. Oh well … its operational, which is great.
Thank you very much for your help walking through this. I really appreciate your time.
then, no need to modify /etc/defaults/openhab2 file (since both 8080 and 8443 are free)
maybe the warning ({0.0.0.0:8443}: java.net.BindException: Address already in use) came because OH2 was re-started too fast (and port was kept occupied? (not sure))
I think that this was solved during a recent snapshot release (Issue)
If you want to be able to change the tcp ports on Ubuntu 16, you may need to use Snapshot release
You don’t have to, since it is not mandatory to change the ports in your system.
Anyway, I would recommend to switch to Snapshot to see if things improve.
Ps: after changing /etc/defaults/openhab2 (if needed), run also systemctl daemon-reload)
Try to clean up your openhab2.service also so it starts with systemctl
Maybe there is something left over from the first stable installation that doesn’t allow systemctl start openhab2 to work
after you check the file /usr/lib/systemd/system/openhab2.service for WorkingDirectory (/usr/share/openhab2) and ExecStart (/usr/share/openhab2/start.sh server), do:
Hi. I’m in a bit of a strange situation.I’ve installed Openhabian on my Raspberry and from Paper UI installed the MQTT Binding. The problem is, when i browse the services folder on my SD card the file mqtt.cfg is with .save extension. When i open the file with Visual Studion Code or nano the file is empty. I dont know how to configure my MQTT broker since the mqtt.cfg file is empty. If some could help it would be great!
An mqtt.cfg file would have been used with the version 1 mqtt binding.
With the version 2 binding you could install either the embedded mqtt broker or an external one like mosquitto.
Please read Here