LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   openvpn service is dead (https://www.linuxquestions.org/questions/linux-server-73/openvpn-service-is-dead-801699/)

vofka 04-13-2010 03:21 AM

openvpn service is dead
 
Hello everybody! I have the following problem, i just installed Fedora 12, clean without anything change in it. I opened services dialog, and the openvpn service have status:dead, however it shows that it is enabled.
when i try to run it as:
/sbin/service openvpn start. It write OK. However if check it:
/sbin/service openvpn status
it write that service not running. What is a point of a problem? I have opened openvpn in FireWall,however without success, may be some additionsl services for openvpn are not running?

centosboy 04-13-2010 05:50 AM

Quote:

Originally Posted by vofka (Post 3933779)
Hello everybody! I have the following problem, i just installed Fedora 12, clean without anything change in it. I opened services dialog, and the openvpn service have status:dead, however it shows that it is enabled.
when i try to run it as:
/sbin/service openvpn start. It write OK. However if check it:
/sbin/service openvpn status
it write that service not running. What is a point of a problem? I have opened openvpn in FireWall,however without success, may be some additionsl services for openvpn are not running?

Have you checked that anything is being written to /var/log/messages?
should look like this when starting

Code:

[root@xxx ~]# service openvpn start
Starting openvpn: 

                                        [  OK  ]

Does it??

Possible library modules missing??
Check

Code:

ldd `which openvpn`

or

Code:


ldconfig -vv `which openvpn` | less


let us know your results...

vofka 04-15-2010 05:24 PM

Quote:

Originally Posted by centosboy (Post 3933896)
Have you checked that anything is being written to /var/log/messages?
should look like this when starting

Code:

[root@xxx ~]# service openvpn start
Starting openvpn: 

                                        [  OK  ]

Does it??

Possible library modules missing??
Check

Code:

ldd `which openvpn`

or

Code:


ldconfig -vv `which openvpn` | less


let us know your results...

Yes service start success:
Code:

[root@localhost /]# service openvpn start
Starting openvpn:                                          [  OK  ]


However if check it as:
Code:

[root@localhost /]# service openvpn status
openvpn: service not started

:(
And if you start:
Code:

[root@localhost /]# system-config-services
You will see the status of service openvpn:
this service is enabled, this service is dead!
Now run ldd command:
Code:

[root@localhost /]# ldd /usr/sbin/openvpn
        linux-gate.so.1 =>  (0x002f7000)
        libselinux.so.1 => /lib/libselinux.so.1 (0x00963000)
        libpkcs11-helper.so.1 => /usr/lib/libpkcs11-helper.so.1 (0x0082c000)
        libssl.so.10 => /usr/lib/libssl.so.10 (0x07f96000)
        libcrypto.so.10 => /usr/lib/libcrypto.so.10 (0x07c56000)
        liblzo2.so.2 => /usr/lib/liblzo2.so.2 (0x00878000)
        libdl.so.2 => /lib/libdl.so.2 (0x00809000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00810000)
        libc.so.6 => /lib/libc.so.6 (0x00692000)
        /lib/ld-linux.so.2 (0x00670000)
        libz.so.1 => /lib/libz.so.1 (0x00863000)
        libgssapi_krb5.so.2 => /lib/libgssapi_krb5.so.2 (0x0058c000)
        libkrb5.so.3 => /lib/libkrb5.so.3 (0x07edb000)
        libcom_err.so.2 => /lib/libcom_err.so.2 (0x0055a000)
        libk5crypto.so.3 => /lib/libk5crypto.so.3 (0x0055f000)
        libresolv.so.2 => /lib/libresolv.so.2 (0x009c9000)
        libkrb5support.so.0 => /lib/libkrb5support.so.0 (0x005cb000)
        libkeyutils.so.1 => /lib/libkeyutils.so.1 (0x005c6000)
[root@localhost /]#

It seems that it is OK with openvpn libraries!
And if run /usr/sbin/openvpn it works, nothing about missing libraries, however the serfvice is dead :(

vofka 04-17-2010 08:03 AM

The problem is resolved. The sense of the problem was, that as described in /etc/init.d/openvpn (/sbin/service start this script),
the work=/etc/openvpn is the work folder, so shell script search all config files in this folder, if any of them exists, it run them as:
Code:

$openvpn --daemon --writepid $piddir/$bn.pid --config $c --cd $work $script_security
(Line 174) and write pid file to directory,
/var/run/openvpn. if there is no problems it creates lock file in:/var/lock/subsys/openvpn. And if lock file not exists(it means that were some problems to start config files),it returns "openvpn: service not started", and the service marks as dead in the list of services.
So lets assume the problem as resolved.


All times are GMT -5. The time now is 02:48 PM.