Open mikniche opened 5 days ago
Hello, thank you for the detailed issue report. I'm currently traveling, so I can only provide limited support. Could you please try to delete all volumes related to this stack and start from scratch. During initial setup, seafile creates a database user named seafile. The credentials of this user are written to some of the config files. Seems like something went wrong here.
Thanks - I appreciate you are away and difficult to support on the road.
Here are logs from the containers when started from scratch, after deleting the local filesystem content.
This is the logs from seafile-db:
2024-11-20 9:53:30 0 [Note] mariadbd (initiated by: unknown): Normal shutdown
2024-11-20 9:53:30 0 [Note] InnoDB: FTS optimize thread exiting.
2024-11-20 9:53:30 0 [Note] InnoDB: Starting shutdown...
2024-11-20 9:53:30 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
2024-11-20 9:53:30 0 [Note] InnoDB: Buffer pool(s) dump completed at 241120 9:53:30
2024-11-20 9:53:30 0 [Note] InnoDB: Removed temporary tablespace data file: "./ibtmp1"
2024-11-20 9:53:30 0 [Note] InnoDB: Shutdown completed; log sequence number 1048926; transaction id 749
2024-11-20 9:53:30 0 [Note] mariadbd: Shutdown complete
2024-11-20 11:51:12+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.11.9+maria~ubu2204 started.
2024-11-20 11:51:12+00:00 [Warn] [Entrypoint]: /sys/fs/cgroup///memory.pressure not writable, functionality unavailable to MariaDB
2024-11-20 11:51:12+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2024-11-20 11:51:12+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.11.9+maria~ubu2204 started.
2024-11-20 11:51:12+00:00 [Note] [Entrypoint]: Initializing database files
2024-11-20 11:51:12 0 [Warning] mariadbd: io_uring_queue_init() failed with errno 1
2024-11-20 11:51:12 0 [Warning] InnoDB: liburing disabled: falling back to innodb_use_native_aio=OFF
2024-11-20 11:51:13+00:00 [Note] [Entrypoint]: Database files initialized
2024-11-20 11:51:13+00:00 [Note] [Entrypoint]: Starting temporary server
2024-11-20 11:51:13+00:00 [Note] [Entrypoint]: Waiting for server startup
2024-11-20 11:51:13 0 [Note] Starting MariaDB 10.11.9-MariaDB-ubu2204 source revision 0e8fb977b00983d98c4c35e39bc1f36463095938 server_uid b0BEp/7i1M7WUyPZRlhL6AEerk0= as process 98
2024-11-20 11:51:13 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2024-11-20 11:51:13 0 [Note] InnoDB: Number of transaction pools: 1
2024-11-20 11:51:13 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2024-11-20 11:51:13 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts)
2024-11-20 11:51:13 0 [Warning] mariadbd: io_uring_queue_init() failed with errno 1
2024-11-20 11:51:13 0 [Warning] InnoDB: liburing disabled: falling back to innodb_use_native_aio=OFF
2024-11-20 11:51:13 0 [Note] InnoDB: Initializing buffer pool, total size = 128.000MiB, chunk size = 2.000MiB
2024-11-20 11:51:13 0 [Note] InnoDB: Completed initialization of buffer pool
2024-11-20 11:51:13 0 [Note] InnoDB: Buffered log writes (block size=512 bytes)
2024-11-20 11:51:13 0 [Note] InnoDB: End of log at LSN=45502
2024-11-20 11:51:13 0 [Note] InnoDB: 128 rollback segments are active.
2024-11-20 11:51:13 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ...
2024-11-20 11:51:13 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
2024-11-20 11:51:13 0 [Note] InnoDB: log sequence number 45502; transaction id 14
2024-11-20 11:51:13 0 [Note] Plugin 'FEEDBACK' is disabled.
2024-11-20 11:51:13 0 [Note] mariadbd: ready for connections.
Version: '10.11.9-MariaDB-ubu2204' socket: '/run/mysqld/mysqld.sock' port: 0 mariadb.org binary distribution
2024-11-20 11:51:14+00:00 [Note] [Entrypoint]: Temporary server started.
2024-11-20 11:51:15+00:00 [Note] [Entrypoint]: Securing system users (equivalent to running mysql_secure_installation)
2024-11-20 11:51:15+00:00 [Note] [Entrypoint]: Stopping temporary server
2024-11-20 11:51:15 0 [Note] mariadbd (initiated by: unknown): Normal shutdown
2024-11-20 11:51:15 0 [Note] InnoDB: FTS optimize thread exiting.
2024-11-20 11:51:15 0 [Note] InnoDB: Starting shutdown...
2024-11-20 11:51:15 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
2024-11-20 11:51:15 0 [Note] InnoDB: Buffer pool(s) dump completed at 241120 11:51:15
2024-11-20 11:51:15 0 [Note] InnoDB: Removed temporary tablespace data file: "./ibtmp1"
2024-11-20 11:51:15 0 [Note] InnoDB: Shutdown completed; log sequence number 47092; transaction id 15
2024-11-20 11:51:15 0 [Note] mariadbd: Shutdown complete
2024-11-20 11:51:15+00:00 [Note] [Entrypoint]: Temporary server stopped
2024-11-20 11:51:15+00:00 [Note] [Entrypoint]: MariaDB init process done. Ready for start up.
2024-11-20 11:51:15 0 [Note] Starting MariaDB 10.11.9-MariaDB-ubu2204 source revision 0e8fb977b00983d98c4c35e39bc1f36463095938 server_uid b0BEp/7i1M7WUyPZRlhL6AEerk0= as process 1
2024-11-20 11:51:15 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2024-11-20 11:51:15 0 [Note] InnoDB: Number of transaction pools: 1
2024-11-20 11:51:15 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2024-11-20 11:51:15 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts)
2024-11-20 11:51:15 0 [Warning] mariadbd: io_uring_queue_init() failed with errno 1
2024-11-20 11:51:15 0 [Warning] InnoDB: liburing disabled: falling back to innodb_use_native_aio=OFF
2024-11-20 11:51:15 0 [Note] InnoDB: Initializing buffer pool, total size = 128.000MiB, chunk size = 2.000MiB
2024-11-20 11:51:15 0 [Note] InnoDB: Completed initialization of buffer pool
2024-11-20 11:51:15 0 [Note] InnoDB: Buffered log writes (block size=512 bytes)
2024-11-20 11:51:15 0 [Note] InnoDB: End of log at LSN=47092
2024-11-20 11:51:15 0 [Note] InnoDB: 128 rollback segments are active.
2024-11-20 11:51:15 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ...
2024-11-20 11:51:15 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
2024-11-20 11:51:15 0 [Note] InnoDB: log sequence number 47092; transaction id 16
2024-11-20 11:51:15 0 [Note] Plugin 'FEEDBACK' is disabled.
2024-11-20 11:51:15 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2024-11-20 11:51:15 0 [Note] InnoDB: Buffer pool(s) load completed at 241120 11:51:15
2024-11-20 11:51:15 0 [Warning] You need to use --log-bin to make --expire-logs-days or --binlog-expire-logs-seconds work.
2024-11-20 11:51:15 0 [Note] Server socket created on IP: '0.0.0.0'.
2024-11-20 11:51:15 0 [Note] Server socket created on IP: '::'.
2024-11-20 11:51:15 0 [Note] mariadbd: ready for connections.
Version: '10.11.9-MariaDB-ubu2204' socket: '/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution
2024-11-20 11:51:23 5 [Warning] Aborted connection 5 to db: 'unconnected' user: 'root' host: '192.168.90.44' (Got an error reading communication packets)
2024-11-20 11:51:23 7 [Warning] Aborted connection 7 to db: 'seahub_db' user: 'seafile' host: '192.168.90.44' (Got an error reading communication packets)
This is the logs from seafile-server:
---------------------------------
This is your configuration
---------------------------------
server name: seafile
server ip/domain: https://seafile.admin.com
seafile data dir: /opt/seafile/seafile-data
fileserver port: 8082
database: create new
ccnet database: ccnet_db
seafile database: seafile_db
seahub database: seahub_db
database user: seafile
Generating ccnet configuration ...
Generating seafile configuration ...
done
Generating seahub configuration ...
----------------------------------------
Now creating seafevents database tables ...
----------------------------------------
----------------------------------------
Now creating ccnet database tables ...
----------------------------------------
----------------------------------------
Now creating seafile database tables ...
----------------------------------------
----------------------------------------
Now creating seahub database tables ...
----------------------------------------
Error: Failed to prepare seahub avatars dir: [Errno 22] Invalid argument: 'groups'
Traceback (most recent call last):
File "/scripts/start.py", line 66, in <module>
main()
File "/scripts/start.py", line 50, in main
init_seafile_server()
File "/scripts/bootstrap.py", line 80, in init_seafile_server
call('{} auto -n seafile'.format(setup_script), env=env)
File "/scripts/utils/__init__.py", line 70, in call
return subprocess.check_call(*a, **kw)
File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '/opt/seafile/seafile-server-11.0.12/setup-seafile-mysql.sh auto -n seafile' returned non-zero exit status 1.
Waiting for SeaRPC socket...
[2024-11-20 11:51:28] Now running setup-seafile-mysql.py in auto mode.
Checking python on this machine ...
verifying password of user root ... done
verifying password of user seafile ...
Failed to connect to mysql server using user "seafile" and password "***": Access denied for user 'seafile'@'192.168.90.44' (using password: YES)
Traceback (most recent call last):
File "/scripts/start.py", line 66, in <module>
main()
File "/scripts/start.py", line 50, in main
init_seafile_server()
File "/scripts/bootstrap.py", line 80, in init_seafile_server
call('{} auto -n seafile'.format(setup_script), env=env)
File "/scripts/utils/__init__.py", line 70, in call
return subprocess.check_call(*a, **kw)
File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '/opt/seafile/seafile-server-11.0.12/setup-seafile-mysql.sh auto -n seafile' returned non-zero exit status 255.
Waiting for SeaRPC socket...
[2024-11-20 11:51:28] Now running setup-seafile-mysql.py in auto mode.
Checking python on this machine ...
verifying password of user root ... done
The warnings thrown by mariadb indicate that there were successful connections made with the user seafile that were then aborted. So it's quite odd that the connection test fails with the access denied error.
At the moment my only guess would be compatibility issues with ZFS. You could try to connect to the mariadb and see if the user seafile is actually created with the credentials stored in the seafile config files.
Thank you for the reply. I ran the following troubleshooting steps. What do you make of the user not having the permission? It might explain the access denied errors.
docker exec -it seafile-db bash
mysql -u root -p
MariaDB [(none)]> SELECT user, host FROM mysql.user WHERE user = 'seafile';
+---------+---------+
| User | Host |
+---------+---------+
| seafile | %.%.%.% |
+---------+---------+
1 row in set (0.001 sec)
MariaDB [(none)]> SHOW GRANTS FOR 'seafile'@'%';
ERROR 1141 (42000): There is no such grant defined for user 'seafile' on host '%'
I am deploying this from scartch and the seafile-server container fails during the initial setup with an “Access denied” error when attempting to connect to the seafile-db service (MariaDB). The issue appears to be related to user authentication or database configuration.
Error Logs
seafile-server container logs:
seafile-db container logs:
Steps to Reproduce
Deploy the following Docker Compose stack:
networks: t3_proxy: driver: bridge