Synapse – Server Errors by federation


#1

I was really happy with my yunohost / synapse installation but today i found out that federation to other servers is not really working well.

Up to today I tested federation just with the server of matrix.org and that did work well. But today I tried as well servers from this list:

https://www.hello-matrix.net/public_servers.php

Just connections with https://riot.allmende.io was working –
With a new account created on this ohter Servers I was not able to reach my server - just got all kind of server errors.

Like:

“Matrix Error: guest access not allowed

or

Internal server error

or

No known servers

Now what is going on, what is the reason for this? Has anybody experienced similar problems?? Thanks for help


Matrix-synapse Killed since 3.4.2.3 migration
#2

Maybe the federation is broken because you use a self signed certificat.

To solve that upgrade to the testing version

yunohost app upgrade synapse -u https://github.com/YunoHost-Apps/synapse_ynh/tree/testing

And use a valide certificate like with let’s encrypt.


#3

just gave it a try…
But ‘Upgrade ‘synapse’ application’ has failed!

here is the error log:

https://paste.yunohost.org/raw/qolukerure


#4

Look like that postgresql is down. Are you sure that postgresql is running ?


#5

same how my system seams broken
I see that “redis-server” and" rspamd" services failed to start

Hmm… in the web-interface yunohost / services – I don´t see postgresql listed.

But The command line

service postgresql restart

gives me no error … so postgresql is running?

Thanks for your help

have a look also on this

root@my:~# yunohost app upgrade synapse -u https://github.com/YunoHost-Apps/synapse_ynh/tree/testing 
Info: Upgrading apps synapse
Info: Upgrading app synapse…
Warning: 10174 /var/lib/matrix-synapse will not be saved, because backup_core_only is set.
Warning: 10814 could not change directory to "/home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/syn
apse/backup": Permission denied                                                                      
Warning: 10821 pg_dump: [archiver (db)] connection to database "matrix_synapse" failed: could not con
nect to server: No such file or directory                                                            
Warning: 10825         Is the server running locally and accepting
Warning: 10828         connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
Warning: 10830 !!
Warning: 10833   synapse's script has encountered an error. Its execution was cancelled.
Warning: 10836 !!
Warning: 10839
Warning: 11058 Unable to back up the app 'synapse'
Warning: Traceback (most recent call last):
Warning:   File "/usr/lib/moulinette/yunohost/backup.py", line 685, in _collect_app_files
Warning:     raise_on_error=True, chdir=tmp_app_bkp_dir, env=env_dict)
Warning:   File "/usr/lib/moulinette/yunohost/hook.py", line 390, in hook_exec
Warning:     raise YunohostError('hook_exec_failed', path=path)
Warning: YunohostError: Script execution failed: /tmp/backup_ccohAM
Warning: 11068 There is nothing to save
Warning: !!
Warning:   synapse's script has encountered an error. Its execution was cancelled.
Warning: !!
Warning: 
Error: Unable to upgrade synapse
Info: The operation 'Upgrade 'synapse' application' has failed! To get help, please share the full lo
g of this operation using the command 'yunohost log display 20190301-xxxxx-app_upgrade-synapse --sha
re'                                                                                                  
Error: No app to upgrade
root@my:~#

#6

some things are really broken now – don´t know why, and what I did wrong.

now service: matrix-synapse shows Status: activating

what do you suggest? Un – and reinstall ?


#7

with riot I can´t reach anymore my homeserver – what sell I do? Please Hep - thanks


#8

did an update to yunohost 3.4.2.4 - may this be a reason why synapce is not working anymore?


#9

Josue what do you think ? shell i do a reinstall , or do you have any idea what I could try ? Thanks


#10

Well,

Ca you resume your last problem and what you did, because as I understand, you did many things and you had multiple problem…


#11

I´m on a arm / cubietruck yunohost

after I realized that my synapse installation did not federate with other servers i checked for updates…

I Upgrade debian packages

and
Regenerate system configurations ‘all’

this lead to an inaccessibility of the server. Restart was needed.

updated

yunohost app upgrade synapse -u https://github.com/YunoHost-Apps/synapse_ynh/tree/testing

to did not work

updated to YunoHost 3.4.2.4

after that I realized that synapse did not start right - Status=activating

since than - riot can´t log in since synapse in not working right.


#12

Ok so did you try a upgrade after the update of Yunohost to 3.4 ?

If not can you try a new time an update by this command:

yunohost app upgrade synapse -u https://github.com/YunoHost-Apps/synapse_ynh/tree/testing

(but as I understand you had some trouble with postgresql, so I recommand to you, before the upgrade, to check if postgresql is running cleanly by this command : sudo -u postgres psql, if you have no problem you should have a postgresql terminal, so you can exit by \q).


#13

Thanks Josue - so I treid:

that gives me:

root@my:~# sudo -u postgres psql                                                                                         
could not change directory to "/root": Permission denied                                                                 
psql: could not connect to server: No such file or directory                                                             
        Is the server running locally and accepting                                                                      
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?                                           
root@my:~#                                                                                                               

any idea ??


#14

Try to restart it by : systemctl start postgresql


#15

systemctl start postgresql

does not give me any errors

root@my:~# systemctl start postgresql
root@my:~# sudo -u postgres psql                                                                             
could not change directory to "/root": Permission denied                                                     
psql: could not connect to server: No such file or directory                                                 
        Is the server running locally and accepting                                                          
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?                               
root@my:~#

#16

It look like that your postgresql installation is broken.


#17

I´m still in testing mode – so i could do a reinstall if that would help to solve the problem.
But i´m also interested to know why my installation is broken now.
I was just about to advertise my matrix servers to friends… imagine that they would have to lose there accounts by a needed reinstall is kind of a bad feeling.

So what can I do? Can you make a suggestion Thanks


#18

What about :

systemctl restart postgresql@9.6-main.service
systemctl status postgresql@9.6-main.service

(I noticed the other day that the service postgresql ain’t the “real” service …)


#19

ok - now I see this errors

root@my:~# systemctl restart postgresql@9.6-main.service                                                           
Job for postgresql@9.6-main.service failed because the control process exited with error code.                     
See "systemctl status postgresql@9.6-main.service" and "journalctl -xe" for details.                               
root@my:~# systemctl status postgresql@9.6-main.service                                                            
● postgresql@9.6-main.service - PostgreSQL Cluster 9.6-main
   Loaded: loaded (/lib/systemd/system/postgresql@.service; disabled; vendor preset: enabled)                      
   Active: failed (Result: exit-code) since Tue 2019-03-05 18:41:39 UTC; 40s ago
  Process: 6435 ExecStart=postgresql@9.6-main --skip-systemctl-redirect 9.6-main start (code=exited, status=1/FAILU
                                                                                                                   
Mar 05 18:41:08 my.domain.tdl systemd[1]: Starting PostgreSQL Cluster 9.6-main...                                  
Mar 05 18:41:39 my.domain.tdl postgresql@9.6-main[6435]: The PostgreSQL server failed to start. Please check the lo
Mar 05 18:41:39 my.domain.tdl systemd[1]: postgresql@9.6-main.service: Control process exited, code=exited status=1
Mar 05 18:41:39 my.domain.tdl systemd[1]: Failed to start PostgreSQL Cluster 9.6-main.
Mar 05 18:41:39 my.domain.tdl systemd[1]: postgresql@9.6-main.service: Unit entered failed state.                  
Mar 05 18:41:39 my.domain.tdl systemd[1]: postgresql@9.6-main.service: Failed with result 'exit-code'.             
lines 1-11/11 (END)

root@my:~# journalctl -xe                                                                                          
-- The leading process of the session is 6561.
Mar 05 18:46:08 my.domain.tdl systemd[1]: Started Session 1570 of user root.                                       
-- Subject: Unit session-1570.scope has finished start-up                                                          
-- Defined-By: systemd                                                                                             
-- Support: https://www.debian.org/support                                                                         
--                                                                                                                 
-- Unit session-1570.scope has finished starting up.                                                               
--                                                                                                                 
-- The start-up result is done.                                                                                    
Mar 05 18:46:08 my.domain.tdl login[6573]: ROOT LOGIN  on '/dev/pts/1' from '127.0.0.1'                            
Mar 05 18:46:09 my.domain.tdl mix[28544]: 18:46:09.534 [error] Postgrex.Protocol (#PID<0.368.0>) failed to connect:
Mar 05 18:46:13 my.domain.tdl mix[28544]: 18:46:13.396 [error] Postgrex.Protocol (#PID<0.365.0>) failed to connect:
Mar 05 18:46:15 my.domain.tdl mix[28544]: 18:46:15.822 [error] Postgrex.Protocol (#PID<0.367.0>) failed to connect:
Mar 05 18:46:20 my.domain.tdl mix[28544]: 18:46:20.303 [error] Postgrex.Protocol (#PID<0.361.0>) failed to connect:
Mar 05 18:46:21 my.domain.tdl mix[28544]: 18:46:21.533 [error] Postgrex.Protocol (#PID<0.366.0>) failed to connect:
Mar 05 18:46:21 my.domain.tdl mix[28544]: 18:46:21.733 [error] Postgrex.Protocol (#PID<0.364.0>) failed to connect:
Mar 05 18:46:22 my.domain.tdl mix[28544]: 18:46:22.000 [error] Postgrex.Protocol (#PID<0.358.0>) failed to connect:
Mar 05 18:46:23 my.domain.tdl mix[28544]: 18:46:23.556 [error] Postgrex.Protocol (#PID<0.365.0>) failed to connect:
Mar 05 18:46:24 my.domain.tdl mix[28544]: 18:46:24.285 [error] Postgrex.Protocol (#PID<0.362.0>) failed to connect:
Mar 05 18:46:25 my.domain.tdl mix[28544]: 18:46:25.986 [error] Postgrex.Protocol (#PID<0.363.0>) failed to connect:

Any idea what I can do ? - THANKS


#20

What about :

tail -n 100 /var/log/postgresql/postgresql-9.6-main.log