ruimarinho / docker-openvpn-monitor

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

Address in use error while attempting to run the docker container #11

Closed farzinnasiri closed 4 years ago

farzinnasiri commented 4 years ago

I'm using this container: https://github.com/kylemanna/docker-openvpn for my openvpn server,I added the following line to the openvpn.conf file in etc/openvpn/: management 0.0.0.0 5555 The I pushed the docker container with:

docker run --name openvpn-monitor \ -e OPENVPNMONITOR_DEFAULT_DATETIMEFORMAT="%%d/%%m/%%Y" \ -e OPENVPNMONITOR_DEFAULT_LATITUDE=-37 \ -e OPENVPNMONITOR_DEFAULT_LOGO=logo.jpg \ -e OPENVPNMONITOR_DEFAULT_LONGITUDE=144 \ -e OPENVPNMONITOR_DEFAULT_MAPS=True \ -e OPENVPNMONITOR_DEFAULT_SITE=Test \ -e OPENVPNMONITOR_SITES_0_ALIAS=UDP \ -e OPENVPNMONITOR_SITES_0_HOST=openvpn-udp \ -e OPENVPNMONITOR_SITES_0_NAME=UDP \ -e OPENVPNMONITOR_SITES_0_PORT=5555 \ -e OPENVPNMONITOR_SITES_1_ALIAS=TCP \ -e OPENVPNMONITOR_SITES_1_HOST=openvpn-udp \ -e OPENVPNMONITOR_SITES_1_NAME=TCP \ -e OPENVPNMONITOR_SITES_1_PORT=5555 \ -p 80:80 ruimarinho/openvpn-monitor

I got his error:

docker: Error response from daemon: driver failed programming external connectivity on endpoint openvpn-monitor (b1ee35de04262483d6c71700c68ec3a57d605cf807d33835f7e764dd83d09b2d): Error starting userland proxy: listen tcp 0.0.0.0:80: bind: address already in use.

I think the problem is because I have and nginix on my server listing for port 80 and serving a website. How ever I am not sure and I don't know how to fix it. please help. Thank you

fablarosa commented 4 years ago

Just change the port used to serve the openvpn-monitor mini-site.
For example, on the last line of your docker run command use
-p 8080:80 ruimarinho/openvpn-monitor for port 8080.

ruimarinho commented 4 years ago

Yep, exactly what @fablarosa said.

farzinnasiri commented 4 years ago

Just change the port used to serve the openvpn-monitor mini-site. For example, on the last line of your docker run command use -p 8080:80 ruimarinho/openvpn-monitor for port 8080.

thanks, now I have the interface but it doesn't provide any data... I am running openvpn server on another container. can this cause the problem? https://github.com/kylemanna/docker-openvpn I am using this container for openvpn. I am getting: Could not connect to openvpn-udp:5555 (Name does not resolve) I used my servers ip address as openvpn-udp for site 0 and 0.0.0.0 as openvpn-udp for site 1 to test. However none of them worked :| my openvpn container is on : 0.0.0.0:1194->1194/udp