You are not logged in.

#1 2009-08-25 17:32:11

nuxorg
Member
Registered: 2009-08-11
Posts: 37

[solved] OpenVPN daemon fails

I have intalled OpenVPN (core/openvpn 2.1_rc19-2), but when I try to run the daemon I get error.

/etc/rc.d/openvpn start
:: Starting OpenVPN ...                                                              [BUSY]
openvpn /etc/rc.d/openvpn: line 18: [: -eq: unary operator expected                  [FAIL]

I don't know what that means or how to fix it.

Does anybody use OpenVPN with Arch Linux? I have tried to find guides and info about OpenVPN (founded OpenVPN Bridge - ArchWiki). Any extra links to guides about OpenVPN is gladly taken.

Last edited by nuxorg (2009-08-26 15:58:24)

Offline

#2 2009-08-26 03:51:18

neddie_seagoon
Member
Registered: 2009-08-23
Posts: 121

Re: [solved] OpenVPN daemon fails

You can take a look at /etc/rc.d/openvpn to see what it's trying to do. I looked at the file, and it looks like it is trying to go through every file with .conf extension in /etc/openvpn and spawning an openvpn daemon for it. Each time it does this if it fails it gives the variable success a non-zero value, and the next step (line 18) checks this.

Long story short, do you have any config files in /etc/openvpn? If you do, make sure they work by running as root:

/usr/sbin/openvpn /etc/openvpn/yourconfig.conf

If you don't, check the OpenVPN docs (I would try the mini-howto to begin) to create a working config, then re-try starting the daemon once you manually confirm the config works.
http://www.openvpn.net/index.php/open-s … ation.html

Offline

#3 2009-08-26 06:52:03

nuxorg
Member
Registered: 2009-08-11
Posts: 37

Re: [solved] OpenVPN daemon fails

Thank you for replying.

I have /etc/openvpn/openvpn.conf

dev tun
server 10.0.0.0 255.255.255.0
push "route 10.50.0.0 255.255.255.0"
tls-server
# Diffie-Hellman Parameters (tls-server only)
dh /etc/openvpn/easy-rsa/keys/dh1024.pem
# Certificate Authority file
ca /etc/openvpn/easy-rsa/keys/ca.crt
# Our certificate/public key
cert /etc/openvpn/easy-rsa/keys/server.crt
# Our private key
key /etc/openvpn/easy-rsa/keys/server.key
# tls-auth
tls-auth /etc/openvpn/easy-rsa/keys/ta.key 0
## which port and protocol we will use
port 1149
proto udp
# Downgrade UID and GID to
# "nobody" after initialization
# for extra security.
#user nobody
#group nogroup
user root
group root
# If you built OpenVPN with
# LZO compression, uncomment
# out the following line.
#comp-lzo
## misc settings
persist-tun
persist-key
keepalive 10 120
# maximum number of simultaneously connected clients
max-clients 10
# logging settings
verb 3
mute 20
# log locations
status /var/log/openvpn/openvpn-status.log
log-append /var/log/openvpn/openvpn.log

I changed user nobody -> root and group nogroup -> root, but I still get same error (FAIL). I have to check my openvpn.conf again.

I found little guide for OpenVPN and used it. Still same error that I posted in the first message.

Offline

#4 2009-08-26 15:21:01

neddie_seagoon
Member
Registered: 2009-08-23
Posts: 121

Re: [solved] OpenVPN daemon fails

Maybe try commenting out the user and group lines just for testing to see if they are the issue. Also, when you run openvpn directly against the config file, what is the output? It should be able to tell you specifically what is wrong in the config file.

Offline

#5 2009-08-26 15:57:43

nuxorg
Member
Registered: 2009-08-11
Posts: 37

Re: [solved] OpenVPN daemon fails

neddie_seagoon wrote:

Maybe try commenting out the user and group lines just for testing to see if they are the issue. Also, when you run openvpn directly against the config file, what is the output? It should be able to tell you specifically what is wrong in the config file.

Thank you!

Problem is now gone, OpenVPN seems to launch ok.

Arch Linux is very easy to configure and use. That does not require GUI configuration tools, but great documentation and helpful users. Arch Linux has both.

Offline

#6 2009-09-16 11:24:11

fmjrey
Member
Registered: 2009-08-19
Posts: 13

Re: [solved] OpenVPN daemon fails

Well, the solution to this problem is not to disable those two options in the openvpn .conf file, but to fix the /etc/rc.d/openvpn script, see bug #16095 (link)

Offline

Board footer

Powered by FluxBB