Cannot connect to openhab2 on ip:8080

sadly after install on a clean raspbian Jessie I cannot connect to ip:8080

I installed openhab2 stable release through apt-get according to instructions on the openhab website, included a oracle 8 java
but after everything is done cannot connect to ip:8080, yes waited the obligatory 15 min, no result
checked with sudo systemctl status openhab2.service and I see it is running.
checked my portrules with sudo iptables -L and see they are on ACCEPT
checked port 8080 with sudo systemctl status openhab2.service
and get no output indicating there is nothing going on on port 8080

What could be wrong and what to do? I am kinda at a loss here

When checking the status of openhab, what is the reported time that OH is running. If it is only some ms, OH isn’t really running! That would be the time it took to run the status.

Thanks for yr reply. It says things like:
Active: active (running) since Sun 2017-02-05 12:42:52 UTC; 1h 56min ago
Main PID: 737 (karaf)
CGroup: /system.slice/openhab2.service
├─737 /bin/bash /usr/share/openhab2/runtime/bin/karaf server
└─901 /usr/bin/java -Dopenhab.home=/usr/share/openhab2 -Dopenhab.conf=/etc/openhab2 -Dopenhab.runt…

Feb 05 12:42:52 raspberrypi systemd[1]: Started openHAB 2 - empowering the smart home.
Feb 05 12:42:53 raspberrypi[737]: Launching the openHAB runtime…

so in this case for almost 2 hrs and in fact it tells me the openHAB runtime started.
So I guess something odd going on

OK, then it looks like OH is running!
How did you try to connect to this instance? From which machine/pc…? Using what browser? Using which URL?
It shouldn’t be the raspberry!
Any browser should be OK
The URL should be using the IP of your raspberry like. “YourIP:8080”.

i used firefox as I always do on a Linux mint desktop and I browse to the ip of the raspberry and add :8080

so it is ipnr:8080

I double, triple, quadrupple checked it is the raspberry IP I am pointing to

let me add that I have used openHab before but as I made a clean install of Jessie, I thought I’d use openHab2

I can’t help with any deeper knowledge.
Why didn’t you use the openhabian setup, which does OS and OpenHAB installation in one go?

I had no idea that existed and it is a bit too late now.
nevertheless thank you for yr effort to help

I see Openhabian already has Mosquitto on it as well so I wouldnt have to do that again, so i may give it a try. Nevertheless, would be good to know why the follow the book steup of openhab2 didnt work

Sadly openHabian install is an even bigger failure. After an hour in my raspberry to ‘set-up’ it doesnt seem to have done anything noticeable. No output on screen, no ssh to it. I saw another thread of someone spending 4 days on trying to install it. But for now I am willng to blame the OpenHabian failure on a dodgy sd card

Hey Ed,

Please pay attention to - you will see, that openHABian provides a lot of information indicating the setup outcome.

There are two reasons an openHABian setup fails. 1. an unstable internet connection or 2. a defective sd card. In the first case you would still be able to log in via ssh, you should see the “fast LED blinking” and most importantly: Chances are high you’d be able to succeed with a second try.

From what you said, it’s indeed an SD-card problem. You should invest in a new SD card, 16GB or bigger.

Regarding your Jessie installation: Everything looks okay. Did you restart once? Did you check the openhab.log for information?

Thanks Thom. yes, I am not too worried about the openhabian. Though I bought 2new 16GB sd cards of a supposedly notable brand, I do suspect them or the mini-to-regular size adapter they came with, so I best get a new card of a different brand and preferably a regular size so i don’t have to worry abt the adapter.

Nevertheless I’d prefer to keep OpenHabian as 2nd option and see if I can get the regular openHAB2 to work. I restarted several times and at some moment even did a re-install.
Openhab2 log didnt indicate any problems.
The Jessie setup didnt generate any problems either, installing Mosquitto was a breeze, so I guess there isnt anything lacking on that front.
OpenHab2 install also didnt come with any warnings or error and it is running, so indeed I was somewhat at a loss.
When some time ago I installed the previous openHAB (so not the ‘2’ version, that gave no problems whatsoever - Are you working with a Raspberry Pi 1? Please be aware, that these are NOT a supported base. I am however not 100% sure they would lead to a failed installation.

I’ve been using openHAB on a RPi 1B+ but I’d recommend a RPi2 or 3.

Could you please execute sudo systemctl restart openhab2.service, wait 3 minutes, then post everything logged to /var/log/openhab2/openhab.log in that time here?

Thank you. Indeed, I have the Raspberry B, as I could run the ‘old’ openHAB on it, I actually never even stopped to think if I could do openHAB2, but I had a look into the ‘requirements’ and yes a raspberry B might be pushing it a bit. Perhaps better to just get a 3, I doubt the RPi2 is even available still…btw, I know someone using it on a banana pi or one of those other pi’s. But my failed installation of Habian, really i think that is a bad card (2 bad cards even).

With regard to the log as you asked for there is something odd. apparently nothing was written there. The latest write activity was apparently yesterday.

Right before I got yr reply on this post, I had issued a status command and like before it was telling me it is running, for 24 hours actually already.
I am not sure if the log only is to report errors, but I get the feeling we are on to something
Also did an ssh to port 8081 but that connection was refused:

pi@raspberrypi:~ $ sudo systemctl status openhab2.service
● openhab2.service - openHAB 2 - empowering the smart home
Loaded: loaded (/usr/lib/systemd/system/openhab2.service; enabled)
Active: active (running) since Sun 2017-02-05 16:57:27 UTC; 24h ago
Main PID: 366 (karaf)
CGroup: /system.slice/openhab2.service
├─366 /bin/bash /usr/share/openhab2/runtime/bin/karaf server
└─904 /usr/bin/java -Dopenhab.home=/usr/share/openhab2 -Dopenhab.conf=/etc/openhab2 -Dopenhab.runt…

Feb 05 16:57:27 raspberrypi systemd[1]: Starting openHAB 2 - empowering the smart home…
Feb 05 16:57:27 raspberrypi systemd[1]: Started openHAB 2 - empowering the smart home.
Feb 05 16:57:27 raspberrypi[366]: Launching the openHAB runtime…
pi@raspberrypi:~ $ sudo systemctl start openhab2.service
pi@raspberrypi:~ $ ssh openhab@ -p 8101
ssh: connect to host port 8101: Connection refused
pi@raspberrypi:~ $ sudo systemctl restart openhab2.service

1 Like

This is absolutely correct as ssh into karaf console is limited to localhost for security reason. You cannot access it trough your lan ip.

Yes it does, however that only confirms the service is running. That doesn’t mean that it is running correctly :wink: That’s what the openhab.log file is for.

If nothing is logged to that file, could you check /var/log/daemon.log? However now we are looking at a possible problem with your system. On a fresh system, after following the instructions, it should just work. I’m afraid I can’t add more at this point. I’d bet on the RPi3.

Thanks Hans, that is sensible and it explains that ‘error’

Thom, Thanks, In fact I have just ordered the RPi3, I will install openHABian on that and trying to dive deeper in why it isnt working on the my RPIB might be of academic interest, but I do not want to waste your or my time with that.
As I now know what the most likely issue is, I can have peace with that.
While waiting for the RPi3, I will just use the B as a mosquitto broker.
Thank you again for your solution

Well the reason for not recommending it is pretty simple:

The newer versions are remarkably more powerful AND are not based on the ARMv6 architecture, with which many packages are not compatible. However as I said before, I don’t think that should be a reason for not succeeding.

Good luck with the RPi3! Hope to hear from you again soon!

Thanks again. I will let you know… but it may take a while to arrive from China

Hey Ed, any progress? The last successful install I’ve heard of (a user here in the forum) was done yesterday. Flash, wait for around 45 (depends on your internet connection downlink), check the RPi LED for a “heartbeat”.

indeed. did it 2 days ago on a new RPi3 and new SD card. Went well.
Initially I thought I had a problem again when still nothing showed up after 45 minutes… but seems my system needed 60 minutes. Slow connection perhaps.
tnx again for yr help