Re: DBus Connection Timeout
- From: Matthew Bucknall <matthew bucknall googlemail com>
- To: David Zeuthen <zeuthen gmail com>
- Cc: gtk-devel-list <gtk-devel-list gnome org>
- Subject: Re: DBus Connection Timeout
- Date: Tue, 12 Apr 2011 18:43:16 +0100
On Tue, Apr 12, 2011 at 4:32 PM, David Zeuthen <zeuthen gmail com> wrote:
> 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
>
In my defence, I was not aware that it was a bug. I thought it was
something I was doing wrong. Anyway, I've done as you suggested and
gdbus does indeed return the same response as my program:
DBUS_SESSION_BUS_ADDRESS="tcp:host=localhost,port=8080,family=ipv4"
gdbus introspect --session --dest org.freedesktop.DBus --object-path /
Error connecting: In WaitingForData: unexpected response `REJECTED
EXTERNAL DBUS_COOKIE_SHA1 ANONYMOUS'
I will report this as a bug.
Matt.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]