Hi there,
I have a strange behavior on seahub. It’s Seafile 6.3.4 (yes I know, but difficult to update for now for other reasons) working fine before I upgrade MariaDB from 10.3 to 10.6. Strangely, on a preceding server it works like a charme. But on a second one, same versions, Seafile start without errors (I can even start seaf-chk successfully), Seahub can’t work (it starts, but doesn’t work). When we try to access to the web page the log says :
[ … ]
File “/usr/lib64/python2.7/site-packages/MySQLdb/init.py”, line 81, in Connect
return Connection(*args, **kwargs)
File “/usr/lib64/python2.7/site-packages/MySQLdb/connections.py”, line 221, in init
self.set_character_set(charset)
File “/usr/lib64/python2.7/site-packages/MySQLdb/connections.py”, line 312, in set_character_set
super(Connection, self).set_character_set(charset)
OperationalError: (2019, “Can’t initialize character set utf8 (path: /usr/share/mysql/charsets/)”)
I can’t understand what is the problem. The databases are now utf8mb4 with the upgrade, but on the first server it did not make problem. Why here ? I’ve tried to add
CONNECTION_CHARSET = utf8mb4
in seafile and ccnet conf, with no success.
Here is the seahub_settings.py
SECRET_KEY = “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”
DATABASES = {
‘default’: {
‘ENGINE’: ‘django.db.backends.mysql’,
‘NAME’: ‘seahub-db’,
‘USER’: ‘seafile’,
‘PASSWORD’: ‘xxxxxxxxxxxxx’,
‘HOST’: ‘127.0.0.1’,
‘PORT’: ‘3306’,
‘OPTIONS’: {
‘init_command’: ‘SET default_storage_engine=INNODB’,
}
}
}
FILE_SERVER_ROOT = ‘https://seafile.xxxxxxxxxx.com/seafhttp’
MAX_NUMBER_OF_FILES_FOR_FILEUPLOAD = 4000
seafile.conf
[fileserver]
port = 8082Set maximum upload file size to 200M.
max_upload_size=200
Set maximum download directory size to 200M.
max_download_dir_size=500
[database]
type = mysql
host = 127.0.0.1
port = 3306
user = seafile
password = xxxxxxxxxxxxx
db_name = seafile-db[history]
keep_days = 90
and ccnet.conf
[General]
USER_NAME = Seafile
ID = ce965c8108286ccbe0158e0e25525c3cec64a22e
NAME = Seafile
SERVICE_URL = http://seafile.xxxxxxxxxx.com[Client]
PORT = 13419[Database]
ENGINE = mysql
HOST = 127.0.0.1
PORT = 3306
USER = seafile
PASSWD = xxxxxxxxxx
DB = ccnet-db
Thank you for help.