Synapse – Server Errors by federation


#21

thanks Aleks for your input

tail -n 100 /var/log/postgresql/postgresql-9.6-main.log does not give me anything

root@my:~# tail -n 100 /var/log/postgresql/postgresql-9.6-main.log                                                 
root@my:~#    

Any idea what I can try next? - THANKS


#22

Hm sounds like that’s not the right file to check … Re-reading the previous posts, can you try to :

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

(notice the | cat at the end of the second command which is a trick to prevent systemctl from truncating the output where the precious info is hiding…)


#23

ok that gives me:

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 | cat                                                     
● 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 Wed 2019-03-06 06:56:33 UTC; 26s ago                                   
  Process: 17352 ExecStart=postgresql@9.6-main --skip-systemctl-redirect 9.6-main start (code=exited, status=1/FAIL
URE)                                                                                                               
                                                                                                                   
Mar 06 06:56:02 my.domain.tdl systemd[1]: Starting PostgreSQL Cluster 9.6-main...                                  
Mar 06 06:56:33 my.domain.tdl postgresql@9.6-main[17352]: The PostgreSQL server failed to start. Please check the l
og output.                                                                                                         
Mar 06 06:56:33 my.domain.tdl systemd[1]: postgresql@9.6-main.service: Control process exited, code=exited status=1
Mar 06 06:56:33 my.domain.tdl systemd[1]: Failed to start PostgreSQL Cluster 9.6-main.                             
Mar 06 06:56:33 my.domain.tdl systemd[1]: postgresql@9.6-main.service: Unit entered failed state.                  
Mar 06 06:56:33 my.domain.tdl systemd[1]: postgresql@9.6-main.service: Failed with result 'exit-code'.             
root@my:~#

What can I do next? THANKS


#24

that how it looks like:

“services”: {
“php7.0-fpm”: “running (enabled)”,
“fail2ban”: “running (enabled)”,
“yunohost-api”: “running (enabled)”,
“mysql”: “running (enabled)”,
“cryptpad”: “running (enabled)”,
“glances”: “running (enabled)”,
“pure-ftpd-ldap”: “running (enabled)”,
“rspamd”: “failed (enabled)”,
“shellinabox”: “running (enabled)”,
“coturn-synapse”: “running (enabled)”,
“avahi-daemon”: “running (enabled)”,
“dovecot”: “running (enabled)”,
“uwsgi”: “running (enabled)”,
“nslcd”: “running (enabled)”,
“nginx”: “running (enabled)”,
“ssh”: “running (enabled)”,
“redis-server”: “failed (enabled)”,
“pleroma”: “running (enabled)”,
“metronome”: “running (enabled)”,
“postfix”: “exited (enabled)”,
“yunohost-firewall”: “exited (enabled)”,
“dnsmasq”: “running (enabled)”,
“matrix-synapse”: “dead (enabled)”,
“slapd”: “running (enabled)”


#25

Please - need help - what shell i do?


#26

Hmm so what does this show ?

ls -thor /var/log/postgresql/

#27
root@my:~# ls -thor /var/log/postgresql/                                                                                              
total 0                                                                                                                               
-rw-r----- 1 root 0 Mar  6 15:15 postgresql-9.6-main.log                                                                              
root@my:~#

#28

Zblerg,

can you try to

systemctl restart postgresql@9.6-main

then “immediately” after

tail -n 100 /var/log/daemon.log

#29

THANKS

here we go:

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


#30

Djeez I don’t understand why this is so complicated to find the actual log / message …

Does journalctl -u postgresql@9.6-main

gives something more detailed ?


#31
root@my:~# journalctl -u postgresql@9.6-main                                                              
-- Logs begin at Thu 2019-03-07 07:26:06 UTC, end at Thu 2019-03-07 19:39:50 UTC. --                      
Mar 07 18:34:47 my.domain.tdl systemd[1]: Starting PostgreSQL Cluster 9.6-main...                         
Mar 07 18:35:18 my.domain.tdl postgresql@9.6-main[20117]: The PostgreSQL server failed to start. Please ch
Mar 07 18:35:18 my.domain.tdl systemd[1]: postgresql@9.6-main.service: Control process exited, code=exited
Mar 07 18:35:18 my.domain.tdl systemd[1]: Failed to start PostgreSQL Cluster 9.6-main.
Mar 07 18:35:18 my.domain.tdl systemd[1]: postgresql@9.6-main.service: Unit entered failed state.         
Mar 07 18:35:18 my.domain.tdl systemd[1]: postgresql@9.6-main.service: Failed with result 'exit-code'.    
lines 1-7/7 (END)

#32
root@my:~# systemctl restart postgresql@9.6-main                                                          
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:~# journalctl -u postgresql@9.6-main                                                              
-- Logs begin at Thu 2019-03-07 07:26:06 UTC, end at Thu 2019-03-07 19:46:11 UTC. --                      
Mar 07 18:34:47 my.domain.tdl systemd[1]: Starting PostgreSQL Cluster 9.6-main...                         
Mar 07 18:35:18 my.domain.tdl postgresql@9.6-main[20117]: The PostgreSQL server failed to start. Please ch
Mar 07 18:35:18 my.domain.tdl systemd[1]: postgresql@9.6-main.service: Control process exited, code=exited
Mar 07 18:35:18 my.domain.tdl systemd[1]: Failed to start PostgreSQL Cluster 9.6-main.
Mar 07 18:35:18 my.domain.tdl systemd[1]: postgresql@9.6-main.service: Unit entered failed state.         
Mar 07 18:35:18 my.domain.tdl systemd[1]: postgresql@9.6-main.service: Failed with result 'exit-code'.    
Mar 07 19:45:29 my.domain.tdl systemd[1]: Starting PostgreSQL Cluster 9.6-main...                         
Mar 07 19:46:00 my.domain.tdl postgresql@9.6-main[21072]: The PostgreSQL server failed to start. Please ch
Mar 07 19:46:00 my.domain.tdl systemd[1]: postgresql@9.6-main.service: Control process exited, code=exited
Mar 07 19:46:00 my.domain.tdl systemd[1]: Failed to start PostgreSQL Cluster 9.6-main.
Mar 07 19:46:00 my.domain.tdl systemd[1]: postgresql@9.6-main.service: Unit entered failed state.         
Mar 07 19:46:00 my.domain.tdl systemd[1]: postgresql@9.6-main.service: Failed with result 'exit-code'.    
lines 1-13/13 (END)

#33

I´m totally lost…

Alex – do you have any idea what could go on?

I don’t want to stress your time to much … do you think it is better to do a reinstall?


#34

Meeeh, I don’t understand why this is so complicated to find the appropriate log file … Yet it would be useful to know this for the future :confused: Also I don’t think reinstalling the app is gonna solve this …

Anyway … What about if you do :

systemctl restart postgresql@9.6-main  # Just to retrigger the error

then

ls -thor /var/log | tail -n 10

#35

Thanks Aleks

root@my:~# systemctl restart postgresql@9.6-main  # Just to retrigger the error                                           
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:~# ls -thor /var/log | tail -n 10                                                                                 
-rw-r----- 1 root 244K Mar  8 00:26 mail.warn                                                                             
-rw-r----- 1 root  13K Mar  8 00:29 mail.log                                                                              
-rw-r----- 1 root 861K Mar  8 00:29 mail.info                                                                             
-rw-r----- 1 root 8.5K Mar  8 00:32 debug                                                                                 
-rw-r----- 1 root  24K Mar  8 00:32 fail2ban.log                                                                          
-rw-rw-r-- 1 root 1.9K Mar  8 01:00 wtmp                                                                                  
-rw-rw-r-- 1 root  292 Mar  8 01:00 lastlog                                                                               
-rw-r----- 1 root 264K Mar  8 01:00 auth.log                                                                              
-rw-r----- 1 root  13M Mar  8 01:03 syslog                                                                                
-rw-r----- 1 root  13M Mar  8 01:03 daemon.log                                                                            
root@my:~#

#36

Okay let’s do this another way …

What does this shows ?

/usr/lib/postgresql/9.6/bin/postgres -D /var/lib/postgresql/9.6/main -c config_file=/etc/postgresql/9.6/main/postgresql.conf


#37
root@my:~# /usr/lib/postgresql/9.6/bin/postgres -D /var/lib/postgresql/9.6/main -c config_file=/etc/postgresql/9.6/main/po
stgresql.conf                                                                                                             
"root" execution of the PostgreSQL server is not permitted.                                                               
The server must be started under an unprivileged user ID to prevent                                                       
possible system security compromise.  See the documentation for                                                           
more information on how to properly start the server.                                                                     
root@my:~#             

You know i had trouble with root and admin privileges on my armbian/Yunohost/ cubietruck image based system during the the yunohost installation in the first place – did the last updates change anything in this diction dealing with PostgreSQL?


#38
admin@my:~$ /usr/lib/postgresql/9.6/bin/postgres -D /var/lib/postgresql/9.6/main -c config_file=/etc/postgresql/9.6/main/p
ostgresql.conf                                                                                                            
LOG:  skipping missing configuration file "/var/lib/postgresql/9.6/main/postgresql.auto.conf"                             
2019-03-08 07:14:43.302 UTC [29577] FATAL:  data directory "/var/lib/postgresql/9.6/main" has wrong ownership             
2019-03-08 07:14:43.302 UTC [29577] HINT:  The server must be started by the user that owns the data directory.           
admin@my:~$

#39

And what is the result of tail -n 20 /var/log/postgresql/postgresql-9.6-main.log ?


#40
root@my:~# tail -n 20 /var/log/postgresql/postgresql-9.6-main.log                                          
root@my:~#