[SOLVED] APP update does not work anymore

Here this is what I get:

yunohost app upgrade wordpress

Info: Now upgrading wordpress...
Traceback (most recent call last):                                                                                                                  
  File "/usr/bin/yunohost", line 218, in <module>                                                                                                   
    timeout=opts.timeout,                                                                                                                           
  File "/usr/lib/python2.7/dist-packages/moulinette/__init__.py", line 149, in cli                                                                  
    moulinette.run(args, output_as=output_as, password=password, timeout=timeout)                                                                   
  File "/usr/lib/python2.7/dist-packages/moulinette/interfaces/cli.py", line 469, in run                                                            
    ret = self.actionsmap.process(args, timeout=timeout)                                                                                            
  File "/usr/lib/python2.7/dist-packages/moulinette/actionsmap.py", line 588, in process                                                            
    return func(**arguments)                                                                                                                        
  File "/usr/lib/moulinette/yunohost/app.py", line 500, in app_upgrade                                                                              
    _assert_system_is_sane_for_app(manifest, "pre")                                                                                                 
  File "/usr/lib/moulinette/yunohost/app.py", line 2865, in _assert_system_is_sane_for_app                                                          
    faulty_services = [s for s in services if service_status(s)["status"] != "running"]                                                             
  File "/usr/lib/moulinette/yunohost/service.py", line 302, in service_status                                                                       
    output = {s: _get_and_format_service_status(s, infos) for s, infos in services.items()}                                                         
  File "/usr/lib/moulinette/yunohost/service.py", line 302, in <dictcomp>                                                                           
    output = {s: _get_and_format_service_status(s, infos) for s, infos in services.items()}                                                         
  File "/usr/lib/moulinette/yunohost/service.py", line 337, in _get_and_format_service_status                                                       
    raw_status, raw_service = _get_service_information_from_systemd(systemd_service)                                                                
  File "/usr/lib/moulinette/yunohost/service.py", line 315, 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)                                                                                                                               
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.TimedOut: Failed to activate service 'org.freedesktop.systemd1': timed out                

in the admin panel i get the message:

unable to upgrade apps: org.freedesktop.DBus.Error.TimedOut: Failed to activate service ‘org.freedesktop.systemd1’: timed out

sudo yunohost service restart nginx
did not help

# 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 Sat 2020-08-29 09:14:13 CEST; 2 weeks 4 days ago
     Docs: man:dbus-daemon(1)                                                                                                                       
 Main PID: 547 (dbus-daemon)                                                                                                                        
   CGroup: /system.slice/dbus.service                                                                                                               
           └─547 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation                                         
                                                                                                                                                    
Sep 16 19:27:04 admin-tools.lokal.social dbus[547]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out                       
Sep 16 19:27:29 admin-tools.lokal.social dbus[547]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out                       
Sep 16 19:27:54 admin-tools.lokal.social dbus[547]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out                       
Sep 16 19:28:19 admin-tools.lokal.social dbus[547]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out                       
Sep 16 19:28:45 admin-tools.lokal.social dbus[547]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out                       
Sep 16 19:29:10 admin-tools.lokal.social dbus[547]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out                       
Sep 16 19:29:35 admin-tools.lokal.social dbus[547]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out                       
Sep 16 19:30:00 admin-tools.lokal.social dbus[547]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out                       
Sep 16 19:30:25 admin-tools.lokal.social dbus[547]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out                       
Sep 16 19:30:50 admin-tools.lokal.social dbus[547]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out

Blockquote
What else could I try?
Thansk for Help

Hmpf that looks like systemd being half broken and that kind of issue sort of randomly shows up from time to time …

Many thread on the internet mention this but it’s never clear what actually happens and what’s the right fix …

So let’s try in order (in between each of these, try to check wether or not it fixed the issue) :

  • systemctl start dbus.service
  • systemctl daemon-reexec
  • rebooting the whole server …

THANKS Alex!!!
that did help.
I Could update all app but not synapse

root@admin:~# 2yunohost log display 02200916-191814-app_upgrade-synapse --share                                                                        
Error: There is no operation log with the name '220200916-191814-app_upgrade-synapse', use 'yunohost log list' to see all available operation logs
root@admin-tools:~# yunohost log display 02200916-191814-app_upgrade-synapse --share                                                                         
Error: There is no operation log with the name '02200916-191814-app_upgrade-synapse', use 'yunohost log list' to see all available operation logs
root@admin-tools:~# yunohost app upgrade synapse                                                                                                             
Info: Now upgrading synapse...
Info: [....................] > Loading installation settings...
Info: [+...................] > Ensuring downward compatibility...
Info: [#++++++++...........] > Backing up the app before upgrading (may take a while)...
Warning: 2476 pg_dump: [archiver (db)] connection to database "matrix_synapse" failed: could not connect to server: No such file or directory
Warning: 2476  Is the server running locally and accepting
Warning: 2477  connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
Warning: 3027 Could not back up synapse
Warning: Traceback (most recent call last):
Warning:   File "/usr/lib/moulinette/yunohost/backup.py", line 704, in _collect_app_files
Warning:     raise_on_error=True, chdir=tmp_app_bkp_dir, env=env_dict)[0]
Warning:   File "/usr/lib/moulinette/yunohost/hook.py", line 347, in hook_exec
Warning:     raise YunohostError('hook_exec_failed', path=path)
Warning: YunohostError: Could not run script: /tmp/backup_5KfTSA
Warning: 3028 Nothing to save
Warning: Backup failed, the upgrade process was aborted.
Error: Could not upgrade synapse: An error occurred inside the app upgrade script
Info: The operation 'Upgrade the 'synapse' app' could not be completed. Please share the full log of this operation using the command 'yunohost log display 2
0200916-192305-app_upgrade-synapse --share' to get help                                                                                                      
Warning: Here's an extract of the logs before the crash. It might help debugging the error:
Info: DEBUG - 2372 + src_path=/etc/nginx/conf.d/lokal.social.d/synapse_server_name.conf
Info: DEBUG - 2372 + [[ -z '' ]]
Info: DEBUG - 2372 + dest_path=etc/nginx/conf.d/lokal.social.d/synapse_server_name.conf
Info: DEBUG - 2372 + [[ -e etc/nginx/conf.d/lokal.social.d/synapse_server_name.conf ]]
Info: DEBUG - 2372 + local rel_dir=/apps/synapse/backup
Info: DEBUG - 2372 + rel_dir=/apps/synapse/backup/
Info: DEBUG - 2372 + dest_path=/apps/synapse/backup/etc/nginx/conf.d/lokal.social.d/synapse_server_name.conf
Info: DEBUG - 2372 + dest_path=apps/synapse/backup/etc/nginx/conf.d/lokal.social.d/synapse_server_name.conf
Info: DEBUG - 2373 ++ echo /etc/nginx/conf.d/lokal.social.d/synapse_server_name.conf
Info: DEBUG - 2373 ++ sed --regexp-extended 's/"/\"\"/g'
Info: DEBUG - 2373 + local src=/etc/nginx/conf.d/lokal.social.d/synapse_server_name.conf
Info: DEBUG - 2373 ++ echo apps/synapse/backup/etc/nginx/conf.d/lokal.social.d/synapse_server_name.conf
Info: DEBUG - 2373 ++ sed --regexp-extended 's/"/\"\"/g'
Info: DEBUG - 2373 + local dest=apps/synapse/backup/etc/nginx/conf.d/lokal.social.d/synapse_server_name.conf
Info: DEBUG - 2373 + echo '"/etc/nginx/conf.d/lokal.social.d/synapse_server_name.conf","apps/synapse/backup/etc/nginx/conf.d/lokal.social.d/synapse_server_na
me.conf"'                                                                                                                                                    
Info: DEBUG - 2373 ++ dirname /home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup/etc/nginx/conf.d/lokal.social.d/synapse_server_name.conf
Info: DEBUG - 2373 + mkdir --parents /home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup/etc/nginx/conf.d/lokal.social.d
Info: DEBUG - 2374 + echo '[#####+++............] > Backing up the PostgreSQL database...'
Info: DEBUG - 2374 + ynh_psql_dump_db --database=matrix_synapse
Info: DEBUG - 2376 + sudo --login --user=postgres pg_dump matrix_synapse
Info: DEBUG - 2476 + ynh_exit_properly
Error: The operation 'Upgrade the 'synapse' app' could not be completed. Please share the full log of this operation using the command 'yunohost log display 
20200916-192305-app_upgrade-synapse --share' to get help                              

**

I can´t start matrix-synapse - it is going down all the time…
what yould I try ?? THANKS

Well let’s first have a look at the diagnosis, see if it’s reporting any obvious issue … (From here it looks like postgresql is down)

By the way, can you tell which of the previous commands solved the issue regarding systemd1 time-out ?

oh i did it as you said … one after another… so I can´t tell which command did it… :frowning:


please have a look here :

yunohost service log matrix-synapse                                                                                                      
/var/log/matrix-synapse/homeserver.log: 
  - 2020-09-17 00:12:56,771 - twisted - 192 - ERROR - -   File "/usr/lib/python3.5/runpy.py", line 85, in _run_code                                          
  - 2020-09-17 00:12:56,774 - twisted - 192 - ERROR - -     exec(code, run_globals)                                                                          
  - 2020-09-17 00:12:56,774 - twisted - 192 - ERROR - -   File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synapse/app/homeserver.py", line 687
, in <module>                                                                                                                                                
  - 2020-09-17 00:12:56,778 - twisted - 192 - ERROR - -     main()                                                                                           
  - 2020-09-17 00:12:56,778 - twisted - 192 - ERROR - -   File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synapse/app/homeserver.py", line 682
, in main                                                                                                                                                    
  - 2020-09-17 00:12:56,780 - twisted - 192 - ERROR - -     hs = setup(sys.argv[1:])                                                                         
  - 2020-09-17 00:12:56,782 - twisted - 192 - ERROR - -   File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synapse/app/homeserver.py", line 375
, in setup                                                                                                                                                   
  - 2020-09-17 00:12:56,784 - twisted - 192 - ERROR - -     hs.setup()                                                                                       
  - 2020-09-17 00:12:56,785 - twisted - 192 - ERROR - -   File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synapse/server.py", line 283, in set
up                                                                                                                                                           
  - 2020-09-17 00:12:56,787 - twisted - 192 - ERROR - -     self.datastores = DataStores(self.DATASTORE_CLASS, self)                                         
  - 2020-09-17 00:12:56,788 - twisted - 192 - ERROR - -   File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synapse/storage/data_stores/__init__
.py", line 49, in __init__                                                                                                                                   
  - 2020-09-17 00:12:56,789 - twisted - 192 - ERROR - -     with make_conn(database_config, engine) as db_conn:                                              
  - 2020-09-17 00:12:56,790 - twisted - 192 - ERROR - -   File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synapse/storage/database.py", line 1
10, in make_conn                                                                                                                                             
  - 2020-09-17 00:12:56,791 - twisted - 192 - ERROR - -     db_conn = engine.module.connect(**db_params)                                                     
  - 2020-09-17 00:12:56,792 - twisted - 192 - ERROR - -   File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/psycopg2/__init__.py", line 127, in 
connect                                                                                                                                                      
  - 2020-09-17 00:12:56,794 - twisted - 192 - ERROR - -     conn = _connect(dsn, connection_factory=connection_factory, **kwasync)                           
  - 2020-09-17 00:12:56,795 - twisted - 192 - ERROR - - psycopg2.OperationalError: could not connect to server: Connection refused                           
  - 2020-09-17 00:12:56,796 - twisted - 192 - ERROR - -         Is the server running on host "localhost" (127.0.0.1) and accepting                          
  - 2020-09-17 00:12:56,797 - twisted - 192 - ERROR - -         TCP/IP connections on port 5432?                                                             
  - 2020-09-17 00:12:56,797 - twisted - 192 - ERROR - -                                                                                                      
  - 2020-09-17 00:13:04,171 - twisted - 192 - INFO - None- Redirected stdout/stderr to logs                                                                  
  - 2020-09-17 00:13:04,172 - root - 257 - WARNING - None- ***** STARTING SERVER *****                                                                       
  - 2020-09-17 00:13:04,174 - root - 258 - WARNING - None- Server /opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synapse/app/homeserver.py version 
1.18.0                                                                                                                                                       
  - 2020-09-17 00:13:04,175 - root - 259 - INFO - None- Server hostname: lokal.social                                                                        
  - 2020-09-17 00:13:04,177 - root - 260 - INFO - None- Instance name: master                                                                                
  - 2020-09-17 00:13:04,177 - synapse.app.homeserver - 372 - INFO - None- Setting up server                                                                  
  - 2020-09-17 00:13:04,177 - synapse.server - 281 - INFO - None- Setting up.                                                                                
  - 2020-09-17 00:13:04,193 - twisted - 192 - ERROR - - Traceback (most recent call last):                                                                   
  - 2020-09-17 00:13:04,193 - twisted - 192 - ERROR - -   File "/usr/lib/python3.5/runpy.py", line 193, in _run_module_as_main                               
  - 2020-09-17 00:13:04,193 - twisted - 192 - ERROR - -     "__main__", mod_spec)                                                                            
  - 2020-09-17 00:13:04,194 - twisted - 192 - ERROR - -   File "/usr/lib/python3.5/runpy.py", line 85, in _run_code                                          
  - 2020-09-17 00:13:04,194 - twisted - 192 - ERROR - -     exec(code, run_globals)                                                                          
  - 2020-09-17 00:13:04,194 - twisted - 192 - ERROR - -   File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synapse/app/homeserver.py", line 687
, in <module>                                                                                                                                                
  - 2020-09-17 00:13:04,195 - twisted - 192 - ERROR - -     main()                                                                                           
  - 2020-09-17 00:13:04,195 - twisted - 192 - ERROR - -   File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synapse/app/homeserver.py", line 682
, in main                                                                                                                                                    
  - 2020-09-17 00:13:04,196 - twisted - 192 - ERROR - -     hs = setup(sys.argv[1:])                                                                         
  - 2020-09-17 00:13:04,196 - twisted - 192 - ERROR - -   File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synapse/app/homeserver.py", line 375
, in setup                                                                                                                                                   
  - 2020-09-17 00:13:04,197 - twisted - 192 - ERROR - -     hs.setup()                                                                                       
  - 2020-09-17 00:13:04,197 - twisted - 192 - ERROR - -   File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synapse/server.py", line 283, in set
up                                                                                                                                                           
  - 2020-09-17 00:13:04,197 - twisted - 192 - ERROR - -     self.datastores = DataStores(self.DATASTORE_CLASS, self)                                         
  - 2020-09-17 00:13:04,198 - twisted - 192 - ERROR - -   File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synapse/storage/data_stores/__init__
.py", line 49, in __init__                                                                                                                                   
  - 2020-09-17 00:13:04,198 - twisted - 192 - ERROR - -     with make_conn(database_config, engine) as db_conn:                                              
  - 2020-09-17 00:13:04,198 - twisted - 192 - ERROR - -   File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synapse/storage/database.py", line 1
10, in make_conn                                                                                                                                             
  - 2020-09-17 00:13:04,199 - twisted - 192 - ERROR - -     db_conn = engine.module.connect(**db_params)                                                     
  - 2020-09-17 00:13:04,200 - twisted - 192 - ERROR - -   File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/psycopg2/__init__.py", line 127, in 
connect                                                                                                                                                      
  - 2020-09-17 00:13:04,200 - twisted - 192 - ERROR - -     conn = _connect(dsn, connection_factory=connection_factory, **kwasync)                           
  - 2020-09-17 00:13:04,200 - twisted - 192 - ERROR - - psycopg2.OperationalError: could not connect to server: Connection refused                           
  - 2020-09-17 00:13:04,200 - twisted - 192 - ERROR - -         Is the server running on host "localhost" (127.0.0.1) and accepting                          
  - 2020-09-17 00:13:04,200 - twisted - 192 - ERROR - -         TCP/IP connections on port 5432?                                                             
  - 2020-09-17 00:13:04,201 - twisted - 192 - ERROR - -                                                                                                      
journalctl: 
  - -- Logs begin at Wed 2020-09-16 19:46:36 CEST, end at Thu 2020-09-17 00:13:04 CEST. --                                                                   
  - Sep 17 00:12:56 python[21830]: 2020-09-17 00:12:56,790 - twisted - 192 - ERROR - -   File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synap
se/storage/database.py", line 110, in make_conn                                                                                                              
  - Sep 17 00:12:56 python[21830]: 2020-09-17 00:12:56,791 - twisted - 192 - ERROR - -     db_conn = engine.module.connect(**db_params)                      
  - Sep 17 00:12:56 python[21830]: 2020-09-17 00:12:56,792 - twisted - 192 - ERROR - -   File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/psyco
pg2/__init__.py", line 127, in connect                                                                                                                       
  - Sep 17 00:12:56 python[21830]: 2020-09-17 00:12:56,794 - twisted - 192 - ERROR - -     conn = _connect(dsn, connection_factory=connection_factory, **kwas
ync)                                                                                                                                                         
  - Sep 17 00:12:56 python[21830]: 2020-09-17 00:12:56,795 - twisted - 192 - ERROR - - psycopg2.OperationalError: could not connect to server: Connection ref
used                                                                                                                                                         
  - Sep 17 00:12:56 python[21830]: 2020-09-17 00:12:56,796 - twisted - 192 - ERROR - -         Is the server running on host "localhost" (127.0.0.1) and acce
pting                                                                                                                                                        
  - Sep 17 00:12:56 python[21830]: 2020-09-17 00:12:56,797 - twisted - 192 - ERROR - -         TCP/IP connections on port 5432?                              
  - Sep 17 00:12:56 python[21830]: 2020-09-17 00:12:56,797 - twisted - 192 - ERROR - -                                                                       
  - Sep 17 00:12:57 systemd[1]: matrix-synapse.service: Main process exited, code=exited, status=1/FAILURE                                                   
  - Sep 17 00:12:57 systemd[1]: matrix-synapse.service: Unit entered failed state.                                                                           
  - Sep 17 00:12:57 systemd[1]: matrix-synapse.service: Failed with result 'exit-code'.                                                                      
  - Sep 17 00:13:00 systemd[1]: matrix-synapse.service: Service hold-off time over, scheduling restart.                                                      
  - Sep 17 00:13:00 systemd[1]: Stopped Synapse Matrix homeserver.                                                                                           
  - -- Subject: Unit matrix-synapse.service has finished shutting down                                                                                       
  - -- Defined-By: systemd                                                                                                                                   
  - -- Support: https://www.debian.org/support                                                                                                               
  - --                                                                                                                                                       
  - -- Unit matrix-synapse.service has finished shutting down.                                                                                               
  - Sep 17 00:13:00 systemd[1]: Starting Synapse Matrix homeserver...                                                                                        
  - -- Subject: Unit matrix-synapse.service has begun start-up                                                                                               
  - -- Defined-By: systemd                                                                                                                                   
  - -- Support: https://www.debian.org/support                                                                                                               
  - --                                                                                                                                                       
  - -- Unit matrix-synapse.service has begun starting up.                                                                                                    
  - Sep 17 00:13:02 systemd[1]: Started Synapse Matrix homeserver.                                                                                           
  - -- Subject: Unit matrix-synapse.service has finished start-up                                                                                            
  - -- Defined-By: systemd                                                                                                                                   
  - -- Support: https://www.debian.org/support                                                                                                               
  - --                                                                                                                                                       
  - -- Unit matrix-synapse.service has finished starting up.                                                                                                 
  - --                                                                                                                                                       
  - -- The start-up result is done.                                                                                                                          
  - Sep 17 00:13:04 python[21857]: This server is configured to use 'matrix.org' as its trusted key server via the                                           
  - Sep 17 00:13:04 python[21857]: 'trusted_key_servers' config option. 'matrix.org' is a good choice for a key                                              
  - Sep 17 00:13:04 python[21857]: server since it is long-lived, stable and trusted. However, some admins may                                               
  - Sep 17 00:13:04 python[21857]: wish to use another server for this purpose.                                                                              
  - Sep 17 00:13:04 python[21857]: To suppress this warning and continue using 'matrix.org', admins should set                                               
  - Sep 17 00:13:04 python[21857]: 'suppress_key_server_warning' to 'true' in homeserver.yaml.                                                               
  - Sep 17 00:13:04 python[21857]: --------------------------------------------------------------------------------                                          
  - Sep 17 00:13:04 python[21857]: 2020-09-17 00:13:04,172 - root - 257 - WARNING - None- ***** STARTING SERVER *****                                        
  - Sep 17 00:13:04 python[21857]: 2020-09-17 00:13:04,174 - root - 258 - WARNING - None- Server /opt/yunohost/matrix-synapse/lib/python3.5/site-packages/syn
apse/app/homeserver.py version 1.18.0                                                                                                                        
  - Sep 17 00:13:04 python[21857]: 2020-09-17 00:13:04,193 - twisted - 192 - ERROR - - Traceback (most recent call last):                                    
  - Sep 17 00:13:04 python[21857]: 2020-09-17 00:13:04,193 - twisted - 192 - ERROR - -   File "/usr/lib/python3.5/runpy.py", line 193, in _run_module_as_main
  - Sep 17 00:13:04 python[21857]: 2020-09-17 00:13:04,193 - twisted - 192 - ERROR - -     "__main__", mod_spec)                                             
  - Sep 17 00:13:04 python[21857]: 2020-09-17 00:13:04,194 - twisted - 192 - ERROR - -   File "/usr/lib/python3.5/runpy.py", line 85, in _run_code           
  - Sep 17 00:13:04 python[21857]: 2020-09-17 00:13:04,194 - twisted - 192 - ERROR - -     exec(code, run_globals)                                           
  - Sep 17 00:13:04 python[21857]: 2020-09-17 00:13:04,194 - twisted - 192 - ERROR - -   File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synap
se/app/homeserver.py", line 687, in <module>                                                                                                                 
  - Sep 17 00:13:04 python[21857]: 2020-09-17 00:13:04,195 - twisted - 192 - ERROR - -     main()                                                            
  - Sep 17 00:13:04 python[21857]: 2020-09-17 00:13:04,195 - twisted - 192 - ERROR - -   File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synap
se/app/homeserver.py", line 682, in main                                                                                                                     
  - Sep 17 00:13:04 python[21857]: 2020-09-17 00:13:04,196 - twisted - 192 - ERROR - -     hs = setup(sys.argv[1:])                                          
  - Sep 17 00:13:04 python[21857]: 2020-09-17 00:13:04,196 - twisted - 192 - ERROR - -   File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synap
se/app/homeserver.py", line 375, in setup                                                                                                                    
  - Sep 17 00:13:04 python[21857]: 2020-09-17 00:13:04,197 - twisted - 192 - ERROR - -     hs.setup()                                                        
  - Sep 17 00:13:04 python[21857]: 2020-09-17 00:13:04,197 - twisted - 192 - ERROR - -   File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synap
se/server.py", line 283, in setup                                                                                                                            
  - Sep 17 00:13:04 python[21857]: 2020-09-17 00:13:04,197 - twisted - 192 - ERROR - -     self.datastores = DataStores(self.DATASTORE_CLASS, self)          
  - Sep 17 00:13:04 python[21857]: 2020-09-17 00:13:04,198 - twisted - 192 - ERROR - -   File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synap
se/storage/data_stores/__init__.py", line 49, in __init__                                                                                                    
  - Sep 17 00:13:04 python[21857]: 2020-09-17 00:13:04,198 - twisted - 192 - ERROR - -     with make_conn(database_config, engine) as db_conn:               
  - Sep 17 00:13:04 python[21857]: 2020-09-17 00:13:04,198 - twisted - 192 - ERROR - -   File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synap
se/storage/database.py", line 110, in make_conn                                                                                                              
  - Sep 17 00:13:04 python[21857]: 2020-09-17 00:13:04,199 - twisted - 192 - ERROR - -     db_conn = engine.module.connect(**db_params)                      
  - Sep 17 00:13:04 python[21857]: 2020-09-17 00:13:04,200 - twisted - 192 - ERROR - -   File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/psyco
pg2/__init__.py", line 127, in connect                                                                                                                       
  - Sep 17 00:13:04 python[21857]: 2020-09-17 00:13:04,200 - twisted - 192 - ERROR - -     conn = _connect(dsn, connection_factory=connection_factory, **kwas
ync)                                                                                                                                                         
  - Sep 17 00:13:04 python[21857]: 2020-09-17 00:13:04,200 - twisted - 192 - ERROR - - psycopg2.OperationalError: could not connect to server: Connection ref
used                                                                                                                                                         
  - Sep 17 00:13:04 python[21857]: 2020-09-17 00:13:04,200 - twisted - 192 - ERROR - -         Is the server running on host "localhost" (127.0.0.1) and acce
pting                                                                                                                                                        
  - Sep 17 00:13:04 python[21857]: 2020-09-17 00:13:04,200 - twisted - 192 - ERROR - -         TCP/IP connections on port 5432?                              
  - Sep 17 00:13:04 python[21857]: 2020-09-17 00:13:04,201 - twisted - 192 - ERROR - -                                                                       
  - Sep 17 00:13:04 systemd[1]: matrix-synapse.service: Main process exited, code=exited, status=1/FAILURE                                                   
  - Sep 17 00:13:04 systemd[1]: matrix-synapse.service: Unit entered failed state.                                                                           
  - Sep 17 00:13:04 systemd[1]: matrix-synapse.service: Failed with result 'exit-code'.

Mokay but that’s not the Diagnosis screen … The diagnosis screen is in your webadmin, section “Diagnosis” …

Ok sorry
here your are:

Port 5350 is not reachable from outside. *
Port 8448 is not reachable from outside.

Service matrix-synapse is auto-restart :frowning:


journalctl

-- Logs begin at Thu 2020-09-17 07:40:44 CEST, end at Thu 2020-09-17 08:47:41 CEST. --
Sep 17 08:47:32 python[29982]: 2020-09-17 08:47:32,969 - twisted - 192 - ERROR - -   File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synapse/storage/database.py", line 110, in make_conn
Sep 17 08:47:32 python[29982]: 2020-09-17 08:47:32,970 - twisted - 192 - ERROR - -     db_conn = engine.module.connect(**db_params)
Sep 17 08:47:32 python[29982]: 2020-09-17 08:47:32,970 - twisted - 192 - ERROR - -   File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/psycopg2/__init__.py", line 127, in connect
Sep 17 08:47:32 python[29982]: 2020-09-17 08:47:32,970 - twisted - 192 - ERROR - -     conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
Sep 17 08:47:32 python[29982]: 2020-09-17 08:47:32,971 - twisted - 192 - ERROR - - psycopg2.OperationalError: could not connect to server: Connection refused
Sep 17 08:47:32 python[29982]: 2020-09-17 08:47:32,971 - twisted - 192 - ERROR - -         Is the server running on host "localhost" (127.0.0.1) and accepting
Sep 17 08:47:32 python[29982]: 2020-09-17 08:47:32,971 - twisted - 192 - ERROR - -         TCP/IP connections on port 5432?
Sep 17 08:47:32 python[29982]: 2020-09-17 08:47:32,971 - twisted - 192 - ERROR - -
Sep 17 08:47:33 systemd[1]: matrix-synapse.service: Main process exited, code=exited, status=1/FAILURE
Sep 17 08:47:33 systemd[1]: matrix-synapse.service: Unit entered failed state.
Sep 17 08:47:33 systemd[1]: matrix-synapse.service: Failed with result 'exit-code'.
Sep 17 08:47:36 systemd[1]: matrix-synapse.service: Service hold-off time over, scheduling restart.
Sep 17 08:47:36 systemd[1]: Stopped Synapse Matrix homeserver.
-- Subject: Unit matrix-synapse.service has finished shutting down
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit matrix-synapse.service has finished shutting down.
Sep 17 08:47:36 systemd[1]: Starting Synapse Matrix homeserver...
-- Subject: Unit matrix-synapse.service has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit matrix-synapse.service has begun starting up.
Sep 17 08:47:38 systemd[1]: Started Synapse Matrix homeserver.
-- Subject: Unit matrix-synapse.service has finished start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit matrix-synapse.service has finished starting up.
-- 
-- The start-up result is done.
Sep 17 08:47:40 python[30030]: This server is configured to use 'matrix.org' as its trusted key server via the
Sep 17 08:47:40 python[30030]: 'trusted_key_servers' config option. 'matrix.org' is a good choice for a key
Sep 17 08:47:40 python[30030]: server since it is long-lived, stable and trusted. However, some admins may
Sep 17 08:47:40 python[30030]: wish to use another server for this purpose.
Sep 17 08:47:40 python[30030]: To suppress this warning and continue using 'matrix.org', admins should set
Sep 17 08:47:40 python[30030]: 'suppress_key_server_warning' to 'true' in homeserver.yaml.
Sep 17 08:47:40 python[30030]: --------------------------------------------------------------------------------
Sep 17 08:47:40 python[30030]: 2020-09-17 08:47:40,844 - root - 257 - WARNING - None- ***** STARTING SERVER *****
Sep 17 08:47:40 python[30030]: 2020-09-17 08:47:40,846 - root - 258 - WARNING - None- Server /opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synapse/app/homeserver.py version 1.18.0
Sep 17 08:47:40 python[30030]: 2020-09-17 08:47:40,883 - twisted - 192 - ERROR - - Traceback (most recent call last):
Sep 17 08:47:40 python[30030]: 2020-09-17 08:47:40,883 - twisted - 192 - ERROR - -   File "/usr/lib/python3.5/runpy.py", line 193, in _run_module_as_main
Sep 17 08:47:40 python[30030]: 2020-09-17 08:47:40,883 - twisted - 192 - ERROR - -     "__main__", mod_spec)
Sep 17 08:47:40 python[30030]: 2020-09-17 08:47:40,884 - twisted - 192 - ERROR - -   File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
Sep 17 08:47:40 python[30030]: 2020-09-17 08:47:40,884 - twisted - 192 - ERROR - -     exec(code, run_globals)
Sep 17 08:47:40 python[30030]: 2020-09-17 08:47:40,884 - twisted - 192 - ERROR - -   File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synapse/app/homeserver.py", line 687, in <module>
Sep 17 08:47:40 python[30030]: 2020-09-17 08:47:40,884 - twisted - 192 - ERROR - -     main()
Sep 17 08:47:40 python[30030]: 2020-09-17 08:47:40,885 - twisted - 192 - ERROR - -   File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synapse/app/homeserver.py", line 682, in main
Sep 17 08:47:40 python[30030]: 2020-09-17 08:47:40,885 - twisted - 192 - ERROR - -     hs = setup(sys.argv[1:])
Sep 17 08:47:40 python[30030]: 2020-09-17 08:47:40,885 - twisted - 192 - ERROR - -   File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synapse/app/homeserver.py", line 375, in setup
Sep 17 08:47:40 python[30030]: 2020-09-17 08:47:40,886 - twisted - 192 - ERROR - -     hs.setup()
Sep 17 08:47:40 python[30030]: 2020-09-17 08:47:40,886 - twisted - 192 - ERROR - -   File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synapse/server.py", line 283, in setup
Sep 17 08:47:40 python[30030]: 2020-09-17 08:47:40,886 - twisted - 192 - ERROR - -     self.datastores = DataStores(self.DATASTORE_CLASS, self)
Sep 17 08:47:40 python[30030]: 2020-09-17 08:47:40,886 - twisted - 192 - ERROR - -   File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synapse/storage/data_stores/__init__.py", line 49, in __init__
Sep 17 08:47:40 python[30030]: 2020-09-17 08:47:40,886 - twisted - 192 - ERROR - -     with make_conn(database_config, engine) as db_conn:
Sep 17 08:47:40 python[30030]: 2020-09-17 08:47:40,886 - twisted - 192 - ERROR - -   File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synapse/storage/database.py", line 110, in make_conn
Sep 17 08:47:40 python[30030]: 2020-09-17 08:47:40,887 - twisted - 192 - ERROR - -     db_conn = engine.module.connect(**db_params)
Sep 17 08:47:40 python[30030]: 2020-09-17 08:47:40,887 - twisted - 192 - ERROR - -   File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/psycopg2/__init__.py", line 127, in connect
Sep 17 08:47:40 python[30030]: 2020-09-17 08:47:40,887 - twisted - 192 - ERROR - -     conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
Sep 17 08:47:40 python[30030]: 2020-09-17 08:47:40,887 - twisted - 192 - ERROR - - psycopg2.OperationalError: could not connect to server: Connection refused
Sep 17 08:47:40 python[30030]: 2020-09-17 08:47:40,887 - twisted - 192 - ERROR - -         Is the server running on host "localhost" (127.0.0.1) and accepting
Sep 17 08:47:40 python[30030]: 2020-09-17 08:47:40,888 - twisted - 192 - ERROR - -         TCP/IP connections on port 5432?
Sep 17 08:47:40 python[30030]: 2020-09-17 08:47:40,888 - twisted - 192 - ERROR - -
Sep 17 08:47:41 systemd[1]: matrix-synapse.service: Main process exited, code=exited, status=1/FAILURE
Sep 17 08:47:41 systemd[1]: matrix-synapse.service: Unit entered failed state.
Sep 17 08:47:41 systemd[1]: matrix-synapse.service: Failed with result 'exit-code'.

and

/var/log/matrix-synapse/homeserver.log

2020-09-17 08:47:32,959 - twisted - 192 - ERROR - -   File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
2020-09-17 08:47:32,959 - twisted - 192 - ERROR - -     exec(code, run_globals)
2020-09-17 08:47:32,960 - twisted - 192 - ERROR - -   File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synapse/app/homeserver.py", line 687, in <module>
2020-09-17 08:47:32,962 - twisted - 192 - ERROR - -     main()
2020-09-17 08:47:32,962 - twisted - 192 - ERROR - -   File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synapse/app/homeserver.py", line 682, in main
2020-09-17 08:47:32,963 - twisted - 192 - ERROR - -     hs = setup(sys.argv[1:])
2020-09-17 08:47:32,964 - twisted - 192 - ERROR - -   File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synapse/app/homeserver.py", line 375, in setup
2020-09-17 08:47:32,965 - twisted - 192 - ERROR - -     hs.setup()
2020-09-17 08:47:32,966 - twisted - 192 - ERROR - -   File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synapse/server.py", line 283, in setup
2020-09-17 08:47:32,967 - twisted - 192 - ERROR - -     self.datastores = DataStores(self.DATASTORE_CLASS, self)
2020-09-17 08:47:32,967 - twisted - 192 - ERROR - -   File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synapse/storage/data_stores/__init__.py", line 49, in __init__
2020-09-17 08:47:32,968 - twisted - 192 - ERROR - -     with make_conn(database_config, engine) as db_conn:
2020-09-17 08:47:32,969 - twisted - 192 - ERROR - -   File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synapse/storage/database.py", line 110, in make_conn
2020-09-17 08:47:32,970 - twisted - 192 - ERROR - -     db_conn = engine.module.connect(**db_params)
2020-09-17 08:47:32,970 - twisted - 192 - ERROR - -   File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/psycopg2/__init__.py", line 127, in connect
2020-09-17 08:47:32,970 - twisted - 192 - ERROR - -     conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
2020-09-17 08:47:32,971 - twisted - 192 - ERROR - - psycopg2.OperationalError: could not connect to server: Connection refused
2020-09-17 08:47:32,971 - twisted - 192 - ERROR - - 	Is the server running on host "localhost" (127.0.0.1) and accepting
2020-09-17 08:47:32,971 - twisted - 192 - ERROR - - 	TCP/IP connections on port 5432?
2020-09-17 08:47:32,971 - twisted - 192 - ERROR - - 
2020-09-17 08:47:40,843 - twisted - 192 - INFO - None- Redirected stdout/stderr to logs
2020-09-17 08:47:40,844 - root - 257 - WARNING - None- ***** STARTING SERVER *****
2020-09-17 08:47:40,846 - root - 258 - WARNING - None- Server /opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synapse/app/homeserver.py version 1.18.0
2020-09-17 08:47:40,846 - root - 259 - INFO - None- Server hostname: lokal.social
2020-09-17 08:47:40,850 - root - 260 - INFO - None- Instance name: master
2020-09-17 08:47:40,851 - synapse.app.homeserver - 372 - INFO - None- Setting up server
2020-09-17 08:47:40,851 - synapse.server - 281 - INFO - None- Setting up.
2020-09-17 08:47:40,883 - twisted - 192 - ERROR - - Traceback (most recent call last):
2020-09-17 08:47:40,883 - twisted - 192 - ERROR - -   File "/usr/lib/python3.5/runpy.py", line 193, in _run_module_as_main
2020-09-17 08:47:40,883 - twisted - 192 - ERROR - -     "__main__", mod_spec)
2020-09-17 08:47:40,884 - twisted - 192 - ERROR - -   File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
2020-09-17 08:47:40,884 - twisted - 192 - ERROR - -     exec(code, run_globals)
2020-09-17 08:47:40,884 - twisted - 192 - ERROR - -   File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synapse/app/homeserver.py", line 687, in <module>
2020-09-17 08:47:40,884 - twisted - 192 - ERROR - -     main()
2020-09-17 08:47:40,885 - twisted - 192 - ERROR - -   File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synapse/app/homeserver.py", line 682, in main
2020-09-17 08:47:40,885 - twisted - 192 - ERROR - -     hs = setup(sys.argv[1:])
2020-09-17 08:47:40,885 - twisted - 192 - ERROR - -   File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synapse/app/homeserver.py", line 375, in setup
2020-09-17 08:47:40,886 - twisted - 192 - ERROR - -     hs.setup()
2020-09-17 08:47:40,886 - twisted - 192 - ERROR - -   File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synapse/server.py", line 283, in setup
2020-09-17 08:47:40,886 - twisted - 192 - ERROR - -     self.datastores = DataStores(self.DATASTORE_CLASS, self)
2020-09-17 08:47:40,886 - twisted - 192 - ERROR - -   File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synapse/storage/data_stores/__init__.py", line 49, in __init__
2020-09-17 08:47:40,886 - twisted - 192 - ERROR - -     with make_conn(database_config, engine) as db_conn:
2020-09-17 08:47:40,886 - twisted - 192 - ERROR - -   File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synapse/storage/database.py", line 110, in make_conn
2020-09-17 08:47:40,887 - twisted - 192 - ERROR - -     db_conn = engine.module.connect(**db_params)
2020-09-17 08:47:40,887 - twisted - 192 - ERROR - -   File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/psycopg2/__init__.py", line 127, in connect
2020-09-17 08:47:40,887 - twisted - 192 - ERROR - -     conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
2020-09-17 08:47:40,887 - twisted - 192 - ERROR - - psycopg2.OperationalError: could not connect to server: Connection refused
2020-09-17 08:47:40,887 - twisted - 192 - ERROR - - 	Is the server running on host "localhost" (127.0.0.1) and accepting
2020-09-17 08:47:40,888 - twisted - 192 - ERROR - - 	TCP/IP connections on port 5432?
2020-09-17 08:47:40,888 - twisted - 192 - ERROR - -

THis helped:

systemctl start postgresql

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.