Open UnrealKazu opened 6 years ago
Could you give some information on the Docker and Docker-compose versions used?
I have a similar setup in use with an NGINX Reverse proxy and that definitely doesn't interfer.
This indeed is a strange bug because the Travis Build runs some unit tests and the admin creation is essential for anything to work.
/containers/Seafile
?dmesg
/syslog
output to problems related to SELinux or other things interfering with docker? My Docker host is an Ubuntu server 17.10 machine, with Docker version 17.12.0-ce
and Docker-compose version 1.18.0
.
I've been testing around some more (also based on your questions). Not mounting the volume still gives the same creation error, so it does not seem to be a permission error on the volume itself. As far as any dmesg
logs, there are no things out of the ordinary. I tried looking into some other logging, but Seafile itself does not log a lot regarding the python bootstrap scripts they are providing, so it seems like a dead end there.
However, I found something interesting. Executing the docker run
equivalent of my compose file does work. So that would be the following (minus the volume, still for testing purposes):
docker run --name seafile \
--expose "80" \
-e SEAFILE_EXTERNAL_PORT=80 \
-e SEAFILE_HOSTNAME=localhost \
-e SEAFILE_SERVER_NAME=myseafile \
-e SEAFILE_ADMIN_MAIL=admin@seafile.com \
-e SEAFILE_ADMIN_PASSWORD=test123 \
--network="nginx-proxy" \
stonemaster/docker-seafile-server
So this seems to be an issue related to Docker-compose?
This is super weird. To my understanding docker-compose
is just wrapper for docker
and shouldn't do any extra stuff. I have docker 1.13
and docker-compose 1.8
, so much older versions than you. I am also using Ubuntu but 16.04.
Could you post the logs of Docker after trying to create the container using docker-compose
? You should be able to get the logs using journalctl -u docker -n 1000
on Ubuntu.
The following is the resulting log of specifically creating the container.
Using docker-compose
:
Feb 27 17:27:49 dockerd[951]: time="2018-02-27T17:27:49.471678449+01:00" level=info msg="ignoring event" module=libcontainerd namespace=moby topic=/containers/create type="*events.ContainerCreate"
Feb 27 17:27:49 dockerd[951]: time="2018-02-27T17:27:49+01:00" level=info msg="shim docker-containerd-shim started" address="/containerd-shim/moby/220251072f03fbe468dbc1149c12f0bf686d112ba0a2755922e517354f3268c8/shim.sock" debug=false module="containerd/tasks" pid=24321
Feb 27 17:27:49 dockerd[951]: time="2018-02-27T17:27:49.773039165+01:00" level=warning msg="unknown container" container=220251072f03fbe468dbc1149c12f0bf686d112ba0a2755922e517354f3268c8 module=libcontainerd namespace=plugins.moby
Feb 27 17:27:49 dockerd[951]: time="2018-02-27T17:27:49.790139716+01:00" level=warning msg="unknown container" container=220251072f03fbe468dbc1149c12f0bf686d112ba0a2755922e517354f3268c8 module=libcontainerd namespace=plugins.moby
And using docker run
:
Feb 27 17:29:52 dockerd[951]: time="2018-02-27T17:29:52.378937285+01:00" level=info msg="ignoring event" module=libcontainerd namespace=moby topic=/containers/create type="*events.ContainerCreate"
Feb 27 17:29:52 dockerd[951]: time="2018-02-27T17:29:52+01:00" level=info msg="shim docker-containerd-shim started" address="/containerd-shim/moby/e6534d7a7fa26b562d4110654978079ffab85d53d0b23bf6a666494520097a29/shim.sock" debug=false module="containerd/tasks" pid=25555
Feb 27 17:29:52 dockerd[951]: time="2018-02-27T17:29:52.684113891+01:00" level=warning msg="unknown container" container=e6534d7a7fa26b562d4110654978079ffab85d53d0b23bf6a666494520097a29 module=libcontainerd namespace=plugins.moby
Feb 27 17:29:52 dockerd[951]: time="2018-02-27T17:29:52.705783752+01:00" level=warning msg="unknown container" container=e6534d7a7fa26b562d4110654978079ffab85d53d0b23bf6a666494520097a29 module=libcontainerd namespace=plugins.moby
They seem identical regarding the operations themselves. The moment the creation error pops up, there is no log entry created by Docker.
Could it be a rights issue, that UID
and GID
need to be passed into the container to properly work when using docker-compose
? I'm guessing here, as it seems to be a longshot.
Just encountered similar with a manual build on Ubuntu 20.04 and Seafile 7.1.5
Starting seahub.sh asks for admin email and password then gives the above error "Error happened during creating seafile admin"
Except in my case I cannot access the site at this point and on server curl 127.0.0.1:8000 returns nothing
Of note I did need to install libmemcached-dev via apt before I could install pylibmc and django-pylibmc via pip3
When spinning up a fresh container, I receive the following error halfway through the initial setup script:
This is a snippet from the logs. The container starts fine, and I can actually get to the login page, but since the admin account has not been created, I cannot log in.
I've been digging through the Seafile codebase to find out where this pops up, and it looks like the
check_init_admin.py
file is where the exception is thrown, which is called byseahub.sh
.I'm creating the container using the following
docker-compose
:There is another reverse proxy in front of this container. I'm assuming this won't interfere with the admin creation process, but I'm still mentioning it just in case.
By the way: thanks for creating this. It is much, much better than the strange dockerfile wrapper script presented by the Seafile devs themselves.