UN SOLVED ! Trying to troubleshoot dbus "connection refused" issues

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
flyingrhino
Level 4
Level 4
Posts: 252
Joined: Sat Apr 04, 2015 8:55 pm

UN SOLVED ! Trying to troubleshoot dbus "connection refused" issues

Post by flyingrhino »

Running LM18.3 XFCE.

An application failed start leads to declaration of war on dbus.
This time I aim to collect dbus troubleshooting knowledge and share it with all - which is why THIS QUESTION is written like a tutorial - because that's what it will be once I resolve this issue.

Again I face dbus problems ( last time I resolved them here: viewtopic.php?f=157&t=238648 ).

This time it's slashtime program refusing to start.

When running slashtime from the xfce menu I get nothing - no program, no error message, nothing!
Not helpful at all for troubleshooting.
I then try to run it from a terminal as the same user. This time I get the following errors:

Code: Select all

$ slashtime 
DANGER: (null)-WARNING, Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-LbsXom861u: Connection refused
Exception in thread "main" org.gnome.glib.FatalError: (null)-WARNING
Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-LbsXom861u: Connection refused
	at org.gnome.gtk.GtkMain.gtk_init(Native Method)
	at org.gnome.gtk.GtkMain.init(GtkMain.java:54)
	at org.gnome.gtk.Gtk.init(Gtk.java:95)
	at slashtime.client.Master.main(Master.java:45)
Even using 'dbus-launch' which I learned from my previous experience doesn't work:

Code: Select all

	
$ dbus-launch slashtime
Unable to create /home/ken/.dbus/session-bus
DANGER: (null)-WARNING, Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-LbsXom861u: Connection refused
Exception in thread "main" org.gnome.glib.FatalError: (null)-WARNING
Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-LbsXom861u: Connection refused
	at org.gnome.gtk.GtkMain.gtk_init(Native Method)
	at org.gnome.gtk.GtkMain.init(GtkMain.java:54)
	at org.gnome.gtk.Gtk.init(Gtk.java:95)
	at slashtime.client.Master.main(Master.java:45)
ken@asus303 2018-04-08 10:16:24 /var/log/ $ 
Next step - recursively change the .dbus/ permissions in my home dir (again - worked for me earlier). Doesn't work this time!

This means war!

Now let's do the deep troubleshooting. Open 'dbus-monitor' in one terminal and launch slashtime from another terminal.
Note - I use dbus-monitor in default output which is equal to 'dbus-monitor --session' . Using --system doesn't work.

Nothing ! No output !

Finally, I try to disable apparmor in case it is causing issues - 'service apparmor stop ACTION=teardown' .
No luck.

This is where I got stuck and need help.

I also tried to uninstall and reinstall using the software manager. I didn't help, but I see something interesting in syslog - aptdaemon is doing something with dbus - perhaps it is installing config files?
I tried 'grep -r "slashtime" *' in /etc/ , but got no results.
Also, slashtime uses java in some way, but I can't see any reference to it in the 'dbus-monitor' command further down (though running slashtime from the terminal clearly shows java in the error message).

Code: Select all

Apr  8 10:04:58 asus303 AptDaemon: INFO: InstallPackages() was called: dbus.Array([dbus.String('slashtime')], signature=dbus.Signature('s'))
Apr  8 10:04:58 asus303 org.debian.apt[872]: 10:04:58 AptDaemon [INFO]: InstallPackages() was called: dbus.Array([dbus.String('slashtime')], signature=dbus.Signature('s'))
Apr  8 10:04:58 asus303 AptDaemon.Trans: INFO: Simulate was called
Apr  8 10:04:58 asus303 org.debian.apt[872]: 10:04:58 AptDaemon.Trans [INFO]: Simulate was called
Apr  8 10:04:58 asus303 AptDaemon.Worker: INFO: Simulating trans: /org/debian/apt/transaction/559eb6d676924dc7ac55b271b61f2749
Apr  8 10:04:58 asus303 org.debian.apt[872]: 10:04:58 AptDaemon.Worker [INFO]: Simulating trans: /org/debian/apt/transaction/559eb6d676924dc7ac55b271b61f2749
Apr  8 10:04:59 asus303 AptDaemon.Worker: INFO: Committing packages: dbus.Array([dbus.String('slashtime')], signature=dbus.Signature('s')), dbus.Array([], signature=dbus.Signature('s')), dbus.Array([], signature=dbus.Signature('s')), dbus.Array([], signature=dbus.Signature('s')), dbus.Array([], signature=dbus.Signature('s')), dbus.Array([], signature=dbus.Signature('s'))
Apr  8 10:04:59 asus303 org.debian.apt[872]: 10:04:59 AptDaemon.Worker [INFO]: Committing packages: dbus.Array([dbus.String('slashtime')], signature=dbus.Signature('s')), dbus.Array([], signature=dbus.Signature('s')), dbus.Array([], signature=dbus.Signature('s')), dbus.Array([], signature=dbus.Signature('s')), dbus.Array([], signature=dbus.Signature('s')), dbus.Array([], signature=dbus.Signature('s'))
The lines below work on a different PC, but I can't figure out what the difference is between the two computers - why one works and the other doesn't.
I tried the same dbus-monitor command on a PC that works. Also running LM18.3 XFCE. Here's what it should look like on a PC that launches slashtime properly:

Code: Select all

$ dbus-monitor

========
Opening slashtime program gives the following output
========


method call time=1523154244.481901 sender=:1.62 -> destination=org.freedesktop.DBus serial=1 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=Hello
method return time=1523154244.481926 sender=org.freedesktop.DBus -> destination=:1.62 serial=1 reply_serial=1
   string ":1.62"
signal time=1523154244.481940 sender=org.freedesktop.DBus -> destination=(null destination) serial=32 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
   string ":1.62"
   string ""
   string ":1.62"
signal time=1523154244.481957 sender=org.freedesktop.DBus -> destination=:1.62 serial=2 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameAcquired
   string ":1.62"
method call time=1523154244.482627 sender=:1.62 -> destination=org.freedesktop.DBus serial=2 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch
   string "type='signal',sender='org.freedesktop.DBus',interface='org.freedesktop.DBus',member='NameOwnerChanged',path='/org/freedesktop/DBus',arg0='org.gtk.vfs.Daemon'"
method return time=1523154244.482644 sender=org.freedesktop.DBus -> destination=:1.62 serial=3 reply_serial=2
method call time=1523154244.482648 sender=:1.62 -> destination=org.freedesktop.DBus serial=3 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=StartServiceByName
   string "org.gtk.vfs.Daemon"
   uint32 0
method return time=1523154244.482654 sender=org.freedesktop.DBus -> destination=:1.62 serial=4 reply_serial=3
   uint32 2
method call time=1523154244.482916 sender=:1.62 -> destination=org.freedesktop.DBus serial=4 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=GetNameOwner
   string "org.gtk.vfs.Daemon"
method return time=1523154244.482930 sender=org.freedesktop.DBus -> destination=:1.62 serial=5 reply_serial=4
   string ":1.18"
method call time=1523154244.483176 sender=:1.62 -> destination=:1.18 serial=5 path=/org/gtk/vfs/mounttracker; interface=org.gtk.vfs.MountTracker; member=ListMountableInfo
method return time=1523154244.483510 sender=:1.18 -> destination=:1.62 serial=26 reply_serial=5
   array [
      struct {
         string "smb-share"
         string "smb"
         array [
         ]
         int32 0
         boolean false
      }
      struct {
         string "davs+sd"
         string "davs+sd"
         array [
         ]
         int32 0
         boolean false
      }
      struct {
         string "dav+sd"
         string "dav+sd"
         array [
         ]
         int32 0
         boolean false
      }
      struct {
         string "cdda"
         string "cdda"
         array [
         ]
         int32 0
         boolean false
      }
      struct {
         string "dns-sd"
         string "dns-sd"
         array [
         ]
         int32 0
         boolean false
      }
      struct {
         string "gphoto2"
         string "gphoto2"
         array [
         ]
         int32 0
         boolean false
      }
      struct {
         string "network"
         string "network"
         array [
         ]
         int32 0
         boolean false
      }
      struct {
         string "afc"
         string "afc"
         array [
         ]
         int32 1
         boolean false
      }
      struct {
         string "afp-volume"
         string "afp"
         array [
         ]
         int32 548
         boolean true
      }
      struct {
         string "burn"
         string "burn"
         array [
         ]
         int32 0
         boolean false
      }
      struct {
         string "recent"
         string "recent"
         array [
         ]
         int32 0
         boolean false
      }
      struct {
         string "trash"
         string "trash"
         array [
         ]
         int32 0
         boolean false
      }
      struct {
         string "smb-server"
         string "smb"
         array [
         ]
         int32 0
         boolean false
      }
      struct {
         string "smb-network"
         string "smb"
         array [
         ]
         int32 0
         boolean false
      }
      struct {
         string "mtp"
         string "mtp"
         array [
         ]
         int32 0
         boolean false
      }
      struct {
         string "ftp"
         string "ftp"
         array [
         ]
         int32 21
         boolean true
      }
      struct {
         string "localtest"
         string "localtest"
         array [
         ]
         int32 0
         boolean false
      }
      struct {
         string "davs"
         string "davs"
         array [
         ]
         int32 0
         boolean false
      }
      struct {
         string "dav"
         string "dav"
         array [
         ]
         int32 0
         boolean false
      }
      struct {
         string "sftp"
         string "sftp"
         array [
            string "ssh"
         ]
         int32 22
         boolean true
      }
      struct {
         string "computer"
         string "computer"
         array [
         ]
         int32 0
         boolean false
      }
      struct {
         string "http"
         string "http"
         array [
         ]
         int32 0
         boolean false
      }
      struct {
         string "afp-server"
         string "afp"
         array [
         ]
         int32 548
         boolean true
      }
      struct {
         string "ftps"
         string "ftps"
         array [
         ]
         int32 21
         boolean true
      }
      struct {
         string "archive"
         string "archive"
         array [
         ]
         int32 0
         boolean false
      }
      struct {
         string "google-drive"
         string "google-drive"
         array [
         ]
         int32 0
         boolean false
      }
   ]
method call time=1523154244.484035 sender=:1.62 -> destination=org.freedesktop.DBus serial=6 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=RemoveMatch
   string "type='signal',sender='org.freedesktop.DBus',interface='org.freedesktop.DBus',member='NameOwnerChanged',path='/org/freedesktop/DBus',arg0='org.gtk.vfs.Daemon'"
method return time=1523154244.484046 sender=org.freedesktop.DBus -> destination=:1.62 serial=6 reply_serial=6

========
Closing slashtime program gives the following output
========

signal time=1523154256.291379 sender=org.freedesktop.DBus -> destination=:1.62 serial=8 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameLost
   string ":1.62"
signal time=1523154256.291413 sender=org.freedesktop.DBus -> destination=(null destination) serial=33 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
   string ":1.62"
   string ":1.62"
   string ""

Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
flyingrhino
Level 4
Level 4
Posts: 252
Joined: Sat Apr 04, 2015 8:55 pm

Re: Trying to troubleshoot dbus "connection refused" issues

Post by flyingrhino »

Can anyone have a look at the dbus question?
A pointer in the correct direction will be much appreciated.

Thanks.
Locked

Return to “Xfce”