Issue with proxy and Rancher

Hello all,

After several days of working with Rancher, I’m really impressed with the ease of usage. On my laptop and docker-machine it works amazingly snappy.

After installing Rancher on a few machines under VMWare (sudo ros install etc…). I’m really struggling with the proxy.

I have the proxy server parsed in the cloud-config.yml file. This allows me to install rancher/server and be able to pull any image.

Only after a little while/a few minutes (without change). I keep receiving proxy errors and also docker pull no longer works. After a reboot all seems well again.

Error (Image [jenkins:1.651.3] failed to pull: Error while pulling image: Get repositories/library/jenkins/images: http: error connecting to proxy proxy_server: dial tcp 10.42.7.9:8080: getsockopt: no route to host)

[rancher@rancher ~]$ sudo system-docker pull jenkins
Using default tag: latest
Pulling repository docker.io/library/jenkins
Error while pulling image: Get https://index.docker.io/v1/repositories/library/jenkins/images: http: error connecting to proxy proxy_server: dial tcp 10.42.7.10:8080: getsockopt: no route to host
[rancher@rancher ~]$

Hope you guys have any suggestion :slight_smile:

To show that after a few minutes the proxy settings go awry, here the console. Commands are about 5 minutes apart;

[rancher@rancher ~]$ sudo system-docker pull jenkins
Using default tag: latest
latest: Pulling from library/jenkins
Digest: sha256:bc0d9b4f622d2974984b6967fab7dcd904037a19586809905a9563b8df4af6ee
Status: Image is up to date for jenkins:latest
[rancher@rancher ~]$ sudo system-docker pull jenkins
Using default tag: latest
Pulling repository docker.io/library/jenkins
Error while pulling image: Get https://index.docker.io/v1/repositories/library/jenkins/images: http: error connecting to proxy http://proxy.company.nl:8080: dial tcp 10.42.7.10:8080: getsockopt: no route to host
[rancher@rancher ~]$

UPDATE!

Managed to solve this with the following command!

sudo ros config set rancher.docker.environment “[‘http_proxy=proxy.server:8080’, ‘https_proxy=http://proxy.server:8080’]”