Re: DBus Connection Timeout
- From: David Zeuthen <zeuthen gmail com>
- To: Matthew Bucknall <matthew bucknall googlemail com>
- Cc: gtk-devel-list <gtk-devel-list gnome org>
- Subject: Re: DBus Connection Timeout
- Date: Tue, 12 Apr 2011 11:32:16 -0400
Hi,
On Tue, Apr 12, 2011 at 9:49 AM, Matthew Bucknall
<matthew bucknall googlemail com> wrote:
> Hi,
>
> I'm trying to use g_dbus_connection_new_for_address_sync() to connect
> to message bus via TCP (dbus-daemon-proxy --session) as follows:
>
> connection = g_dbus_connection_new_for_address_sync (
> "tcp:host=localhost,port=8080,family=ipv4",
> G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION |
> G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT,
> NULL,
> NULL,
> &temp_error
> );
>
> This function eventually returns with the error: WaitingForData:
> unexpected response 'REJECTED EXTERNAL DBUS_COOKIE_SHA1 ANONYMOUS.
>
> If I omit the G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT flag, the
> function eventually returns with a timeout error.
>
> Incidentally, d-feet (which uses Python's dbus package) has no
> problems at all connecting to the above dbus address so I know
> dbus-daemon-proxy is functioning correctly. Any ideas what I am
> missing here?
First of all, I'm assuming the remote peer is a message bus? Either
way, please don't use the mailing list for reporting bugs - please
file a bug at http://bugzilla.gnome.org against the gdbus component.
Also, please try attach the output when running the program with
G_DBUS_DEBUG=all cf.
http://developer.gnome.org/gio/unstable/ch03.html
Note that you can use gdbus(1) for this like this
DBUS_SESSION_BUS_ADDRESS="tcp:host=localhost,port=8080,family=ipv4" \
gdbus introspect --session --dest org.freedesktop.DBus --object-path /
instead of writing a C program. Might be easier when testing connectivity...
HTH,
David
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]