bnhf / openvpn-admin-plus

Docker-based web interface (with golang backend) for monitoring and admin of an OpenVPN TAP/TUN server setup with PiVPN or other OpenVPN server installations. This project has been renamed from pivpn-tap-web-ui, to reflect its new broader scope.
MIT License
141 stars 23 forks source link

Port 8080 is not listening #53

Closed lucamancusodev closed 1 year ago

lucamancusodev commented 1 year ago

Hi, I've installed the container from the stack and successfully deployed. Now the contain is started but I can't open the gui at ip:8080, also checked the listening port on the server and the 8080 is missing.

I'm using debian 11 and my openvpn server is currently working on the default path "/etc/openvpn/"

bnhf commented 1 year ago

@Luccio96

Assuming you're using Portainer, what is showing at the end of your log after the container launches? For example, mine shows:

2023/04/08 13:10:43.943 [I] [asm_amd64.s:1581]  http server Running on http://:8080

Also what's showing, as far as the openvpn-admin-plus container is concerned, in the Containers section of Portainer?

screenshot-nuc10-pc2-2023 04 14-07_21_33

Is it possible that you already have something running on port 8080?

lucamancusodev commented 1 year ago

Hi @bnhf

This is my logs:

2023-04-17T07:03:41.026873581Z TERM environment variable not set. 2023-04-17T07:03:41.064898127Z OpenVPN directory set to: /etc/openvpn 2023-04-17T07:03:41.064927584Z Working directory set to: /opt 2023-04-17T07:03:41.136755920Z PiVPN server set to: server_5WvzCbfmkb2jPw63 server_X194SFMGqcUxbZkB 2023-04-17T07:03:41.136869622Z Working directory set to: /opt/openvpn-gui-tap 2023-04-17T07:03:41.173742736Z sed: -e expression #1, char 97: unterminateds' command`

Here the containter, as it shows it's running and I don't have anything running on port 8080.

Senza titolo

bnhf commented 1 year ago

@Luccio96

Looks like you have an image that was pulled at the end of last year somehow. In Portainer - Stacks, use the slide switch that forces a new container to be pulled with the latest tag. So stop the stack, and then update the stack with the "Re-pull image and redeploy" option:

screenshot-raspberrypi10-2023 04 17-07_13_56

lucamancusodev commented 1 year ago

@bnhf

I did it but still the same errors and the port is not listening, tried also to change the port... As I see from Image info the created date is 2023-01-11, is there a newer one?

Screenshot 2023-04-17 alle 20 35 35
bnhf commented 1 year ago

@Luccio96

I missed it on first-look, but I believe the problem is here (from your logs):

PiVPN server set to: server_5WvzCbfmkb2jPw63 server_X194SFMGqcUxbZkB

You seem to have two values entered for server. Only a single OpenVPN server is supported, and this value needs to match what's being used as the server name, which in turn is the name used for the server certificate and key. If you're not sure what that is, look in your current /etc/openvpn/server.conf file, and there should be a couple of directives that look like this:

cert easy-rsa/pki/issued/NUC10-PC2_ae265e62-cd06-xxxx-4092-bd68-xxxxxxxxxxxx.crt
key easy-rsa/pki/private/NUC10-PC2_ae265e62-cd06-xxxx-4092-bd68-xxxxxxxxxxxx.key

The part including the server's name, but not including the extension, is what you want. So in the above example, the PIVPN_SERVER environment variable would be set to:

    PIVPN_SERVER=NUC10-PC2_ae265e62-cd06-xxxx-4092-bd68-xxxxxxxxxxxx
lucamancusodev commented 1 year ago

@bnhf

That was the problem, after revoked the certificate the container started.