Dbus / Tcp transport: troubles connecting
msg at altern.org
msg at altern.org
Tue Sep 25 06:04:27 PDT 2007
I have troubles accessing a bus remotely, and also when testing on the
same host but with a different user. I'm wondering if my problem comes
from a wrong use of dbus or from my misunderstanding the authentification
rules?
(I know Tcp connections are not secure, but I'd like to use it now because
because I also got troubles connecting to a cross-machine bus set up by
Telepathy Dbus tubes!)
The following works:
- launching a bus with this config:
<listen>tcp:host=localhost,port=1234</listen>
(I copied the session.conf, which have a <policy> allowing all
connections, right?)
- openning a connection to this bus and exporting a service (using python
bindings)
- test with telnet localhost 1234
However, I can't open a connection to the same bus, either from another
host (Connection refused)
or from the the same host but with another user session (su) (after
several seconds, I get a DBus.Error.NoReply).
I tried also to start the bus from the second user shell: same error when
connecting, in the first user shell.
telnet is not rejected when connecting from the second user, but from
another host, I get "Connection refused".
I tried with Debian unstable (dbus version: 1.1.1-3 / python-dbus:
0.82.2-1) and Debian stable (dbus 1.0.2-1 / python-dbus 0.71-3).
Any idea where I miss something (in Dbus usage, OR ABOUT <aut>, or ...?)
Thanks for your help!
Emmanuel
host = "localhost"
busAddress="tcp:host="+host+",port=1234"
busConnection = dbus.bus.BusConnection.__new__(dbus.bus.BusConnection,
busAddress)
File "/var/lib/python-support/python2.4/dbus/bus.py", line 121, in __new__
bus = cls._new_for_bus(address_or_type, mainloop=mainloop)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Did not
receive a reply. Possible causes include: the remote application did not
send a reply, the message bus security policy blocked the reply, the reply
timeout expired, or the network connection was broken.
'tcp:host=etieveem,port=1234'
Traceback (most recent call last):
File "./t", line 13, in ?
busConnection = dbus.bus.BusConnection.__new__(dbus.bus.BusConnection,
busAddress)
File "/var/lib/python-support/python2.4/dbus/bus.py", line 121, in __new__
bus = cls._new_for_bus(address_or_type, mainloop=mainloop)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoServer: Failed
to connect to socket etieveem:1234 Connection refused
More information about the dbus
mailing list