Openvpn-as on docker won't start

Hi
I wanted to try out openvpn-as and I pulled the latest image from LinuxServer’s docker repo.

I used the following command to start it up.
sudo docker create --name=openvpn-as
–restart=always
-v /home/docker/openvpn-as/config:/config
-e INTERFACE=eth0
-e PGID=0 -e PUID=0
-e TZ=Europe/London
–net=host --privileged
linuxserver/openvpn-as

sudo docker start openvpn-as

While using it on Ubuntu 18, I get the error Connection refused on the web UI.
While using it on Centos 7, I get the error Connection Timed Out on the web UI.

When I went in for logs, I get the following error because of which server couldn’t start.

server init= (256, 'Failed to connect to bus: No such file or directory')
Error: Could not execute server start.

Please guide.

First of all, posted in the wrong section, will move this.

I believe this isn’t working for you as you’re trying to run the container as root (uid/gid=0) - Please set this as a normal user.

Is your interface actually eth0 or not? Check with ip a it’ll list your IP’s and the interfaces they are bound to.

Hi
I used the sudoer user account, which is the only other account on my machine other than root with
uid : 1000
gid : 1000
as displayed by ‘id’ command.

Still, web interface shows connection timed out on the ip.
on 943 port, nothing shows up.

yes, it’s eth0. I had checked it.
with ubuntu, it was ens3
with centos, eth0

How did you install docker on your system?

Using the following commands.
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum install docker-ce
sudo systemctl start docker
sudo systemctl enable docker

Hello
I think you missed my earlier comment. So I am mentioning it again.

Using the following commands.
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum install docker-ce
sudo systemctl start docker
sudo systemctl enable docker

No I didn’t miss your message.

Have you got a firewall enabled on your box?

Also, not sure if it makes any difference but I always do my installs from http://get.docker.com.

Hello
I disabled the firewall and tried again. Now, iptables isn’t working as well inside.

Interesting Observation I made was after going into the python scripts being called.
try:
if os.stat(’/etc/systemd/system/openvpnas.service’):
INIT = “systemctl start openvpnas”
except OSError:
INIT = “/etc/init.d/openvpnas start”
retv = commands.getstatusoutput( INIT )
if DEBUG: print “server init=”, retv
if retv[0] != 0:
print “Error: Could not execute server start.”
sys.exit(1)

I see this code, and found that it’s calling systemctl. I tried to call it but it threw me the following error
Failed to connect to bus: No such file or directory

Also, going to the except, there’s no openvpnas file in /etc/init.d

Just noticed you are missing --privileged from the docker create command.

Apologies but the privileged flag is mentioned in the command I mentioned in my query.

Just tried the container myself and it’s worked first time:


Running Ubuntu Mate

Linux VM 4.15.0-38-generic #41-Ubuntu SMP Wed Oct 10 10:59:38 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
j0nnymoe@VM:~$ docker -v
Docker version 18.06.1-ce, build e68fc7a
j0nnymoe@VM:~$ 

Hi
It worked for me as well. Thank you so much.
I think the issue was with the docker. I installed it from docker.com’s repository now.

thank you so much for help

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.