HTTP port exposed but not responding properly - docker

Running Docker 1.9.1 on OpenSuse 42.1 (can't upgrade at this time but also the same problem on Docker 1.12).
I have a Docker images that exposes a web application on port 8080. I can ssh into the container and access the application correctly from inside the container on http://localhost:8080/.
I run the container using
docker run -p 10000:8080 ...
and I would expect the web application being accessible on either
http://localhost:10000 or http://public-ip:10000
The port is open but the connection is being closed immediately.
sudo netstat -nap|grep LISTEN|grep -v LISTENING|grep 1000
root's password:
tcp 0 0 :::10000 :::* LISTEN 17375/docker-proxy
I can telnet to port 10000 but as said the connection is being closed immediately
docker --version
Docker version 1.9.1, build a34a1d5
docker version
Client:
Version: 1.9.1
API version: 1.21
Go version: go1.4.2
Git commit: a34a1d5
Built:
OS/Arch: linux/amd64
Server:
Version: 1.9.1
API version: 1.21
Go version: go1.4.2
Git commit: a34a1d5
Built:
OS/Arch: linux/amd64
docker info (1.9)
Containers: 23
Running: 1
Paused: 0
Stopped: 22
Images: 198
Server Version: 1.12.6
Storage Driver: devicemapper
Pool Name: docker-8:2-1074640197-pool
Pool Blocksize: 65.54 kB
Base Device Size: 10.74 GB
Backing Filesystem: xfs
Data file: /dev/loop0
Metadata file: /dev/loop1
Data Space Used: 13.22 GB
Data Space Total: 107.4 GB
Data Space Available: 94.16 GB
Metadata Space Used: 20.58 MB
Metadata Space Total: 2.147 GB
Metadata Space Available: 2.127 GB
Thin Pool Minimum Free Space: 10.74 GB
Udev Sync Supported: true
Deferred Removal Enabled: false
Deferred Deletion Enabled: false
Deferred Deleted Device Count: 0
Data loop file: /var/lib/docker/devicemapper/devicemapper/data
WARNING: Usage of loopback devices is strongly discouraged for production use. Use `--storage-opt dm.thinpooldev` to specify a custom block storage device.
Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
Library Version: 1.02.136 (2016-11-05)
Logging Driver: journald
Cgroup Driver: systemd
Plugins:
Volume: local
Network: null bridge host overlay
Swarm: inactive
Runtimes: oci runc
Default Runtime: oci
Security Options: seccomp
Kernel Version: 4.11.8-200.fc25.x86_64
Operating System: Fedora 25 (Server Edition)
OSType: linux
Architecture: x86_64
Number of Docker Hooks: 2
CPUs: 6
Total Memory: 29.45 GiB
Name: dev2.zopyx.com
ID: DE7T:KEX4:UCRB:KOED:2DHE:3437:MYDS:LPQT:BBYO:SOQH:2EZL:VTYR
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Insecure Registries:
127.0.0.0/8
Registries: docker.io (secure)
docker info (1.12)
Containers: 23
Running: 1
Paused: 0
Stopped: 22
Images: 198
Server Version: 1.12.6
Storage Driver: devicemapper
Pool Name: docker-8:2-1074640197-pool
Pool Blocksize: 65.54 kB
Base Device Size: 10.74 GB
Backing Filesystem: xfs
Data file: /dev/loop0
Metadata file: /dev/loop1
Data Space Used: 13.22 GB
Data Space Total: 107.4 GB
Data Space Available: 94.16 GB
Metadata Space Used: 20.58 MB
Metadata Space Total: 2.147 GB
Metadata Space Available: 2.127 GB
Thin Pool Minimum Free Space: 10.74 GB
Udev Sync Supported: true
Deferred Removal Enabled: false
Deferred Deletion Enabled: false
Deferred Deleted Device Count: 0
Data loop file: /var/lib/docker/devicemapper/devicemapper/data
WARNING: Usage of loopback devices is strongly discouraged for production use. Use `--storage-opt dm.thinpooldev` to specify a custom block storage device.
Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
Library Version: 1.02.136 (2016-11-05)
Logging Driver: journald
Cgroup Driver: systemd
Plugins:
Volume: local
Network: bridge host overlay null
Swarm: inactive
Runtimes: runc oci
Default Runtime: oci
Security Options: seccomp
Kernel Version: 4.11.8-200.fc25.x86_64
Operating System: Fedora 25 (Server Edition)
OSType: linux
Architecture: x86_64
Number of Docker Hooks: 2
CPUs: 6
Total Memory: 29.45 GiB
Name: dev2.zopyx.com
ID: DE7T:KEX4:UCRB:KOED:2DHE:3437:MYDS:LPQT:BBYO:SOQH:2EZL:VTYR
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Insecure Registries:
127.0.0.0/8
Registries: docker.io (secure)
What could be the problem here?

Solution: the webservice internally was only binding to 127.0.0.1 instead to 0.0.0.0

Related

shim error: docker-runc not installed on system

I am new to Docker and encountering an odd issue /usr/bin/docker-current: Error response from daemon: shim error: docker-runc not installed on system.. command that I am running is docker build /path to docker file/. But when I tried to run docker-runc it can able to pop up its version as VERSION:
1.0.0-rc2
spec: 1.0.0-rc2-dev. Also docker version is 1.13.1, build 774336d/1.13.1. Any help would be appreciated.
Attached is the docker info below.
Adding docker infoContainers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 1.13.1
Storage Driver: devicemapper
Pool Name: rootvg-docker--pool
Pool Blocksize: 524.3 kB
Base Device Size: 10.74 GB
Backing Filesystem: xfs
Data file:
Metadata file:
Data Space Used: 20.45 MB
Data Space Total: 20.72 GB
Data Space Available: 20.7 GB
Metadata Space Used: 53.25 kB
Metadata Space Total: 109.1 MB
Metadata Space Available: 109 MB
Thin Pool Minimum Free Space: 2.071 GB
Udev Sync Supported: true
Deferred Removal Enabled: true
Deferred Deletion Enabled: true
Deferred Deleted Device Count: 0
Library Version: 1.02.140-RHEL7 (2017-05-03)
Logging Driver: journald
Cgroup Driver: systemd
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Authorization: rhel-push-plugin
Swarm: inactive
Runtimes: docker-runc runc
Default Runtime: docker-runc
Init Binary: docker-init
containerd version: (expected: aa8187dbd3b7ad67d8e5e3a15115d3eef43a7ed1)
runc version: N/A (expected: 9df8b306d01f59d3a8029be411de015b7304dd8f)
init version: N/A (expected: 949e6facb77383876aeff8a6944dde66b3089574)
Security Options:
seccomp
WARNING: You're not using the default seccomp profile
Profile: /etc/docker/seccomp.json
Kernel Version: 3.10.0-327.el7.x86_64
Operating System: RHEV
OSType: linux
Architecture: x86_64
Number of Docker Hooks: 3
CPUs: 4
Total Memory: 19.44 GiB
Name: tdctvjnkcit01
ID: BOQP:ENIT:7N7J:5EW6:OOVI:6AHX:HUVI:Y6FU:NO7B:TAJI:LDJY:AJBV
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://registry.access.redhat.com/v1/
WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled
Experimental: false
Insecure Registries:
127.0.0.0/8
Registry Mirrors:
https://docker-dev.xxxx.com
Live Restore Enabled: false
Registries: registry.access.redhat.com (secure), docker.io (secure)

Docker - Error response from daemon: invalid header field value "oci runtime error: rootfs

I am getting error while running the below docker command.
docker run -it -v /tmp:/tmp/host registry.docker.com/base/jdk1.8 rm -rf /tmp/host/mesos
Error :-
docker: Error response from daemon: invalid header field value "oci
runtime error: rootfs
(\"/tst/app/docker/devicemapper/mnt/140eb7aadfb7e1530a3fc5955f57ae154008be913cf920ba908cf064d5e586cc/rootfs\")
does not exist\n".
Docker version result :-
docker version
Client:
Version: 1.12.6
API version: 1.24
Go version: go1.6.4
Git commit: 1512168
Built: Wed Jan 11 09:49:56 2017
OS/Arch: linux/amd64
Server:
Version: 1.12.6
API version: 1.24
Go version: go1.6.4
Git commit: 1512168
Built: Wed Jan 11 09:49:56 2017
OS/Arch: linux/amd64
Docker Info Result :-
docker info
Containers: 90
Running: 0
Paused: 0
Stopped: 90
Images: 5
Server Version: 1.12.6
Storage Driver: devicemapper
Pool Name: docker-249:1-1838266-pool
Pool Blocksize: 65.54 kB
Base Device Size: 10.74 GB
Backing Filesystem: ext4
Data file: /dev/loop2
Metadata file: /dev/loop3
Data Space Used: 4.219 GB
Data Space Total: 107.4 GB
Data Space Available: 43.82 GB
Metadata Space Used: 8.79 MB
Metadata Space Total: 2.147 GB
Metadata Space Available: 2.139 GB
Thin Pool Minimum Free Space: 10.74 GB
Udev Sync Supported: true
Deferred Removal Enabled: false
Deferred Deletion Enabled: false
Deferred Deleted Device Count: 0
Data loop file: /tst/app/docker/devicemapper/devicemapper/data
WARNING: Usage of loopback devices is strongly discouraged for production use. Use `--storage-opt dm.thinpooldev` to specify a custom block storage device.
Metadata loop file: /tst/app/docker/devicemapper/devicemapper/metadata
Library Version: 1.02.117-RHEL6 (2016-12-13)
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options:
Kernel Version: 4.1.12-103.10.1.el6uek.x86_64
Operating System: Oracle Linux Server 6.9
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 15.55 GiB
Name: host.com
ID: GL42:TV5D:F5NA:3RIU:JW3A:W62C:O4RF:DBIV:WBVZ:U2Q4:FGC7:XX3Q
Docker Root Dir: /tst/app/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Insecure Registries:
127.0.0.0/8

pull image from remote docker registry failing with timed out exception

I have deployed an image locally as below
[root#user]# docker tag hello-world localhost:5000/hello-world
[root#user]# docker push localhost:5000/hello-world
The push refers to a repository [localhost:5000/hello-world]
a02596fdd012: Pushed
latest: digest: sha256:a18ed77532f6d6781500db650194e0f9396ba5f05f8b50d4046b294ae5f83aa4 size: 524
step1:
[root#user]# docker pull localhost:5000/hello-world
Using default tag: latest
latest: Pulling from hello-world
Digest: sha256:a18ed77532f6d6781500db650194e0f9396ba5f05f8b50d4046b294ae5f83aa4
Status: Image is up to date for localhost:5000/hello-world:latest
It is working fine
I am trying to pull the same image from remote machine
step2:
[root#user]# docker tag hello-world server-ip:5000/hello-world
When I am doing docker push, I am getting below error
communication error occurred: \"Operation timed out\"\r\n</FONT>\r\n</TD></TR>\r\n<TR><TD>\r\n<FONT face=\"Helvetica\">\r\nThe Web Server may be down, too busy, or experiencing other problems preventing it from responding to requests. You may wish to try again at a later time.
I have added server-ip in remote machine's docker registry but still I see this error
Below is the server and client docker info -
My docker info
Containers: 12
Running: 2
Paused: 0
Stopped: 10
Images: 8
Server Version: 1.12.6
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 152
Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: host bridge null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: apparmor seccomp
Kernel Version: 4.2.0-16-generic
Operating System: Ubuntu 15.10
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 15.56 GiB
ID: S6UJ:M6DP:QI2L:M2PS:HZCP:OVTZ:FMVX:JKKS:Z6MJ:VHIL:SXTM:EDQO
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Http Proxy: http://proxy:8080
Https Proxy: https://proxy:8080
Registry: https://index.docker.io/v1/
WARNING: No swap limit support
Insecure Registries:
server-ip:5000
127.0.0.0/8
Server docker info
Containers: 20
Running: 1
Paused: 0
Stopped: 19
Images: 29
Server Version: 1.12.6
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 253
Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: null bridge host overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: apparmor seccomp
Kernel Version: 4.2.0-16-generic
Operating System: Ubuntu 15.10
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 15.56 GiB
ID: ZM6K:OVPZ:VKMU:SV22:4HT4:AI66:7XQB:SSRP:X54A:XASV:UYYA:3X5I
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Http Proxy: http://proxy:8080/
Registry: https://index.docker.io/v1/
WARNING: No swap limit support
Insecure Registries:
ip:5000
127.0.0.0/8

Insecure Docker registry on Centos7 refuses to ingest images, even with flag 'insecure-registries'

I try to deploy an insecure Docker Registry on a CentOS7 server:
docker run -d -p 5000:5000 --restart=always --name registry registry:2
I configured docker like this:
# /etc/docker/daemon.json
{
"insecure-registries":["registry.mydomain.com:5000"]
}
With that, docker info gives me:
Containers: 1
Running: 1
Paused: 0
Stopped: 0
Images: 2
Server Version: 1.12.4
Storage Driver: devicemapper
Pool Name: docker-253:2-650870-pool
Pool Blocksize: 65.54 kB
Base Device Size: 10.74 GB
Backing Filesystem: xfs
Data file: /dev/loop0
Metadata file: /dev/loop1
Data Space Used: 69.86 MB
Data Space Total: 107.4 GB
Data Space Available: 50.4 GB
Metadata Space Used: 708.6 kB
Metadata Space Total: 2.147 GB
Metadata Space Available: 2.147 GB
Thin Pool Minimum Free Space: 10.74 GB
Udev Sync Supported: true
Deferred Removal Enabled: false
Deferred Deletion Enabled: false
Deferred Deleted Device Count: 0
Data loop file: /var/lib/docker/devicemapper/devicemapper/data
WARNING: Usage of loopback devices is strongly discouraged for production use. Use `--storage-opt dm.thinpooldev` to specify a custom block storage device.
Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
Library Version: 1.02.135-RHEL7 (2016-09-28)
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: null host bridge overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: seccomp
Kernel Version: 3.10.0-327.36.3.el7.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 489.1 MiB
Name: ASB-Registry
ID: KNQD:2AVN:EG5H:VV7U:US7G:SJ2D:G2FY:UAZK:N2NY:FQAA:CQJV:N2IS
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled
Insecure Registries:
registry.mydomain.com:5000
127.0.0.0/8
So:
Insecure Registries:
registry.mydomain.com:5000
127.0.0.0/8
Appears correctly.
However, when I try to push a container to that registry:
docker push registry.mydomain.com:5000/my_image
I get the following log:
The push refers to a repository [registry.mydomain.com:5000/my_image]
Get https://registry.mydomain.com:5000/v1/_ping: http: server gave HTTP response to HTTPS client
Any idea?

Docker compose error with docker-engine version

I've installed docker-engine and docker-compose. I have only one installation of both on my system.
$ docker --version
Docker version 1.11.1, build 5604cbe
$ docker-compose --version
docker-compose version 1.7.1, build 0a9ab35
However, when I trying to execute docker-compose build, i've got this error:
ERROR: The Docker Engine version is less than the minimum required by Compose. Your current project requires a Docker Engine of version 1.10.0 or greater.
My docker-compose.yml is pretty simple:
version: '2'
services:
db:
image: postgres:9.4.1
ports:
- "5432:5432"
web:
build: .
command: bin/rails s -e development
ports:
- "3000:3000"
links:
- db
volumes:
- .:/myproject
I've have no clues on what is going on.
UPD: My system is Fedora 23.
Output of docker info
$ docker info
Containers: 9
Running: 0
Paused: 0
Stopped: 9
Images: 83
Server Version: 1.11.1
Storage Driver: devicemapper
Pool Name: docker-8:6-1188585-pool
Pool Blocksize: 65.54 kB
Base Device Size: 10.74 GB
Backing Filesystem: ext4
Data file: /dev/loop0
Metadata file: /dev/loop1
Data Space Used: 5.935 GB
Data Space Total: 107.4 GB
Data Space Available: 13.71 GB
Metadata Space Used: 6.803 MB
Metadata Space Total: 2.147 GB
Metadata Space Available: 2.141 GB
Udev Sync Supported: true
Deferred Removal Enabled: false
Deferred Deletion Enabled: false
Deferred Deleted Device Count: 0
Data loop file: /var/lib/docker/devicemapper/devicemapper/data
WARNING: Usage of loopback devices is strongly discouraged for production use. Either use `--storage-opt dm.thinpooldev` or use `--storage-opt dm.no_warn_on_loop_devices=true` to suppress this warning.
Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
Library Version: 1.02.109 (2015-09-22)
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: null host bridge
Kernel Version: 4.4.9-300.fc23.x86_64
Operating System: Fedora 23 (Workstation Edition)
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 5.7 GiB
Name: localhost.localdomain
ID: 22QE:VZIY:26E3:WMVR:FH3Q:VYTS:FPJX:LFJ3:DHPK:EAZZ:ZDHP:56Q3
Docker Root Dir: /var/lib/docker
Debug mode (client): false
Debug mode (server): false
Registry: https://index.docker.io/v1/
I don't know, WTF is going on, but now it works.
I didn't do ANYTHING >_<
#VonC, #JHarris, sorry guys for wasting your time. If I'll figure out the problem, I will update my answer.
However, now I can't catch this error again.

Resources