ruimarinho / docker-openvpn-monitor

The trusted multi-platform web-based OpenVPN Monitor docker image.
MIT License
101 stars 27 forks source link

Could not connect to openvpn:5555 (Temporary failure in name resolution) #23

Closed clerrific closed 3 years ago

clerrific commented 3 years ago

Hello.

I would like to seek assistance from you guys. It was not running perfectly and this is the first time I encountered this error.

Can you help me on our issue please. 2021-04-28_06h32_57

I also checked its docker openvpn-monitor logs image

Here is my configuration in docker-compose yaml file image

Here is my openvpn configuration file. I already input the 0.0.0.0 5555 but still the same image

Then I tried your other version but still the same image

m0rtalis commented 3 years ago

It was not running perfectly and this is the first time I encountered this error. I assume you mean it was running perfectly?

The issue seems to be, that the container openvpn_monitor cannot resolve the hostname 'srv-dr-openvpn'. Try it with docker-compose run openvpn_monitor To fix it either use openvpn in the env-variable OPENVPNMONITOR_SITES_0_NAME, docker will automatically resolve it for you to the openvpn container or use links. For that add to the openvpn_monitor service:

openvpn_monitor:
[...]
    links:
        - "openvpn:svr-dr-openvpn"
clerrific commented 3 years ago

Hello @m0rtalis

Thank you from your response.

I modified my docker-compose yaml file. image

But shows the same error image

Do I need to change my hostname and remove the dr in hostname. It will be like svr-openvpn ?

I cannot perform a restart for changing hostname since it is used in our production environment

ruimarinho commented 3 years ago

@clerrific enter the openvpn-monitor container (docker exec -it <containerId/name> sh) and then do a cat /etc/hosts. Try pinging the linked container to see if you have connectivity.