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?

http://docs.openhab.org/installation/security.html#webserver-ports

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:

export OPENHAB_HTTP_PORT=8090
./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.

#!/bin/sh
echo Launching the openHAB runtime...
export OPENHAB_HTTP_PORT=8090
export OPENHAB_HTTPS_PORT=8091
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 http://192.168.1.100:8090
2017-08-20 21:30:57.158 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at https://192.168.1.100:8091