Server could not start listening on port 2000

Hallo allerseits,

Ich versuche Homegear auf einem Raspberry PI mit Rancheros zu starten, mit dem Befehl:

 docker run -d --rm -v /homegear-data/etc:/etc/homegear:Z -v /homegear-data/lib:/var/lib/homegear:Z -v /homegear-data/log:/var/log/homegear:Z -e TZ=Europe/Berlin -e HOST_USER_ID=$(id -u) -e HOST_USER_GID=$(id -g) -p 2001:2001 -p 2002:2002 -p 2003:2003 --name homegear homegear/rpi-homegear:stable

Allerdings habe ich diesen Fehler in der Console:

02/24/19 20:59:21.432 RPC Server (Port 2000): Error: Server could not start listening on port 2000: Cannot assign requested address

Auf Port 2000 laeuft laut netstat nichts… wenn ich versuche den Port auf 2005 zu aendern, bekomme ich da den selben fehler.

kann mir jemand helfen?

unter …/homegear/etc/rpcservers.conf muss interface von IPv6 Localhost ::1 auf IPv6 All Interfaces :: geändert werden, dann läufts.

[FamilyRPCServer]
familyServer = true
interface = ::
port = 2000

so bin ich darauf gekommen

3 Likes

Dieser Thread hat mir geholfen, das Problem schnell zu fixen.

Jedoch wundert es mich, dass dieser Fehler bei einem jungfräulichen rpi-homgear docker image auftritt. Warum ist für Port 2000 interface= ::1 wobei es für alle anderen interface = :: ist?
Und warum muss dieser Port nicht nach außen bereit gestellt werden wie die anderen ( -p 2001:2001)?

Hallo,

das ist der Port für den Familien-RPC-Server. Dieser lauscht aus sicherheitsgründen nur lokal. Da er aktuell noch nicht genutzt wird, habe ich ihn jetzt zunächst einmal in der Konfiguration deaktiviert. Sobald er wieder aktiv ist, muss ich hierfür eine Lösung finden.

Viele Grüße

Sathya

Hi, I still find this issue with the latest docker image, version 0.7.40-2948
I use it on a QNAP NAS together with Home assistant. Works all fine, but log file is growing tremendously :-)…
replacing all interface = ::1 or :: with “interface = ::” or “interface = 0.0.0.0” didnt help at least for me - though I might have done something wrong. Any advice?

Hi @bigcookie,

I will create a new testing the next days. So the stable should contain the fix shortly. But changing the interface = line should’ve helped. Could you post me your log file?

Cheers,

Sathya

Hi, I am currently traveling. I deleted the old logs and created new ones as the old ones accumulated to 0,5GB. I also added the main.conf (as .log file). for now interface = :: is written in there, but the system is running on IPv4. I can try 0.0.0.0 another time.

main.conf.log (15.1 KB) homegear.log (19.5 KB)

debuglevel was 4… I hope this helps already.

Actually the log looks good - except of course, Homegear can’t start listening on port 2000, but changing :: to 0.0.0.0 probably solves that. What happens after the shown lines?

I just noted, that I attached the wrong conf file - sorry for this (It slipped me when I was doing all via phone).
I noticed this might be a user mistake. I changed all interfaces, but it seems, that I left one on ::1 …
Not sure how this happened as I tried changing to 0.0.0.0 as well as :: .

Anyway, long story short:
changing everything to 0.0.0.0 and restarting homegear made the conncetion error disappear (in the mean time I updated to the nightly 0.8.0-2813 - but I assume this had nothing to do with it).

Thanks for confirming and taking a look. Sometimes you need two paiir of eyes to identify/find your mistake.

Thanks!!!

1 Like