Unable to upgrade apps: org.freedesktop.DBus.Error.TimedOut [SOLVED]

My YunoHost server

Hardware: Old laptop or computer
YunoHost version: x.x.x
I have access to my server : Through SSH | through the webadmin | direct access via keyboard
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no
If yes, please explain:
yunohost:
repo: stable
version: 3.6.4.3
yunohost-admin:
repo: stable
version: 3.6.4
moulinette:
repo: stable
version: 3.6.4
ssowat:
repo: stable
version: 3.6.4

Description of my issue

I’m trying to upgrade apps but it fails.

sudo yunohost tools upgrade --apps writefreely --debug
207  DEBUG loading actions map namespace 'yunohost'
244  DEBUG extra parameter classes loaded: ['comment', 'ask', 'password', 'required', 'pattern']
244  DEBUG initializing base actions map parser for cli
246  DEBUG registering new callback action 'yunohost.utils.packages.ynh_packages_version' to ['-v', '--version']
357  DEBUG lock has been acquired
443  DEBUG loading python module yunohost.tools took 0.085s
443  INFO processing action [2553.1]: yunohost.tools.upgrade with args={'apps': ['writefreely'], 'system': False}
1633 INFO Now upgrading app writefreely…
1680 DEBUG Downloading…
4323 DEBUG Extracting…
4335 DEBUG Done
4341 DEBUG Checking required packages for writefreely…
4921 DEBUG Checking that required services are up and running...
12576 WARNING unable to upgrade apps: org.freedesktop.DBus.Error.TimedOut: Failed to activate service 'org.freedesktop.systemd1': timed out
12576 ERROR Unable to upgrade some applications

In web admin, I went to Tools > Diagnosis and I get the same type of error.

Action
GET /diagnosis
{"locale":"en"}

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/moulinette/interfaces/api.py", line 439, in process
    ret = self.actionsmap.process(arguments, timeout=30, route=_route)
  File "/usr/lib/python2.7/dist-packages/moulinette/actionsmap.py", line 523, in process
    return func(**arguments)
  File "/usr/lib/moulinette/yunohost/tools.py", line 802, in tools_diagnosis
    services = service_status()
  File "/usr/lib/moulinette/yunohost/service.py", line 287, in service_status
    status = _get_service_information_from_systemd(name)
  File "/usr/lib/moulinette/yunohost/service.py", line 348, in _get_service_information_from_systemd
    systemd = d.get_object('org.freedesktop.systemd1', '/org/freedesktop/systemd1')
  File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 241, in get_object
    follow_name_owner_changes=follow_name_owner_changes)
  File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 248, in __init__
    self._named_service = conn.activate_name_owner(bus_name)
  File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 180, in activate_name_owner
    self.start_service_by_name(bus_name)
  File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 278, in start_service_by_name
    'su', (bus_name, flags)))
  File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
DBusException: org.freedesktop.DBus.Error.TimedOut: Failed to activate service 'org.freedesktop.systemd1': timed out

NOTE: Before having this problem I did install Mastodon app, found it didn’t work so uninstalled.

Then I also installed Pleroma, but also didn’t work.

I see that my WriteFreely instance is now showing 502 error (blog.arkadi.one). I’m not sure if any of this is related.

Uuh okay, for example, are you able to run systemctl status dbus and is it running ?

this is what i got for that command.

admin@arkadi:~$ sudo systemctl status dbus
● dbus.service - D-Bus System Message Bus
   Loaded: loaded (/lib/systemd/system/dbus.service; static; vendor preset: enabled)
   Active: active (running) since Fri 2019-07-12 23:06:26 CST; 10h ago
     Docs: man:dbus-daemon(1)
 Main PID: 718 (dbus-daemon)
    Tasks: 1 (limit: 4915)
   Memory: 1.4M
      CPU: 2.856s
   CGroup: /system.slice/dbus.service
           └─718 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation

Jul 13 09:07:09 arkadi.one dbus[718]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out
Jul 13 09:07:34 arkadi.one dbus[718]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out
Jul 13 09:07:59 arkadi.one dbus[718]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out
Jul 13 09:08:24 arkadi.one dbus[718]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out
Jul 13 09:08:49 arkadi.one dbus[718]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out
Jul 13 09:09:14 arkadi.one dbus[718]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out
Jul 13 09:09:24 arkadi.one dbus[718]: [system] Activating systemd to hand-off: service name='org.freedesktop.login1' unit=
Jul 13 09:09:39 arkadi.one dbus[718]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out
Jul 13 09:09:49 arkadi.one dbus[718]: [system] Failed to activate service 'org.freedesktop.login1': timed out
Jul 13 09:10:04 arkadi.one dbus[718]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out

i also just tried these commands but no change.

sudo systemctl reload dbus
sudo systemctl restart dbus
Jul 13 09:13:49 arkadi.one systemd[1]: Reloading D-Bus System Message Bus.
Jul 13 09:13:50 arkadi.one dbus[718]: [system] Reloaded configuration
Jul 13 09:13:50 arkadi.one dbus-send[16136]: method return time=1562980430.014318 sender=org.freedesktop.DBus -> destinati
Jul 13 09:13:50 arkadi.one systemd[1]: Reloaded D-Bus System Message Bus.
Jul 13 09:13:50 arkadi.one dbus[718]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out

while investigating my problem, i uninstalled docker-compose and got some weird error message.



apt remove docker-compose
...
Removing docker-compose (1.8.0-2) ...
Processing triggers for man-db (2.7.6.1-2) ...
fatal: confused by unstable object source data for 9fb941b0b0c163a3514bd16cd2817b8c7662d759
etckeeper warning: git add --all
On branch master
Changes not staged for commit:
modified: default/postsrsd
deleted: dnsmasq.d/fedi.arkadi.one
modified: group
modified: group-
modified: gshadow
modified: gshadow-
modified: hosts
deleted: logrotate.d/pleroma
deleted: metronome/conf.d/fedi.arkadi.one.cfg.lua
deleted: nginx/conf.d/fedi.arkadi.one.conf
deleted: nginx/conf.d/fedi.arkadi.one.d/pleroma.conf
deleted: nginx/conf.d/pleroma-cache.conf
modified: passwd
modified: passwd-
modified: pihole/pihole-FTL.db
modified: resolv.dnsmasq.conf
modified: shadow
modified: shadow-
modified: ssowat/conf.json
deleted: yunohost/apps/pleroma/conf/app.src
deleted: yunohost/apps/pleroma/conf/cache.conf
deleted: yunohost/apps/pleroma/conf/generated_config.exs
deleted: yunohost/apps/pleroma/conf/media.conf
deleted: yunohost/apps/pleroma/conf/nginx.conf
deleted: yunohost/apps/pleroma/conf/systemd.service
deleted: yunohost/apps/pleroma/manifest.json
deleted: yunohost/apps/pleroma/scripts/_common.sh
deleted: yunohost/apps/pleroma/scripts/backup
deleted: yunohost/apps/pleroma/scripts/change_url
deleted: yunohost/apps/pleroma/scripts/install
deleted: yunohost/apps/pleroma/scripts/remove
deleted: yunohost/apps/pleroma/scripts/restore
deleted: yunohost/apps/pleroma/scripts/upgrade
deleted: yunohost/apps/pleroma/scripts/ynh_add_secure_repos__3
deleted: yunohost/apps/pleroma/scripts/ynh_systemd_action
deleted: yunohost/apps/pleroma/settings.yml
deleted: yunohost/apps/pleroma/status.json
modified: yunohost/appslists.json
deleted: yunohost/certs/fedi.arkadi.one
modified: yunohost/regenconf.yml


no changes added to commit
warning: etckeeper failed to commit changes in /etc using git
Error: Timeout was reached

there were also some of these fatal: confused by unstable object source data warnings while installing mastodon and pleroma.

it’s scary to think that installing level 7 apps could screw up my system this badly.

at this point it feels like my system is completely ‘messed up’ so am starting to think about reinstalling whole server, unless anybody has some ideas how to fix this?

Well uh, do you know where that docker-compose comes from ? I can’t see any reference do docker in the 3 apps you mentionned…

yes you’re right. i installed docker and docker-compose to try using Own Photos (Google Photos replacement) but wasn’t happy with it.

So order of things installed:
Own Photos
Mastodon
Pleroma

I didn’t mention it because I’ve installed docker and docker-compose on many systems and haven’t had any issues with it, so I don’t think this problem could be related.

so any ideas? i’m open to trying anything. if it can’t be fixed, i’ll just have to reinstall everything. i have backups so I can do it, but it’s just time consuming.

I guess the whole docker thing is unrelated, nor the scary messages about “deleted” files (that’s just log from etckeeper trying to version config files, but not so important)

Well uh, did you already tried to reboot the machine ? Some thread on the internet suggest it might solve the issue … But that’s pretty weird :confused:

ok now i’m very confused…

i rebooted but nothing worked. then i restarted ‘nginx’ service using:
sudo yunohost service restart nginx

now suddenly everything works??!?!?!?

i’m so confused because i rebooted once before posting this problem here.

well anyways i’ll leave this thread here, if you have weird problems, reboot (a few times) and maybe it’ll work?!?

thanks for your help aleks. changed topic to [solved]

1 Like