Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build success but throw exception when run it #50

Closed
zacker330 opened this issue Apr 24, 2014 · 10 comments
Closed

build success but throw exception when run it #50

zacker330 opened this issue Apr 24, 2014 · 10 comments

Comments

@zacker330
Copy link

xx@xx:/samersbn-gitlab/docker-gitlab$ docker run -i -d -P -t xxx/gitlab
ec6d1a10f50e6b6e942ca41e45cc39d8c2f0270c68ae26c51eb40ab6d8f14132
xx@xx:
/samersbn-gitlab/docker-gitlab$ docker logs -f ec6d1a10f50
User: root Password: niegae9nae9Y
sshd: started
nginx: started
mysqld: ERROR (abnormal termination)

@sameersbn
Copy link
Owner

@zacker330 can't say what the issue is. please rebuild and try again

@sameersbn
Copy link
Owner

@zacker330 try running with docker run -i -t xxx/gitlab

@zacker330
Copy link
Author

@sameersbn I try

  1. clone your sameersbn/docker-gitlab
  2. docker build -t xxxx/gitlab . (success)
  3. docker run -i -t xxx/gitlab
    User: root Password: zooph8cieNex
    sshd: started
    nginx: started
    mysqld: ERROR (abnormal termination)

I'd try it again and again.

$docker info
Containers: 36
Images: 274
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Dirs: 349
Execution Driver: native-0.1
Kernel Version: 3.8.0-35-generic
Username: xxx
Registry: [https://index.docker.io/v1/]
WARNING: No swap limit support

@sameersbn
Copy link
Owner

@zacker330 i see that you have an unusually large number of stopped containers on your system. probably you didn't mean to keep them. Please remove these containers and try again.

docker rm $(docker ps -a -q)

Above command will delete all non running containers.
If you wish to remove untagged images, you can remove them using

docker rmi $(docker images | grep none | awk '{print $3}' | sort -r)

I have noticed that having too many containers / images can really have a negative effect in docker. I am guessing this could be a cause of the issue you are seeing.

@zacker330
Copy link
Author

@sameersbn thinks .

I had done it as you said. but the problem not be solved. It seems cause by mysql. I can't run mysql's image yet.

My operation system is ubuntu 13.04

@sameersbn
Copy link
Owner

@zacker330 then i think we should dive in an check out what is going wrong

docker run -i -t --rm xxx/gitlab bash
```bash

You will be dropped into the bash shell. Make sure mysql server is not started
```bash
supervisorctl stop mysqld
killall mysqld

Manually start mysqld server

/usr/bin/mysqld_safe &

If the mysql server is not starting, check the error log

cat /var/log/mysql/error.log

Paste the log here

@zacker330
Copy link
Author

@sameersbn
docker run -i -t --rm xxx/gitlab bash

I can't dive in it.

@sameersbn
Copy link
Owner

@zacker330 can you paste the output here. Its not possible for me to figure out what you are not being dropped into the bash shell.

@sameersbn
Copy link
Owner

ps. the mysql server is destined to be removed from the container. so instead try using a linked mysql server. Details can be found here. However I would recommend linking a postgresql container https://github.com/sameersbn/docker-gitlab#linking-to-postgresql-container

@zacker330
Copy link
Author

@sameersbn thinks very much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants