Seahub not starting due to MySQL connection error

Hi all,

I’ve a Seafile 8 installed on a raspberry pi working fine since today. I’ve restarted the system and suddenly Seahub does not start:

LC_ALL is not set in ENV, set to en_US.UTF-8
/opt/seafile/seafile-server-latest/seahub.sh: línea 210: aviso: setlocale: LC_ALL: no se puede 
cambiar el local (en_US.UTF-8): No existe el fichero o el directorio
Starting seahub at port 8000 ...
Error:Seahub failed to start.
Please try to run "./seahub.sh start" again

The first alerts regarding LC_ALL and UTF-8 are expected, allways been there.

If I go to the logs, I can see the error in seahub log:

 File "/opt/seafile/seafile-server-8.0.7/seahub/thirdpart/MySQLdb/connections.py", line 185, in __init__
super().__init__(*args, **kwargs2)
django.db.utils.OperationalError: (2002, "Can't connect to MySQL server on '127.0.0.1' (115)")

I’ve checked the /opt/seafile/conf/seahub_settings.py and the server IP is the 127.0.0.1, database name, user, password are all OK. I’ve reset the password for the seafile user in MySQL (MariaDB 10), but still not able to login (I don’t know if it is expected):

sudo mysql -u seafile -p
Enter password:
ERROR 1698 (28000): Access denied for user 'seafile'@'localhost'

Any idea how to proceed?

Thanks

By the way, I’ve a backup of MySQL database from months ago. I’ve not added/removed libraries nor uses, I’ve just added and modified files in the default admin library.

Can I restore the mysql databases backup safely? Or it would break seafile?

Thanks

Hi all,

I’ve finally found the issue with MySQL (MariaDB 10). By any unknown reason, seems that seafile is using 127.0.0.1 and root is using localhost as server.

I went to the path

etc/mysql/mariadb.conf.d

And edited the file 50-server.cnf, adding a # into the bind-address = 127.0.0.1

After a reboot of MySQL, Seahub started.

Thanks

1 Like