Need Help Please Windows Installation 404 error - OH2

Hi,
I have read the entire setup process for Windows 7 several times and I have removed all installs, rolled back my windows setup to ensure there were no traces of the install and reinstalled twice and still just get this 404 message when I try to connect through the browser to localhost:8080.

Access Error: 404 – Not Found

Cannot locate document: /

My setup is:
Windows 7
Installed the newest Oracle Java from the link in the documentation
I have added the JAVA_HOME environment variable to point to my java install directory
I have tried to install OH in a couple of different locations, currently at C:\OpenHab
The Karaf window opens and everything seems to load and I get the OpenHab prompt and I can see that the uptime stat increases the longer it runs.

shell:info contents below

Launching the openHAB runtime…
karaf.bat: Ignoring predefined value for KARAF_HOME

                      __  _____    ____

____ ____ ___ ____ / / / / | / __ )
/ __ / __ / _ / __ / // / /| | / __ |
/ /
/ / // / __/ / / / __ / ___ |/ // /
_/ ./_// /// /// |/_____/
/_/ 2.0.0
Release Build

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> shell:info
Karaf
Karaf version 4.0.8
Karaf home D:\Openhab\runtime
Karaf base D:\Openhab\userdata
OSGi Framework org.eclipse.osgi-3.10.101.v20150820-1432

JVM
Java Virtual Machine Java HotSpotâ„¢ 64-Bit Server VM version 25.121-b
13
Version 1.8.0_121
Vendor Oracle Corporation
Pid 8524
Uptime 18 hours 43 minutes
Total compile time 37.498 seconds
Threads
Live threads 78
Daemon threads 41
Peak 117
Total started 1054
Memory
Current heap size 73,668 kbytes
Maximum heap size 2,357,248 kbytes
Committed heap size 147,456 kbytes
Pending objects 0
Garbage collector Name = ‘G1 Young Generation’, Collections = 23, Ti
me = 0.293 seconds
Garbage collector Name = ‘G1 Old Generation’, Collections = 0, Time
= 0.000 seconds
Classes
Current classes loaded 11,672
Total classes loaded 11,672
Total classes unloaded 0
Operating system
Name Windows 7 version 6.1
Architecture amd64
Processors 8
openhab>

Hello there I have exactly the same issue (and have followed the same steps), but on a Windows 10 system. Any help would be appreciated!

Check the firewall settings and make sure it isn’t blocking port 8080.

Look for errors in openhab.log. You could also run log:tail within the Karaf console to see what is being logged.

You wrote:
when I try to connect through the browser to localhost:8080

localhost (the loopback adapter) is always 127.0.0.1, but openhab should run on the IP assigned to the LAN adapter, not the loopback adapter. Did you try connecting to IP-OF-PC:8080?

This is my very first install, but have same problem. If I enter to browser: ipofpc:8080 throws error 404
Firewall was disabled, no change.
Checking the above suggestions the log file ( d:\openHAB2\userdata\logs\openhab.log) has zero length.
I copy below the shell:info and the beginning of log:tail.
Full log:tail is very long.

Any help would be appreciated…

openhab> shell:info
Karaf
Karaf version 4.0.8
Karaf home D:\openHAB2\runtime
Karaf base D:\openHAB2\userdata
OSGi Framework org.eclipse.osgi-3.10.101.v20150820-1432

JVM
Java Virtual Machine Java HotSpotâ„¢ Client VM version 25.151-b12
Version 1.8.0_151
Vendor Oracle Corporation
Pid 19872
Uptime 1 hour 29 minutes
Total compile time 1.236 seconds
Threads
Live threads 80
Daemon threads 40
Peak 109
Total started 282
Memory
Current heap size 40,935 kbytes
Maximum heap size 262,144 kbytes
Committed heap size 52,224 kbytes
Pending objects 0
Garbage collector Name = ‘G1 Young Generation’, Collections = 111, Time = 0.409 seconds
Garbage collector Name = ‘G1 Old Generation’, Collections = 0, Time = 0.000 seconds
Classes
Current classes loaded 11,654
Total classes loaded 11,729
Total classes unloaded 75
Operating system
Name Windows 10 version 10.0
Architecture x86
Processors 8
openhab> log:tail
14:18:48.537 [WARN ] [tty.util.component.AbstractLifeCycle] - FAILED default@13a3153{HTTP/1.1}{0.0.0.0:8080}: java.net.BindException: Address already in use: bind
java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method)[:1.8.0_151]
at sun.nio.ch.Net.bind(Unknown Source)[:1.8.0_151]
at sun.nio.ch.Net.bind(Unknown Source)[:1.8.0_151]

You have some other program running that is already bound to port 8080. You either need to stop that program or change the default port OH tries to use. Unfortunately, I’m not sure how to change the ports OH uses in Windows.

1 Like

Thank you, that was the problem, however I have no idea which software uses 8080.
It is easy to change port, in windows command prompt to eg. 8081 by setting a system variable:
set OPENHAB_HTTP_PORT=8081
Then OH started normally :grinning: