-
Notifications
You must be signed in to change notification settings - Fork 176
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
Empty IP address #1
Comments
@chbrandt well it appears the mysql container error out and is not running. "State": {
"Running": false,
"Pid": 0,
"ExitCode": 1,
"StartedAt": "2014-07-24T11:42:06.256444663Z",
"FinishedAt": "2014-07-24T11:42:06.443349565Z",
"Ghost": false
}, I suggest you run the image using the command |
@sameersbn it outputs just the following lines: chbrandt@workland:~$ docker run --name mysql -it --rm sameersbn/mysql:latest Thanks. |
@chbrandt does the container exit after that? |
@sameersbn Yes. (Sorry not to have said that.) It just exit and (--rm) removes the container. |
@chbrandt Can you provide me your host (distro / version) and the docker info using the command |
@sameersbn Of course!... The "docker version" output:chbrandt@workland: The "docker info" output:chbrandt@workland: And my Distro/Kernel/Package are:chbrandt@workland:~$ lsb_release -a chbrandt@workland:~$ uname -a chbrandt@workland: Thanks. |
@chbrandt I think this should solve the issue. You can execute the following procedure to install an up to date version of docker sudo apt-get remove lxc-docker* docker.io
curl -s https://get.docker.io/ubuntu/ | sudo sh
sudo apt-get update
sudo apt-get install lxc-docker I am pretty sure updating docker should resolve the problem. |
Good morning @sameersbn , It didn't work. Same thing: prints out "Installing database..." only and exits. |
I have the exact same problem: root@for: This is on Ubuntu 14.04.1, both with docker 0.9.1 (from Ubuntu repositories) and 1.1.2 (from get.docker.io) |
@mattiash can you try performing a system update |
@mattiash reportedly there are some issue with docker and kernel version |
I did a dist-upgrade and reboot, but the problem persists. I'm on kernel 3.13 root@for:~# uname -a The server is running other things as well. so it is difficult to downgrade the kernel. |
I tried running all commands in /start manually inside the docker container. All is well until mysql_install_db, but that command fails: root@f77b92109cda:/# mysql_install_db --user=mysql
Installing MySQL system tables...
140801 11:20:03 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
140801 11:20:03 [Warning] Using unique option prefix bind instead of bind-address is deprecated and will be removed in a future release. Please use the full name instead.
ERROR: 1 Can't create/write to file '/var/lib/mysql/mysql/db.MYI' (Errcode: 13)
140801 11:20:03 [ERROR] Aborting
140801 11:20:03 [Note] /usr/sbin/mysqld: Shutdown complete
Installation of system tables failed! Examine the logs in
/var/lib/mysql for more information.
You can try to start the mysqld daemon with:
shell> /usr/sbin/mysqld --skip-grant &
and use the command line tool /usr/bin/mysql
to connect to the mysql database and look at the grant tables:
shell> /usr/bin/mysql -u root mysql
mysql> show tables
Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in /var/lib/mysql that may be helpful.
Please consult the MySQL manual section
'Problems running mysql_install_db', and the manual section that
describes problems on your OS. Another information source are the
MySQL email archives available at http://lists.mysql.com/.
Please check all of the above before submitting a bug report
at http://bugs.mysql.com/ I then tried to change to the user mysql to see if I could create the file manually, but it failed: root@f77b92109cda:/# su mysql -c /bin/bash
su: User not known to the underlying authentication module However, the user mysql exists: root@f77b92109cda:/# grep mysql /etc/passwd
mysql:x:101:103:MySQL Server,,,:/nonexistent:/bin/false |
@chbrandt @mattiash I just got the chance to test your run command I have docker version 1.1.2 and ubuntu 14.04 (updated) and have the same kernel version as you, i.e. With that out of the way, I suspect there you could have suffered image corruption. Can you try removing the docker rmi sameersbn/ubuntu:12.04.20140628
docker rmi sameersbn/mysql:latest
docker pull sameersbn/mysql:latest
docker run --name mysql -it --rm sameersbn/mysql:latest I think your issue should get resolved. |
@mattiash I double checked by pulling the image from the docker index and it worked without any problems. Please let me know if this resolves your issue. |
No change: root@for:~# docker rmi sameersbn/mysql:latest
Error response from daemon: No such image: sameersbn/mysql:latest
2014/08/01 15:18:53 Error: failed to remove one or more images
root@for:~# docker rmi sameersbn/ubuntu:12.04.20140628
Error response from daemon: No such image: sameersbn/ubuntu:12.04.20140628
2014/08/01 15:19:35 Error: failed to remove one or more images
root@for:~# docker pull sameersbn/mysql:latest
Pulling repository sameersbn/mysql
931eb2b8bba4: Download complete
511136ea3c5a: Download complete
65b7e9ccb809: Download complete
f8dd6bd14f58: Download complete
a343823119db: Download complete
ea7d6801c538: Download complete
6eb9bf01977b: Download complete
24750c3b8e04: Download complete
bea002a43c2a: Download complete
8e67ffd1d76d: Download complete
3f1191360aed: Download complete
fe53b4a9503a: Download complete
c16af3504844: Download complete
c05ff689c7b1: Download complete
bfcbd8e87059: Download complete
f4d4ccedf6ef: Download complete
741004e79f46: Download complete
91980dcd503c: Download complete
root@for:~# docker run --name mysql -it --rm sameersbn/mysql:latest
Installing database...
root@for:~# Do you have a mysql user in your host OS? I don't. |
$ docker rmi sameersbn/mysql:latest
Error response from daemon: No such image: sameersbn/mysql:latest ^^^How come? If this did not solve the issue then maybe the image corruption took place in the ubuntu base image. You may need to remove the image as well. Can you remove all existing docker images and container and retry: WARNING You clean up all docker images by running the following commands docker stop $(docker ps -q)
docker rm $(docker ps -a -q)
docker rmi $(docker images -q)
docker images Run the above commands repeatedly until Now pull the image again and retry: docker pull sameersbn/mysql:latest
docker run --name mysql -it --rm sameersbn/mysql:latest Do you by any chance have selinux installed and enabled on your ubuntu host? If yes, then it could be the cause of concern. |
I find it hard to believe that the corruption happened on my machine. It has ECC memory and raid-1 disks. However, I did as you suggested: root@for:~# docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
root@for:~# docker pull sameersbn/mysql:latest
Pulling repository sameersbn/mysql
931eb2b8bba4: Download complete
511136ea3c5a: Download complete
65b7e9ccb809: Download complete
f8dd6bd14f58: Download complete
a343823119db: Download complete
ea7d6801c538: Download complete
6eb9bf01977b: Download complete
24750c3b8e04: Download complete
bea002a43c2a: Download complete
8e67ffd1d76d: Download complete
3f1191360aed: Download complete
fe53b4a9503a: Download complete
c16af3504844: Download complete
c05ff689c7b1: Download complete
bfcbd8e87059: Download complete
f4d4ccedf6ef: Download complete
741004e79f46: Download complete
91980dcd503c: Download complete
root@for:~# docker run --name mysql -it --rm sameersbn/mysql:latest
Installing database...
Starting MySQL server...
140801 14:02:39 InnoDB: Completed initialization of buffer pool
140801 14:02:39 InnoDB: highest supported file format is Barracuda.
140801 14:02:39 InnoDB: Waiting for the background threads to start
140801 14:02:40 InnoDB: 5.5.37 started; log sequence number 1595675
140801 14:02:40 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
140801 14:02:40 [Note] - '0.0.0.0' resolves to '0.0.0.0';
140801 14:02:40 [Note] Server socket created on IP: '0.0.0.0'.
140801 14:02:40 [Note] Event Scheduler: Loaded 0 events
140801 14:02:40 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.5.37-0ubuntu0.12.04.1' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu) and it worked! Thank you for your help. Now I'll continue with your gitlab instructions. |
@mattiash Every once in a while this issue occurs. I believe the issue occurs during the |
@sammersbn I did it. And, guess what?... It worked! |
Hi, when I follow the commands to start the MySQL container/daemon:
docker run -name mysql -d sameersbn/mysql:latest
and try to get the IP address
MYSQL_IP=$(docker inspect mysql | grep IPAddres | awk -F'"' '{print $4}')
But I am receiving an empty (MYSQL_IP) address.
What am I missing?
Thanks.
Below is the full "inspect" output from mysql container:
[{
"ID": "58e2feb006a8115659e5963a18e36f380daa2ebef5f859998e9fd164d6ee6060",
"Created": "2014-07-24T11:42:06.149458819Z",
"Path": "/start",
"Args": [],
"Config": {
"Hostname": "58e2feb006a8",
"Domainname": "",
"User": "",
"Memory": 0,
"MemorySwap": 0,
"CpuShares": 0,
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"PortSpecs": null,
"ExposedPorts": {
"3306/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"HOME=/",
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"DEBIAN_FRONTEND=noninteractive"
],
"Cmd": [
"/start"
],
"Dns": [
"8.8.8.8",
"8.8.4.4"
],
"Image": "sameersbn/mysql:latest",
"Volumes": {
"/var/lib/mysql": {}
},
"VolumesFrom": "",
"WorkingDir": "",
"Entrypoint": null,
"NetworkDisabled": false,
"OnBuild": null
},
"State": {
"Running": false,
"Pid": 0,
"ExitCode": 1,
"StartedAt": "2014-07-24T11:42:06.256444663Z",
"FinishedAt": "2014-07-24T11:42:06.443349565Z",
"Ghost": false
},
"Image": "931eb2b8bba4856ee2ded254661a40b5c56b3d505c49b19670b748418dd1c827",
"NetworkSettings": {
"IPAddress": "",
"IPPrefixLen": 0,
"Gateway": "",
"Bridge": "",
"PortMapping": null,
"Ports": null
},
"ResolvConfPath": "/var/lib/docker/containers/58e2feb006a8115659e5963a18e36f380daa2ebef5f859998e9fd164d6ee6060/resolv.conf",
"HostnamePath": "/var/lib/docker/containers/58e2feb006a8115659e5963a18e36f380daa2ebef5f859998e9fd164d6ee6060/hostname",
"HostsPath": "/var/lib/docker/containers/58e2feb006a8115659e5963a18e36f380daa2ebef5f859998e9fd164d6ee6060/hosts",
"Name": "/trusting_mclean",
"Driver": "aufs",
"ExecDriver": "native-0.1",
"Volumes": {
"/var/lib/mysql": "/var/lib/docker/vfs/dir/21b0edbba3d0a376db035c91b4484560db388c61cf8f9f56dd75191242214a9d"
},
"VolumesRW": {
"/var/lib/mysql": true
},
"HostConfig": {
"Binds": null,
"ContainerIDFile": "",
"LxcConf": [],
"Privileged": false,
"PortBindings": {
"3306/tcp": null
},
"Links": null,
"PublishAllPorts": false
}
}]
The text was updated successfully, but these errors were encountered: