Openhabian
Release = Raspbian GNU/Linux 11 (bullseye)
Kernel = Linux 5.10.63-v7l+
Platform = Raspberry Pi 4 Model B Rev 1.2
openHAB version: 3.2.0
Powered hub with Conbee II stick, Aeotec Zwave stick gen 5 (not +) and serial port adapter on usb (PL2032)
I did due to a broken SD-card a full reinstall of openhabian from a backup, and decided to move my deconz stick also to the Pi in stead of on my synology/docker combo.
At start all was ok. After some reboots I noticed my deconz-bridge was offline. the service did not start as was shown through “systemctl status deconz”.
I added it with “sudo systemctl enable deconz.service” but then my openhab-UI did not come online.
So I removed it again and since then after every reboot I manually start the deconz service.
Questions:
Any idea why it goes wrong?
Can I add a script to start it later? Or better to start over again?
In the meantime I noticed that openhab goes offline after roughly two days throwing the error “openhab java.lang.OutOfMemoryError: unable to create native thread: possibly out of memory or process/resource limits reached”. I suppose those things are unrelated, but for the sake of completeliness I add it anyway.
This sounds like both services use the same port:
The web UI runs on port 8080, right ?
Start the conbee service and check on which port it is running.
It it is 8080 as well you need to make sure that one of the services is configured to run on a different port.
openhabian@openhabian:/var/log/openhab $ sudo journalctl -u openhab.service -b
[sudo] password for openhabian:
– Journal begins at Wed 2022-01-05 16:17:37 CET, ends at Thu 2022-01-06 09:50:46 CET. –
Jan 06 09:30:51 openhabian systemd[1]: Started openHAB instance, reachable at http://openhabian:8080.
from the log:
2022-01-06 09:31:12.945 [ERROR] [.service.internal.HttpServiceStarted] - Could not start the servlet context for context path
java.io.IOException: Failed to bind to /0.0.0.0:8080
With lots of other error log, but fact is that deconz starts at port 8080, but it should start given the config at part 8081. When I boot without deconz in systemctl and I start afterwards, no problem.
Could you use the start sequence that does not work.
And once deconz is running, while openhab rejected to start run
sudo netstat -tulpn |grep 8080
please.
This should show the process that runs on port 8080.
After that please also check if there is any process running on the port that you expect.
It could be that the application tries to use a default port and as long as it is free it takes the free port.
It seems as I suspected in my first post that deconz is trying to take as well both port 8080 and 8081. So best thing seems to me to have the deconz service wait to startup so that it sees that port 8080 is already taken. Although as for the config of deconz it shouldn’t care about that because it is set tot port 8081.
as you can see both ports are occupied by the deCONZ service.
In case you did not already do could you please try to connect to both ports using a browser just to check if deCONZ comes back with the same webpage on both of them ?
It could be that on port 8080 a different part of the service is begin shown than on 8081.
Try disabling the gui service and start deconz again. Maybe it defaults to alternative http port (8080) if it cant bind to 80 (below 1024 needs higher priv.) and then conflicts with Openhab.
I changed port of deconz-gui to 8082 in stead of 80, no avail.
I disabled deconz-gui, but deconz service still tries to get the 8080, where it is in the config file clearly set to 8080.
I ran setup again through openhabian, with port 8081, reboot, still the same.
Only thing that keeps on working is when I boot without deconz in systemctl and I start it manually when OH is fully started.
The only solution seems to be a wait-script for deconz to start when OH is fully started.
I will try anyway to do a full reinstall too, maybe that solves the problem.
What happends when you disable the service and start the command manually? Does is bind to the specified port ?
What’s the output of
$sudo systemctl cat deconz ?
( i run deconz on a seperate VM from Openhab so don’t encounter any port conflicts. If you have another system laying around that could solve all your issues)
I ran deconz on synology in a docker container, but since it was part of openhabian i moved it to the openhab box, so there are no dependencies on the availability of my synology.
Changing the default port the “proper” way is by creating a deconz.overwrite
> Proper way to change the default port is to use a systemd overwrite in /etc/systemd/system based on copy from /usr/systemd/system/deconz-gui.service.
I did a full system reinstall, but same issue comes right back. Whenever the configuration has been loaded on the stick port 8080 becomes blocked for openhab and deconz demands it back.
I’ll submit a ticket in openhabian github. @mstormi is that the best way?
Is there a possibilty to script it that when openhab has fully started the deconz service starts?
I didn’t follow this thread so cannot comment on your issue.
openHABian has a menu option to install deCONZ and that’s the only supported install method.
Copying over whatever is not. In openHABian install, deconz does not reclaim the openHAB port.
Please only open a Github issue when you have identified issues that are with the openHABian code. We’re not providing debugging or install support that way.