-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
container does not start when ports beeing forwarded #72
Comments
Sounds like the port could already be in use on that machine. Perhaps another mysql container, or a non-containerised mysql server running directly on the machine? |
nope - thats not the case trying to forward any port fails to start the container |
Was worth a try. You could try and check the daemon logs to see if that contains anything useful |
May 23 23:46:08 rhea docker: [46775291.allocate_port(c2c75d63f224cf22be2fe9d0eed8410c587630ac7c591d4bd3bee664a6c185bc)] Failed to allocate and map port 33066: iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 33066 ! -i docker0 -j DNAT --to-destination 172.17.0.143:3306: iptables: No chain/target/match by that name. am I doing something wrong or my centos 7? |
two things that sound dodgy (but I'm not really good at the iptables rules here)
you might try and search for "missing DOCKER chain", I think I've seen something like that before reported in Docker and how to solve that |
yep I want to forward port 33066 to the containerd 3306 |
did some debugging all tested with docker 1.6.2 |
Solution: restarting firewalld is the problem an is removing the docker chain - restarting the docker service solves the problem |
docker run -e MYSQL_ROOT_PASSWORD=password -p 33066:3306 mysql
Error response from daemon: Cannot start container d21750c5bd3a5c1f873a4be97c49f2897fbcc20c9c4344075bd2e2e2d32e8b50: (exit status 1)
docker-compose also is not able to start the container
cat docker-compose.yml
db:
image: mysql
ports:
environment:
is this behavior intended?
The text was updated successfully, but these errors were encountered: