Open thomasfrederikhoeck opened 3 years ago
5001 is the right port for it to be exposing. The nginx instance inside the container serves as a proxy from port 5001 to the internal gunicorn instance that listens on port 31311.
Other things you can check: Can you curl to port 5001 from inside and outside the container? How about from inside the notebook, if you do something like import requests; requests.get('http://localhost:5001')
?
Thank you for the answer @keriehm . I'm not running inside a AzureML Notebook but on my local machine where I use docker with SSH (DOCKER_HOST configured).
I was able to curl port 5001 from inside the container. When I connect with SSH to the host machine I was able to curl port 6584(specified in deployment_config
). So it I realised it was something to with the which adresses it listens for. To compare i also started a standard nginx with docker run -p 81:80 -d nginx
. I then use netstat
on the host machine:
tfh@srvdocker01:~$ sudo netstat -tulpn | grep LISTEN
tcp 0 0 127.0.0.1:6584 0.0.0.0:* LISTEN 10067/docker-proxy
tcp 0 0 127.0.0.1:32770 0.0.0.0:* LISTEN 10054/docker-proxy
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 670/systemd-resolve
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 725/sshd
tcp6 0 0 :::81 :::* LISTEN 9231/docker-proxy
tcp6 0 0 :::22 :::* LISTEN 725/sshd
which showes that the deployed service only listing on the loopback address (127.0.0.1) while a normal deployment listens on all addresses. Is there some way to add to LocalWebservice.deploy_configuration()
so that you can listen on all addresses?
When I try to deploy a dummy with LocalWebservice it exposes the wrong port making failing the deploy which causes it to hang and be unavalible. I run the code:
It yields the following output where it hang at the last step:
When i run
docker ps
i get that port 6584 maps to 5001but if I get the logs with
docker logs 5d61a0df3ee4
Iget the following showing that it should be port 31311 that should be exposed:If I
exec
into the container an curl on127.0.0.1:31311/
I do get a prober health check.I'm using
azureml-core==1.33.0
on Windows inpython=3.8.8