Mysterious bug on Raspbian Wheezy :(

  • Platform information:
    • Hardware: Raspberry Pi
    • OS: Raspbian GNU/Linux 7 (wheezy)
    • Java Runtime Environment: Java™ SE Runtime Environment (build 1.8.0-b132)
    • openHAB version: 2.5.1 (Build)

Hi guys, I very new openHAB user (actually, since today) but immediately got stuck with extremely annoying and strange bug. I know, you aren’t openHAB devs and not related to this bug but might be someone know solution (my only hope).

My only task is integration of all my X10 lamps & switches with Google Home/Assistant. I failed with “ha-bridge” (they can’t work anymore with Google services and of course nobody cares, at all), and looks like openHAB is the only one alternative for now (at least. If not - please let me know!). By the way, my good old RPi works pretty fine for decades, last time I upgraded Raspbian to Wheezy seven years ago and never touched/upgraded RPi OS since 2013. My X10 works pretty fine with tiny, old fashioned static html page (but nice looking - and no java/shmava, no containers/shmanteiners, no docker/shmoker - good old HTML with simple and understandable javascript, and Apache!), same as some other good nice programs and services.

So, my initial setup (I completed step by step from this guide passed flawlessly, and I got openHAB up & running, as it supposed to be. But Google integration wasn’t easy because of incomplete or wrong manual, I got stuck with UUID and secret (there was no files at /var/lib/openhab2) and I decided to try official “helper” called openHABian (because of “A home automation enthusiast doesn’t have to be a Linux enthusiast!”). That step was my biggest mistake - after applying “improvements” (in hope what missing files will be re-created or so), openHAB stopped working completely :frowning:

After that I tried everything: completely removed and reinstalled openHAB, and java (Oracle one), nothing helps. Actually, openHAB is not running (nothing is listening openHAB ports) but no error log generated. It looks like the issue with openHAB container but I don’t know how to resolve it :frowning: I’m software engineer but far away from the modern web toys.

But the most annoying part - for the God sake, why this… doesn’t work anymore, even after purging and reinstalling everything? Do you know, how to fix, or, at least, tell me, why I can’t revert this back? I do have RPi sd-card image but it’s too old (I made it before installing wheezy), and it’s 32 Gb. I definitely don’t wanna reflash my good old RPi - better I spit on this “openBUG” :frowning:

@mstormi any ideas on the openHABian pains here? You are the expert :wink:

Raspian wheezy? The latest release is buster correct…

You linked to the overview of ALL install methods. Which one of those did you use ?

A strong sign that you have messed up your installation.

What do you mean, which menu option did you select?

You’re welcome. It’s not openHAB to fail, it’s your Pi setup.
Installing on a seven year old OS ? Serious ? Hitting an “install” button without being aware what it is supposed to do ? No backup ? Come on.
That’s not “openBUG” - you have ignored fundamental principles of precaution and caretaking and mustn’t blame anyone here for that (I am an openHABian dev in fact).

You can try debugging what the “improvement” step did to your OS and manually change it back. It’s plain readable scripts in /opt/openhabian/functions (see menu.bash, system.bash).
openHABian runs on many Unices, but it assumes presence of a somewhat modern setup (systemd for example) and directory structure. It is not meant to run on any THAT ancient system.

Frankly, your best option is to flash a new SD card with the openHABian image and proceed from there. You can install everything else you might want to run there on top.

3 Likes

So the userdata folder was elsewhere due to a different installation method than listed in whatever documentation you used. The official documentation usually does not use paths like that because locations vary depending on installation method. This also is documented.

Trying to use OpenHABian to fix an installation with different file locations probably messed things up worse.

Unlike Home Assistant when I was using it last year the people here are more civil and DO care. Let’s start with the basics. What installation method did you use initially?

1 Like

Hmm, are you an expert, really?.. Of course, I’ve using “apt” method, because Raspbian is Debian-based Linux. JFYI, here is the list of commands I’ve used:

sudo apt-get update
sudo apt-get install oracle-java8-jdk
wget -qO - 'https://bintray.com/user/downloadSubjectPublicKey?username=openhab' | sudo apt-key add -
sudo apt-get install apt-transport-https
echo 'deb https://dl.bintray.com/openhab/apt-repo2 stable main' | sudo tee /etc/apt/sources.list.d/openhab2.list
sudo apt-get install openhab2
sudo apt-get install openhab2-addons
sudo /etc/init.d/openhab2 start

After that (first time) openHAB was up & running, before I used openHABian.

To remove, I’ve used

sudo apt-get purge openhab2
sudo apt-get purge oracle-java8-jdk
sudo apt-get autoremove

Nope, sir. As I said before, everything worked fine before I messed with openHABian. After that, I can’t get openHAB works again, whatever I do :frowning: I don’t really know what kind of changes this crapware did on my RPi - no logs, no ability to uninstall properly ('cause there is no package), nothing.

Can’t tell you exactly; probably, AFAIR, something from “openHab related” menu.

My question is not about “seven year old OS” (btw, everything except this… stuff working pretty good, for the years, and I do have a lot of stuff running on this Pi - mochad gateway for X10, MJpeg streamer - and “yes”, I changed the port to do not mess with openHAB) as a “bird watcher”, RPI cam web interface as a driveway watcher, my huge library archive etc. & so on). And I do have backup, but sd-card is big and reflashing takes a lot of time. Also, I’ve made a few changes a few years ago and don’t wanna lose 'em. I ignored nothing but never expect that strange “bugware” behavior. As I mentioned before, I’m not a Linux expert at all, but never saw that kind of wired situation - uninstalling and reinstalling not resolve the issue… If you’re developer of this openHABian, you should know (I think so but maybe I’m wrong) what your software did with my system, and why I can’t get openHAB works again, after reinstallation.

“Assumes”, OMG! Do you know how to check OS/API versions? It’s pretty easy. Most good software on Linux (even on any OS) do these checks before starting messing up…

I don’t need advises like this and definitely not going to waste my time this way. Probably, I remove all crapware and will buy a Broadlink RM Pro+ for $30 on eBay - it can “talk” directly to X10 using RF, and have no integration issues with Google Assistant.

Bruce, there are no other option on Rasbian than “apt-get” method. And this method worked really well, I got openHAB up & running after installation, before I messed with openHABian script.

There are several, some of which are in the Linux install documentation

OpenHABian Image (Raspbian Lite + OpenHABian)
OpenHABian on Raspbian (package repository with additional features)
Package Repository
Manual using a zip file
Docker

So, technically 2 are package-based but Docker & Manual methods have differing paths.
For package based methods, I have not looked whether there is any data in /var/lib/openhab2 before initial package selection. I am away from home for a few days so I cannot test that right now,

Bruce, I’ve used these commands:

sudo apt-get update
sudo apt-get install oracle-java8-jdk
wget -qO - 'https://bintray.com/user/downloadSubjectPublicKey?username=openhab' | sudo apt-key add -
sudo apt-get install apt-transport-https
echo 'deb https://dl.bintray.com/openhab/apt-repo2 stable main' | sudo tee /etc/apt/sources.list.d/openhab2.list
sudo apt-get install openhab2
sudo apt-get install openhab2-addons
sudo /etc/init.d/openhab2 start

After that openHAB was up & running.

For removal, I’ve used sudo apt-get purge openhab2 This removes everything, including /var/lib/openhab2 and /etc/default/openhab2
But I don’t know what else got changed (by openHABian); maybe, I should delete openhub user? What’s what I got from cat /etc/passwd:
openhab:x:108:114:openhab2 runtime user,,,:/var/lib/openhab2:/bin/false

I think that should work but most use Zulu openJDK

Why> That is only needed if the system will not have Internet access to download addons. There was a bug in 2.5.0 where installing that in a fresh install would kill the web page for initial package selection. This was supposed to be fixed in 2.5.1 but I have been away and unable to verify yet.
The easiest path would likely be

sudo /etc/init.d/openhab2 stop
sudo apt-get remove openhab2-addons
sudo apt-get remove openhab2

You could then use sudo openhabian-config to install or

sudo apt-get install openhab2
sudo /etc/init.d/openhab2 start
1 Like

Debian and their derivatives are work of thousands of people. Nobody knows. Single application authors can’t fix your broken system even they might be able by investing enough time.

Debian Wheezy support was dropped years ago. By their authors - by all of us that fiddle around Debian systems. There are no updates, no fixes, nothing - single application author is alone vs. too many things can go wrong. Yes, some application will continue to work just fine, but nobody will invest/waste time to understand why things in EOL system are not working anymore …

Support costs at least precious time from the people that are trying to give you the best possible advise and I can agree more then starting from scratch is the best option. And by investing few bucks into a new SD card. This one, I assume from the past, will day sooner or later … it already live more then expected. Then you will be forced to recreate things. With the same old unsupported system … or by most current one.

Guess what, I do. But that’s not the point. You installed openHABian on some ancient and therefore unsupported OS version. If you’re a SW developer you should have heard about the efforts of supporting software on older systems.

Just like we don’t need unfriendly users that are unwilling to invest just a couple of minutes on their own, instead expecting support from people for free and not even showing gratitude if they get that.
Yep go find another software that does it for you.

3 Likes

Hmm, it looks like you’re missing what I already wrote - I did exactly the same way as you suggested :slight_smile: This is not working for me anymore. Might be, some permission issue(s), don’t really know… The worst issue with openHAB - there are NO logs or error output at all in my case.

pi@raspberrypi ~ $ sudo /etc/init.d/openhab2 start
[ ok ] Starting openHAB2 server: openhab2.
pi@raspberrypi ~ $ sudo /etc/init.d/openhab2 status
Not Running ...
pi@raspberrypi ~ $ cat /var/log/openhab2/openhab.log
pi@raspberrypi ~ $ cat /var/log/openhab2/events.log
pi@raspberrypi ~ $ sudo /etc/init.d/openhab2 start
[....] Starting openHAB2 server: openhab2Error: OpenHAB is already running with PID: 3944!
 failed!

BTW, last message came from /etc/init.d/openhab2 condition: “… if a process still exists but there’s no PID file.” What is the PID file? And how to get openHAB detailed error output or so?

openHABian likely set up a systemd service for openhab. Does Wheezy even use systemd?

I don’t really know. I just stated what I have. Actually, I’m ready to give up; the only thing I’m really curious - what can be screwed up in Linux to get into this issue? :slight_smile: Everything else works fine as it was before, nothing screwed up in my “ancient and outdated” OS except a openHAB…

By the way, could you tell me: how can I get any output from openHAB container(?) / java application? It just “dies” silently - it’s not the way how software should work at all! What is the reason, how to see what is really happened? How to run java-based openHAB manually (but I’m not a java guy; C, C++ & C# one)?

I guess - and looking at the logs above - openHAB seems to run, so init.d can’t start a second instance. So what error would you expect openHAB tell you if it cannot be started?

I believe, openhabian was setting up a systemd process in parallel to what you already had (init.d, whatever) and that caused all the problems.

If you have the directories:

I still believe that it isn’t started properly by your system. OpenHAB is quite “conversational” It logs quite a lot, but if something in the underlying Framework (JAVA, OS, …) isn’t running, you might need to look elsewhere in all of the logs that your system is generating.

BUT
Did you think about that with the choice of your words/sentences (openBUG, questioning professionality of members, “bugware”) you will more likely end up that people will think twice about helping.

:scream: I doubt there will be many/any people left on this forum who will have any experience on that version of Raspbian. If Debain and the Raspberry Pi foundation no longer supports the OS (end of life in 2016), it doesn’t seem fair to expect every software developer to do so.

That’s not an openHABian installation. That’s just Linux installation. This has nothing to do with openHABian.

You might not have enough RAM left to run OH.

Zulu Java is the recommended Java to run on an RPi.

An installation that expects systemd but only init.d is present. The lack of modern certificate authorities in the trust chain. Unmet library dependencies. All kinds of stuff. I seriously doubt that openHAB’c apt install is tested on any operating system that was end of lifed almost four years ago.

If you are going to maintain a system and never update anything, that also comes with a requirement to never change anything. You are trying to have it both ways. You don’t want to upgrade but you want to change it all the same. You can do that only so far. 3+ years after the end of life is too far.

On currently supported Debian based systems you would run sudo systemctl status openhab2. I’ve no idea how to on Wheezy any more. Maybe tail the syslog?

Ultimately, I don’t think you will find much useful help on this forum for your problem. You are running software that has never been tested to run on Wheezy as it is end of life, there is no reason to test it. But, if I were to guess at the root source of the problem, I would guess that it’s the Oracle Java that doesn’t run.

1 Like

openHAB worked fine after installation… Why do you people not reading before answering? It’s kinda strange, at least :frowning:

Yeah, I also think so. Most people here just showing their attitude but nothing else, instead of read properly what I wrote. I asked a straightforward question: how to troubleshoot openHAB, how to get error messages from that “java container”. Instead of answer I got a bunch of insulting but non-useful posts here.

P.S. Actually, I don’t need openHAB at all (I’m pretty happy with my X10 setup). I’m looking just for the software bridge to Google Assistant/Home. Do you have any suggestion?

Ultimately because we don’t know. Wheezy is so old that we have nothing to suggest for troubleshooting. And because it feels a bit unfair to expect a lot of help to support openHAB on an OS that is that far past it’s end of life. The real answer is to run OH on something more recent. But you won’t so we don’t have much to offer. It really boils down to the XY Problem. You want help with something specific (i.e. how to debug software never intended and never tested to run on Wheezy, at least not in the past four years or so) when the real solution is a different approach (i.e. run on a more recent version of Raspbian).

I know of no bridges but the API is open and well published on Google’s part. You could probably build something yourself. Though you might run into some of the same issues running their libraries on such an old OS, particularly an unpached one.

3 Likes

Fair enough, thanks for behaving like an adult, not a “offended child”.

Sure I can but don’t have much time and not pretty interested to learn/work with that API. Probably, will go with hardware solution (Broadlink RM Pro+), or will try openHAB one more time on Windows PC (I do have home server running 24x7) - hope, this version should work flawlessly :wink:

By the way, could you provide a tip for easy way to add simple “switch” to openHAB (without reading tons of manuals), which should issue a simple HTTP GET requests to my RPi? I hope, Google home integration part (i.e. https://myopenhab.org and “openHAB Cloud Connector” add-on) should work fine.

Update: nevermind, I will try to figure out how to make this Mochad X10 Binding works.