502 on fresh install: Access denied for user 'seafile'@'172.26.0.4' (using password: YES)

EDIT: My solution was to just drop openSUSE and switch to Debian where it works fine.

Hello,

I have tried on both openSUSE Leap and Rocky Linux, with both docker and podman, and nothing has worked.

I download the docker-compose.yml file, I change the data directory to a mount for another drive, I change timezone, email, admin password, hostname, and nothing else.

However, upon running docker compose up -d I go to the port for the seafile and I get http 502.
docker compose logs -f shows the following:

seafile            | 
seafile            | verifying password of user seafile ...  
seafile            | Failed to connect to mysql server using user "seafile" and password "***": Access denied for user 'seafile'@'172.28.0.4' (using password: YES)
seafile            | 
seafile            | [2023-06-04 19:52:53] Now running setup-seafile-mysql.py in auto mode.
seafile            | Traceback (most recent call last):
seafile            |   File "/scripts/start.py", line 95, in <module>
seafile            |     main()
seafile            |   File "/scripts/start.py", line 59, in main
seafile            |     init_seafile_server()
seafile            |   File "/scripts/bootstrap.py", line 158, in init_seafile_server
seafile            |     call('{} auto -n seafile'.format(setup_script), env=env)
seafile            |   File "/scripts/utils.py", line 70, in call
seafile            |     return subprocess.check_call(*a, **kw)
seafile            |   File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
seafile            |     raise CalledProcessError(retcode, cmd)
seafile            | subprocess.CalledProcessError: Command '/opt/seafile/seafile-server-10.0.1/setup-seafile-mysql.sh auto -n seafile' returned non-zero exit status 255.```

I’ve also tried to go to the shell of the seafile-mysql container and ran these commands in mysql:

GRANT ALL ON *.* TO 'seafile'@'%.%.%.%';
FLUSH privileges;

but it does not work. Maybe I need the password for the seafile user to grant it access? How can I find it?

1 Like

I got the same error within a “fresh” install of truecharts container of seafile server (11.0.2). Help needed !

Hi Fishe,

Do you have to use Docker?

I am only saying this as you can install a fresh Ubuntu or CentOS and use the script to install?

Let me know if you have any questions regarding this!