Docker Community Forums

Share and learn in the Docker community.

Error connecting to docker container

build
docker

(Skac) #1

HI,

I installed a service on a remote Linux computer using docker. I used the following commands

  • git clone https://github.com/OpenVidu/openvidu-tutorials.git

  • npm install -g http-server

  • http-server openvidu-tutorials/openvidu-getaroom/web

  • docker run -p 4443:4443 --rm -e openvidu.secret=MY_SECRET -e openvidu.publicurl=https://187.84.228.66:4443 openvidu/openvidu-server-kms

But when I try do connect the first time, I receive the follow error menssage: “ERR_EMPTY_RESPONSE”. sometime “ERR_CONNECTION_CLOSED”

I used the following diagnostic command in Linx computer “docker ps” and received the following response:

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
21b0620266cd openvidu/openvidu-server-kms:latest "/usr/bin/supervisor 5 days ago Up 5 days 8443/tcp, 8888/tcp, 0.0.0.0:4443->4443/tcp, 9091/tcp sick_ritchie

What is wrong? How can I solve this?

If anyone can help me, I’m grateful.

Fernando


(Craigomez) #2

hello,
up vote
22
down vote
accepted
You need to publish the exposed ports by using the following options:

-P (upper case) or --publish-all that will tell Docker to use random ports from your host and map them to the exposed container’s ports.

-p (lower case) or --publish=[] that will tell Docker to use ports you manually set and map them to the exposed container’s ports.

The second option is preferred because you already know which ports are mapped. If you use the first option then you will need to call docker inspect demo and check which random ports are being used from your host at the Ports section.

Just run the following command:

docker run -it -p 8080:8080 demo
After that your url will wor
best regards
craig Nox ShowBox


(Skac) #3

Hi Craig

Thank you very much from the informations.

But I have one doubt:.

Using the command = docker run -it -p 8080: 8080 demo

What is demo?

The demo means the service is running?

If yes, the correct command is = docker run -it -p 8080: 8080 openvidu/openvidu-server-kms**:2.1.0**

Kind regards,

Fernando


(Johnson987) #4

Your best bet here is to research how Docker works and troubleshoot it yourself. I had to reach out to our local development staff here at work because these new apps are not well supported from IBM mobdro


(Abhijidshailk) #5

Hi ,

I try to run

docker run -it --net host --pid host --cap-add audit_control
-e DOCKER_CONTENT_TRUST=$DOCKER_CONTENT_TRUST
-v /var/lib:/var/lib
-v /var/run/docker.sock:/var/run/docker.sock
-v /usr/lib/systemd:/usr/lib/systemd
-v /etc:/etc --label docker_bench_security
docker/docker-bench-security

but the output is

Error connecting to docker daemon (does docker ps work?)

docker version is : Docker version 1.11.1, build 5604cbe
Linux version : (Red Hat 4.8.5-4)

I have a system with Docker version 1.10.3, build 20f81dd and container run properly…

It seems that this is related with docker version ? Could you Please help?

Thank you
BR,
George


(Imtomalex) #7

Hi, could you include the docker version from the host you’re running the docker/docker-bench-security container on?
There is issues when different versions of Docker is trying to communicate with each other, do you get the same results when running the standalone script?

Thanks & Regards


(Imjamespeter) #8

Yes! johnson987 I’m totally agreed with you.
Any other suggestion?


(Jopajico1) #9

You need to publish the exposed ports by using the following options:

-P (upper case) or --publish-all that will tell Docker to use random ports from your host and map them to the exposed container’s ports.

-p (lower case) or --publish=[] that will tell Docker to use ports you manually set and map them to the exposed container’s ports.

The second option is preferred because you already know which ports are mapped. If you use the first option then you will need to call docker inspect demo and check which random ports are being used from your host at the Ports section.

Just run the following command:

docker run -it -p 8080:8080 demo
After that your url will work.


(Jamesthomas11) #10

Hi @abhijidshailk , could you include the docker version from the host you’re running the docker/docker-bench-security container on?
There is issues when different versions of Docker is trying to communicate with each other, do you get the same results when running the standalone script?

Thanks & Regards,
redbox tv


(Fipsekerza) #11

How to Download APK for android devices and its working on all the freamwork


(Mantis07) #12

So the problem exist when run the container with command below:

docker run -it --net host --pid host --cap-add audit_control_Blokada
-e DOCKER_CONTENT_TRUST=$DOCKER_CONTENT_TRUST
-v /var/lib:/var/lib
-v /var/run/docker.sock:/var/run/docker.sock
-v /usr/lib/systemd:/usr/lib/systemd
-v /etc:/etc --label docker_bench_security
docker/docker-bench-security-TvTap


(Akkijordan007) #13

I was facing the issue since morning. But this fixed my issue within seconds. Perhaps, this is the most functional solution out there FreeAccountsOnline so far.


(Rahulyyadav) #14

Hello there,
I was facing the same problem since last week. Bee reading multiple articles and solutions but non of them worked. But finally, your solution has helped me solve the problem.
Regards,
live tv apk


(Epsxe) #15

Hello,
i am also facing the problem. Thanks ePSXe


(Mogidu12) #16

Hello there,
I was facing the same problem since last week. Bee reading multiple articles and solutions but non of them worked. But finally, your solution has helped me solve the problem.
Regards,


(Porter664) #17

Docker Community Forums Thanks for sharing this post, it was great reading this article! would like to know more! keep in touch and stay connected Redbox Tv Cloud Tv Videoder


(Murasing23) #18

Some times i’m getting error by using remote Linux computer.
Just check my site Tweakbox App


(Balakrishna12) #19

I’m also having the same problem most of the people are having this bug it’s really annoying Please help.
Best Regards,
Bala Krishna ViOP Phone


(Jamesthomas11) #20

Your best bet here is to research how Docker works and troubleshoot it yourself. I had to reach out to our local development staff here at work because these new apps are not well supported from IBM Morpheus tv


(Danielcook09) #21

Thank you for the updates. Regards, Cook :slight_smile: