Skip to contentSkip to conversation

unit: don't specify tcp hostname in dbus config

PATCH Applied Martin Hundebøll 2 participants 2 messages Jun 17, 2024 – Jun 20, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 unit: don't specify tcp hostname in dbus config

Testing dbus with no network interfaces available on the host fails
with:
dbus-daemon[291]: Failed to start message bus: Failed to lookup host/port: "*:14046": Name or service not known (-2)

Seems like "*" isn't a valid hostname in such cases:
https://bugs.freedesktop.org/show_bug.cgi?id=28979

According to the linked issue, the fix is to simply omit the host= and bind= parameters in the config.

---
 unit/dbus.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
unit/dbus.conf +1 -1
index 5fe41a9ad6a6..3651e44538b1 100644
@@ -7,7 +7,7 @@
   <allow_anonymous />
 
   <listen>unix:path=/tmp/ell-test-bus</listen>
-  <listen>tcp:host=localhost,bind=*,port=14046,family=ipv4</listen>
+  <listen>tcp:port=14046</listen>
   <apparmor mode="disabled" />
 
   <policy context="default">
Signature · 1 line
2.45.2
#1 lore raw

Hi Martin,

Quoted 4 lines · Martin Hundebøll

Testing dbus with no network interfaces available on the host fails
with:
dbus-daemon[291]: Failed to start message bus: Failed to lookup host/port: "*:14046": Name or service not known (-2)

Quoted 9 lines

Seems like "*" isn't a valid hostname in such cases:

   https://bugs.freedesktop.org/show_bug.cgi?id=28979

According to the linked issue, the fix is to simply omit the host= and bind= parameters in the config.

---
  unit/dbus.conf | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

Regards,
-Denis