haiwen / seafile

High performance file syncing and sharing, with also Markdown WYSIWYG editing, Wiki, file label and other knowledge management features.
http://seafile.com/
Other
12.25k stars 1.54k forks source link

MySQL host file cannot have "_" in name? #1491

Closed ronnicek closed 8 years ago

ronnicek commented 8 years ago

Hi,

i want to change my MySQL server, so I edited all files under /opt/seafile/conf/ folder (ccnet.conf, seafile.conf, seahub_settings.py). After start of seafile, I got error:

root@a12dd32f402a:/opt/seafile/seafile-server-latest# ./seafile.sh start

[01/02/16 20:33:32] ../common/session.c(132): using config file /opt/seafile/conf/ccnet.conf [01/02/16 20:33:32] ../common/ccnet-db.c(76): max_connections: 100 SQLException: Failed to start connection pool -- no database specified in URL raised in ConnectionPool_start at src/db/ConnectionPool.c:287 failed to run "ccnet-server -t"

Seafile version: 5.0.3

ccnet.conf: [Database] ENGINE = mysql HOST = docker_mysql_1 PORT = 3306 USER = seafile PASSWD = passWor#d DB = ccnet CONNECTION_CHARSET = utf8

seafile.conf: [database] type = mysql host = docker_mysql_1 port = 3306 user = seafile password = passWor#d db_name = seafile connection_charset = utf8

seahub_settings.py: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'seahub', 'USER': 'seafile', 'PASSWORD': 'passWor#d', 'HOST': 'docker_mysql_1', 'PORT': '3306', 'OPTIONS': { 'init_command': 'SET storage_engine=INNODB', } } }

Telnet test: root@a12dd32f402a:/opt/seafile/seafile-server-latest# telnet docker_mysql_1 3306 Trying 172.18.0.4... Connected to docker_mysql_1. Escape character is '^]'. J 5.6.24

But when I edit /etc/hosts and do alias for that host for dockermysql1 and change it in all configurations, then it's working and seafile starts.

shoeper commented 8 years ago

https://code.djangoproject.com/ticket/20264

This is no Seafile issue. If I read correct the django project has marked this "issue" as invalid. You can close this.

ronnicek commented 8 years ago

That's really bad in "docker" time. I will close this one and try to bother django guys.