dresden-elektronik / deconz-rest-plugin

deCONZ REST-API plugin to control ZigBee devices
BSD 3-Clause "New" or "Revised" License
1.9k stars 506 forks source link

can't change ports with raspberry pi buster #1699

Closed burpy closed 5 years ago

burpy commented 5 years ago

I have a RPI 4/4GB with buster and I installed apache as a webserver. I have homebridge on Port 8080 too. Now I installed deconz with

sudo apt install deconz

and after a reboot deconz is overwriting the apache (80, http) and the homebridge (8080, http-alt).

sudo netstat -pat | grep LISTEN

shows this

tcp 0 0 0.0.0.0:http-alt 0.0.0.0: LISTEN 699/deCONZ
tcp 0 0 0.0.0.0:http 0.0.0.0:
LISTEN 699/deCONZ
tcp 0 0 0.0.0.0:ssh 0.0.0.0: LISTEN 686/sshd
tcp 0 0 0.0.0.0:8090 0.0.0.0:
LISTEN 402/deCONZ
tcp 0 0 0.0.0.0:https 0.0.0.0: LISTEN 402/deCONZ
tcp6 0 0 [::]:ssh [::]:
LISTEN 686/sshd

I made two directories /etc/systemd/system/deconz-gui.service.d/ and /etc/systemd/system/deconz.service.d with an file in each called override.conf

the content is

[Service]
ExecStart=
ExecStart=/usr/bin/deCONZ -platform minimal --http-port=8090 --ws-port=8090 --auto-connect=1 --dbg-error=1

... but it doesn't helped much. It helped to reach it on port 8090 but port 80 and 8080 is blocked from deconz too.

The result of sudo systemctl status deconz-gui is

Warning: The unit file, source configuration file or drop-ins of deconz-gui.service changed on disk. Run 'systemctl daemon-reload' to reload units. deconz-gui.service - deCONZ: ZigBee gateway -- GUI/REST API Loaded: loaded (/lib/systemd/system/deconz-gui.service; enabled; vendor preset: enabled) Drop-In: /etc/systemd/system/deconz-gui.service.d └─override.conf Active: active (running) since Mon 2019-07-22 19:51:47 CEST; 8s ago Main PID: 713 (deCONZ) Tasks: 7 (limit: 4915) Memory: 12.2M CGroup: /system.slice/deconz-gui.service └─713 /usr/bin/deCONZ -platform minimal --http-port=8090 --ws-port=8090 --auto-connect=1 --dbg-error=1

Jul 22 19:51:47 raspberrypi systemd[1]: Started deCONZ: ZigBee gateway -- GUI/REST API. Jul 22 19:51:47 raspberrypi deCONZ[713]: QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-pi' Jul 22 19:51:47 raspberrypi deCONZ[713]: libpng warning: iCCP: known incorrect sRGB profile Jul 22 19:51:48 raspberrypi deCONZ[713]: This plugin does not support propagateSizeHints() Jul 22 19:51:48 raspberrypi deCONZ[713]: This plugin does not support propagateSizeHints() Jul 22 19:51:48 raspberrypi deCONZ[713]: This plugin does not support propagateSizeHints()

Can someone help me? Thanks!

burpy commented 5 years ago

I found the solution. I removed the

-platform minimal

I changed the two override.confs into

[Service]
ExecStart=
ExecStart=/usr/bin/deCONZ --http-port=8090 --ws-port=8090 --auto-connect=1 --dbg-error=1

and now it works!

sudo netstat -pat | grep LISTEN

shows now

tcp 0 0 0.0.0.0:ssh 0.0.0.0: LISTEN 717/sshd
tcp 0 0 0.0.0.0:8090 0.0.0.0:
LISTEN 823/deCONZ
tcp 0 0 0.0.0.0:https 0.0.0.0: LISTEN 823/deCONZ
tcp6 0 0 [::]:33061 [::]:
LISTEN 698/homebridge
tcp6 0 0 [::]:http-alt [::]: LISTEN 1079/homebridge-con tcp6 0 0 [::]:http [::]: LISTEN 733/apache2
tcp6 0 0 [::]:51826 [::]: LISTEN 698/homebridge
tcp6 0 0 [::]:ssh [::]:
LISTEN 717/sshd
tcp6 0 0 [::]:36025 [::]:* LISTEN 698/homebridge