makkus / docker-seafile

Docker composition for a seafile server (community or pro), using MariaDB & nginx
GNU General Public License v2.0
40 stars 12 forks source link

Getting error on when running ./first-time-setup.sh #5

Closed rhblind closed 8 years ago

rhblind commented 9 years ago

Hi,

I'm receiving an error when running the ./first-time-setup.sh. Heres a tail from the stdout.

Setting up nginx (1.8.0-1+trusty1) ...
Processing triggers for libc-bin (2.19-0ubuntu6.5) ...
Processing triggers for sgml-base (1.26+nmu4ubuntu1) ...
 ---> e8ce3957059f
Removing intermediate container ca0fd9b5fb3a
Step 2 : ADD nginx.conf /etc/nginx/nginx.conf
 ---> 0e568d94422e
Removing intermediate container 268da3e9ec9b
Step 3 : ADD certs /etc/nginx/certs
 ---> 72d8ab588b80
Removing intermediate container 686188ee3741
Step 4 : ADD sites-enabled /etc/nginx/sites-enabled
 ---> 8d3325cb6790
Removing intermediate container 5a2b2a75fa8e
Step 5 : WORKDIR /etc/nginx
 ---> Running in a547c004dcec
 ---> 1f0c639a0535
Removing intermediate container a547c004dcec
Step 6 : ADD run.sh /opt/run.sh
 ---> 6744fdd6e7d8
Removing intermediate container bdf59717df33
Step 7 : RUN chmod 755 /opt/run.sh
 ---> Running in 9da63e576d5a
 ---> 77aea42e8372
Removing intermediate container 9da63e576d5a
Step 8 : CMD /opt/run.sh
 ---> Running in a1a71b3e5e4d
 ---> db3a3f16a5fa
Removing intermediate container a1a71b3e5e4d
Step 9 : EXPOSE 80
 ---> Running in 1e1a25912d00
 ---> 925d30a31717
Removing intermediate container 1e1a25912d00
Step 10 : EXPOSE 443
 ---> Running in 3c0c4ddcfcc6
 ---> 168749fd6ab6
Removing intermediate container 3c0c4ddcfcc6
Step 11 : RUN apt-get clean && rm -rf /var/lib/apt/lists/*
 ---> Running in b9bef667dc93
 ---> de33baddcba0
Removing intermediate container b9bef667dc93
Successfully built de33baddcba0
Starting up containers...
Creating dockerseafile_data_1...
Cannot start container d48e86e168511eec363682c1bf1bedfb163798e3de0a03bfb2aa9811317b4fb9: [8] System error: not a directory
No seahub_settings_template.py, doing nothing.
Changing owners for volumes...
Error response from daemon: Container dockerseafile_data_1 is not running
Starting setup process...
Error response from daemon: no such id: dockerseafile_seafile_1

Could I get a pointer in the right direction?

Great work, btw =)

Edit: I'm a complete Docker newbie so please forgive me if I'm just stupid, haha =)

makkus commented 9 years ago

Hm, weird, haven't seen that one before. It looks like a docker-related issue, googling "[8] System error: not a directory" seem to indicate it might be boot2docker related, and might be related to the directory that gets mounted (e.g. https://github.com/docker/docker/issues/13670). Are you on a Mac? I'm developing on a Linux host, so I might not be able to help if that is the case.

Did you modify the docker-compose.yml file to add your own volumes/local paths? If so, can you paste it?

rhblind commented 9 years ago

Hi, yes I'm on a Mac using the Dockertools package. I haven't modified any files, but I don't know if that is necessary? I'll have a look at it when I arrive at the office and let you know if I solve it. Thanks :)

rhblind commented 9 years ago

It seems like the issue you linked to is the same as I'm getting. I'll try running it on a Linux host instead =)

rhblind commented 9 years ago

Hi again.

I was trying running this on a Ubuntu 15.04 Virtualbox instance, but I'm getting other errors.

Here's the full output from my terminal.

rolf@titan-ubuntu:~/Documents$ git clone https://github.com/makkus/docker-seafile.git
Cloning into 'docker-seafile'...
remote: Counting objects: 281, done.
remote: Total 281 (delta 0), reused 0 (delta 0), pack-reused 281
Receiving objects: 100% (281/281), 56.43 KiB | 0 bytes/s, done.
Resolving deltas: 100% (153/153), done.
Checking connectivity... done.
rolf@titan-ubuntu:~/Documents$ cat /etc/hosts
127.0.0.1   localhost
127.0.0.1   localhost.home
27.0.1.1    titan-ubuntu

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
rolf@titan-ubuntu:~/Documents$ cd docker-seafile/
rolf@titan-ubuntu:~/Documents/docker-seafile$ sudo ./first-time-setup.sh 
[sudo] password for rolf: 
No docker-compose.yml file, copying and using example...
Stopping all potentially running containers...
client and server don't have same version (client : 1.19, server: 1.17)
Removing all potentially existing containers and volumes...
client and server don't have same version (client : 1.19, server: 1.17)
Using nginx configuration.
Checking certificate in nginx/certs...
No certificate nginx/certs/cacert.pem, creating a self-signed one...
Generating RSA private key, 2048 bit long modulus
.............................+++
..........+++
e is 65537 (0x10001)
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:NO
State or Province Name (full name) [Some-State]:Oslo
Locality Name (eg, city) []:Oslo
Organization Name (eg, company) [Internet Widgits Pty Ltd]:
Organizational Unit Name (eg, section) []:
Common Name (e.g. server FQDN or YOUR name) []:localhost.home
Email Address []:
Certificate created and put into nginx/certs
(Re-)Building images
Building data...
client and server don't have same version (client : 1.19, server: 1.17)
Starting up containers...
client and server don't have same version (client : 1.19, server: 1.17)

No seahub_settings_template.py, doing nothing.
Changing owners for volumes...
FATA[0000] Error response from daemon: No such container: dockerseafile_data_1 
Starting setup process...
FATA[0000] Error response from daemon: No such container: dockerseafile_seafile_1 
rolf@titan-ubuntu:~/Documents/docker-seafile$ 

Is there any other steps I must do before running the first-time-setup.sh script?

makkus commented 9 years ago

Sorry, was away, travelling. Does that work now? What was the issue, just out of interest?

rhblind commented 9 years ago

Hi again, sorry I've been occupied lately!

No, I still haven't made it work properly. What's weird is that a colleague of mine made it work right out of the box on his Ubuntu 15.04 laptop. Me, using a Mac with docker toolbox can't make it work. I have tried several approaches:

First, using the virtualbox driver, I was getting all the wierd errors posted above, so I just abandoned it. Secondly, using softlayer or aws should be working fine and it almost is. Now I'm getting error when it tries to install seafile using the expect script. The script fails on the ccnet database question. So I tried to log into the container and run the setup-seafile-mysql.sh script manually using the usernames and passwords I've found in the docker-compose file. It seems to work, although I need to manually start the seafile and seahub services. Nginx is up and running, but I can't make the Nginx container connect to the seafile container even though it seems to be correctly set up with links and ports.

So any advice on how to proceed are gratefully received =)

makkus commented 8 years ago

Hm, sorry to hear you have problems. Don't have a Mac, so can't test that myself. Also, never used softlayer or amazon ec2. Somebody else had problems with the expect file ( https://github.com/makkus/docker-seafile/pull/6 ), I initially pulled his request, but had to revert it because it broke the setup for me. So, there seems to be some inconsistency depending on the platform whether the expect part works or not.

Not sure whether that is the same problem though. For you it seems almost like the containers can't talk to each other when you run it on ec2, so maybe the network bridge that docker uses either works differently there, or there is some automated firewalling going on, something like that? Maybe docker machine needs some special config? Haven't used it myself yet.

Sorry I can't be of more assistance. I might be able to get my hand on a Mac when I'm back in my office, in 2 or 3 weeks. If, then I'll give the docker toolbox a go and figure out what is going on there.

So much for "You don't have to worry about where you deploy with docker" :-(

rhblind commented 8 years ago

Thanks for the response! Hm, yeah I guess. It's weird because I doubt it has anything to do with me running a mac when I deploy to ec2 or softlayer. But I think docker machine is available for Linux as well. It's really nice actually when working with docker on remote hosts/vm's.

Anyway, don't worry about it, I'll just have to deploy seafile manually I guess ;)

Thanks!

makkus commented 8 years ago

Ok, just a FYI: i figured out why boot2docker breaks, it doesn't seem to support having /etc/timezone and /etc/localtime as volumes. If one comments out those the build progresses further. There is still another problem with the setup routine though, I'll create a seperate issue for this.