OH2 OS X "Address already in use" error

Installed openhab-2.1.0 as per User Manual on my Mac mini.
I cannot open the page localhost:8080
The openhab log file shows a lot of enties with “Address already in use java.net.BindException: Address already in use”.
I have no idea which application is using port 8080
openhab-2.1.0-SNAPSHOT shows the same error.
How do I change the port number?


Thanks Markus but the OS X installation does not seem to have a /etc/defaults/openhab2 file.

You have to export OPENHAB_HTTP_PORT before launching karaf.

When using GNU/Linux, this is done by /etc/defaults/... (at least debian does it this way)

I don’t know the way you have to do it with your Mac. Of course you could do it before launching start.sh:


or you could set this via .bash_profile, but I’m pretty sure there is a way to do it “correct” in MacOS X…

1 Like

Thank you very much Udo.
Added 2 lines to the start.sh file for HTTP and HTTPS.

echo Launching the openHAB runtime...
DIRNAME=`dirname "$0"`
exec "${DIRNAME}/runtime/bin/karaf" "${@}"

The result:

2017-08-20 21:29:52.086 [INFO ] [.dashboard.internal.DashboardService] - Stopped dashboard
2017-08-20 21:30:57.155 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at
2017-08-20 21:30:57.158 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at