1- I created a new containerservice in azure.
2 - The creation was done following the portal step by step.
3 - I have not changed any configuration of any service, VM, balancing, master and agent.
4 - I can connect with PuTTY normally.
5 - I can open a tunnel by redirecting port 80 to port 80.
Following this tutorial, I can put the container to run::
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ffe6a1c890e4 yeasy/simple-web "/bin/sh -c 'pytho..." 31 minutes ago Up 31 minutes 0.0.0.0:80->80/tcp vibrant_morse
If I access localhost from my browser I can reach port 80 of the container and see the identical "Real Visit Results" page of the tutorial.
But in the tutorial it says that if I use load balancer's DNS I should see the result, that's my problem, I can not access the container through DNS, I only get timeout.
Reinforcing, I created a container service and did not change any configuration, just entered with PuTTY and put the container to run.
According to your description, it seems that you don't set your DOCKER_HOST environment variable to the local port configured for the tunnel. When you ssh to your master VM, you need execute command below:
export DOCKER_HOST=:2375
Run the Docker commands that tunnel to the Docker Swarm cluster. For example:
docker info
If you don't set the environment variable on the tunnel, the docker contanier is created on master VM, so you could not get the Web with agent Public IP.
Also, you could not set environment variable, but you need to point to the host when you execute docker command. More information please refer to this link
Related
Hello I have setup gitlab over docker and I created a repository then added simple readme file. I am trying to access to the repo from other computers in the same network but I cannot. I setup gitlab to this http://gitlab.local:30080/ url. What should I do to clone repo into other computers and work on local server ?
Where did you specify the dns entry for gitlab.local?
you need some DNS Server which is able to resolve gitlab.local to the IP of the host your docker container is running on.
Did you expose the Port from the container to the Host?
you must published the port from docker container to the one port from host.
after do this, if you use a linux OS add the record like this in /etc/hosts file.
192.168.1.10 gitlab.local
if you use a Windows OS add the record into the C:Windows\System32\drivers\etc HostFile
now you can access gitlab with this urlon the any network computer that edit host file an add record above:
http://gitlab.local:30080/
notice: the firewall must be off or add firewall-rule for gitlab and port on any computer that you use
I'm running a webpack-dev-server application inside a Docker container (node:4.2.1). If I try to connect to the server port from within the container - it works fine. However, trying to connect it from the host computer results in reset connection (the port is published, of course). How can I fix it?
This issue is not a docker problem.
Add --host=0.0.0.0 to your webpack command.
You need to connect to your page like this:
http://host:port/webpack-dev-server/index.html
Look to the iframe mode
You need to make sure:
you docker container has mapped the EXPOSE'd port to a host port
docker run -p x:y
your VM (if you are using docker machine with a VM) has forwarded that mapped port to the actual host (the host of the VM).
See "How to access tomcat running in docker container from browser?"
I would like to deploy a container based app in azure container service, and followed this tutorial.
https://learn.microsoft.com/en-us/azure/container-service/dcos-swarm/container-service-mesos-marathon-ui
Everything went well except that the public url is showing
ERR_CONNECTION_TIMED_OUT in browser.
When pinging the url, able to get the IP address but pings are showing as timed out.
I have verified agents LB with port 80 as allowed in the rules list.
How to access the application through public web ?
When pinging the url, able to get the IP address but pings are showing
as timed out.
Azure disable ICMP package, so you could not ping Azure public IP address. You could use telnet or tcping to check whether your service is listening.
Do you bind port 80 of the container to port 80 of the DC/OS agent? If I don't do this, I get same error log with you. Please refer to this link.
Note: I test in my lab, if I did not do this, nginx service will listen on other port. I ssh to the agent VM.
root#dcos-agent-public-65818314000001:~# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
7e8091548413 nginx "nginx -g 'daemon off" 14 minutes ago Up 14 minutes 0.0.0.0:4912->80/tcp mesos-d7be0314-6be2-467b-8376-433a05033b17-S1.42edeac0-2aa3-4ecd-acaa-17d5f2f4ac19
The service is listening on port 4912 not 80.
If you do this step, I suggest you also could ssh to agent VM(same user name and private key) and execute docker ps .
I created a VM ScaleSet from a custom image where Docker is pre-installed. For testing, I just run on all available VMs this command: sudo docker container run -d -p 80:80 seqvence/static-site (just showing a simple static site on port 80).
However, I first created a healthProbe (just checking for tcp:80). Then I created a loadbalancing rule for port:80 -> backend port:80. And of course my LoadBalancer has a backend pool containing my VMs of my ScaleSet.
But when I now navigate to myvmss.westeurope.cloudapp.azure.com I get ERR_CONNECTION_TIMED_OUT
What am I missing?
Port 80 was blocked by Network security Group.
How to allow it: https://blogs.msdn.microsoft.com/pkirchner/2016/02/02/allow-incoming-web-traffic-to-web-server-in-azure-vm/
My environment:
Master:
Azure VM running Ubuntu 14.10
Docker (1.9) running Jenkins Image
I have added port 8080 (for UI) and 50000 (for slave) as endpoints on the Azure VM.
Slave:
Windows 10 (running on Mac via BootCamp)
Configured the firewall to allow inbound and outbound traffic on port 50000 (that slave jnlp seems to be using).
I can access my Jenkins Master install over the web. I am trying to configure the slave on my Windows 10 m/c. I have tried all 3 methods to configure the slave.
Each time after several retries, the slave throws the "Connection Refused" error (screenshot attached).
Slave Error Screenshot
Can someone help point me in the right direction? I have little knowledge of Linux systems but proficient with Windows.
I have tried the workaround here but it hasn't worked for me.
There's three things that I think you can check here:
Check that you expose port 50000 on your Jenkins docker container. Check for the Dockerfile, there must be a clause EXPOSE 5000 or something. Or when you run your container run it with something like this: docker run -it -p 50000:50000 which maps local post 50000 to the containers port 50000.
Check that you don't have any security rules on Azure blocking port 50000 to your Azure VM. Don't know about Azure but in AWS you allow port 50000 in your security group(s).
Check your Azure VM's firewall. Is it Windows? Check the firewall and allow port 50000. Is it Linux ? Check iptables and allow port 50000.
Hope it helps.