How to debug failed service activation?

Jon Watte jwatte at gmail.com
Wed Aug 6 12:01:34 PDT 2014


Thanks for the answer. I'm sad to hear that the information I need is
trashed :-(

I don't currently have dbus sources on the machine, and am not particularly
interested in re-compiling dbus. I just want to develop with dbus.
It would seem to me that this is a point of possible improvement for the
usability of the dbus system for developers. (Whether this is a priority
for dbus developers is a different question, of course.)

Sincerely,

jw





Sincerely,

Jon Watte


--
"I find that the harder I work, the more luck I seem to have." -- Thomas
Jefferson


On Wed, Aug 6, 2014 at 9:27 AM, Ralf Habacker <ralf at habacker.de> wrote:

>
> Am 05.08.2014 19:20, schrieb Jon Watte:
> > Thanks for the assurance of zoeticity!
> >
> > Now, as for the question:
> > In activation-helper.c, function switch_user, there are four cases
> > where the function may fail.
> > They all fail with the same error code, but each of them has a
> > separate extra error information string.
> > How can I see which specific error information string was used to
> > generate the error I'm seeing when attempting dbus activation of my
> > service?
> From looking int activation-helper-bin.c I would say the message is
> trashed. You should apply something like the following patch to see the
> error messages on stderr.
>
> diff --git a/bus/activation-helper-bin.c b/bus/activation-helper-bin.c
> index f5f16d2..30ddb64 100644
> --- a/bus/activation-helper-bin.c
> +++ b/bus/activation-helper-bin.c
> @@ -95,6 +95,8 @@ main (int argc, char **argv)
>      {
>        /* convert error to an exit code */
>        retval = convert_error_to_exit_code (&error);
> +      fprintf(stderr, "%s: %s\n", error->name, error->message);
> +
>        dbus_error_free (&error);
>      }
> > I presume there's a dbus activation server (perhaps this is the
> > message bus daemon itself.) Is there a standard way to increase
> > verbosity of logging of this, perhaps?
> If dbus is compiled with --enable-verbose-mode you can set the
> environment variable DBUS_VERBOSE=1 before running any dbus related
> application.
>
> Regards
>  Ralf
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20140806/6a878b60/attachment.html>


More information about the dbus mailing list