Error opening configuration file:
Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech
Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
-
- OpenVPN User
- Posts: 48
- Joined: Sun Oct 03, 2010 4:55 pm
Error opening configuration file:
helo I had to remake my server and I am using a different interface on my client. I would like to known why I am receiving this error on my logs?
What sould I do, the openvpn I am using is the last one from yum installer and I am using the same Ip address on the new interface.
What sould I do, the openvpn I am using is the last one from yum installer and I am using the same Ip address on the new interface.
- janjust
- Forum Team
- Posts: 2703
- Joined: Fri Aug 20, 2010 2:57 pm
- Location: Amsterdam
- Contact:
Re: Error opening configuration file:
we need a little more information if you want us to help you.
Which configuration file is openvpn trying to open? using which command/script? what happens if you run
where "</full/path/to/config/file>" is the path to your config file (a good place to start looking is /etc/openvpn.
which Linux distro are you using?
Which configuration file is openvpn trying to open? using which command/script? what happens if you run
Code: Select all
openvpn --config </full/path/to/config/file>
which Linux distro are you using?
-
- OpenVPN User
- Posts: 48
- Joined: Sun Oct 03, 2010 4:55 pm
Re: Error opening configuration file:
thanks my friend, I found the problem using openvpn --config it is a route problem.
-
- OpenVPN User
- Posts: 48
- Joined: Sun Oct 03, 2010 4:55 pm
rRe: Eror opening configuration file:
sorry, but when I give --config parameter it works!!!, but When I command service openvpn start; gives me this error at /var/log/messages
openvpn[3230]: Options error: In [CMD-LINE]:1:Eror opening configuration file:
I am using a centos.
On debian .conf works well should I have another .conf like .cfg or something on centos?
Why is it not reading my .conf?
what kind of permission should I set for the configuration file on centos and what Owner?
can somebody help me?
openvpn[3230]: Options error: In [CMD-LINE]:1:Eror opening configuration file:
I am using a centos.
On debian .conf works well should I have another .conf like .cfg or something on centos?
Why is it not reading my .conf?
what kind of permission should I set for the configuration file on centos and what Owner?
can somebody help me?
- janjust
- Forum Team
- Posts: 2703
- Joined: Fri Aug 20, 2010 2:57 pm
- Location: Amsterdam
- Contact:
Re: Error opening configuration file:
to start openvpn on the command line you always need to specify '--config'. this is true for Debian also. What might happen on Debian is that a wrapper script is present which does this for you.
When you install OpenVPN on CentOS (which I use regularly) you can use the /etc/init.d/openvpn script to start openvpn as a service; this script picks up all configuration files from /etc/openvpn/*.conf
When you install OpenVPN on CentOS (which I use regularly) you can use the /etc/init.d/openvpn script to start openvpn as a service; this script picks up all configuration files from /etc/openvpn/*.conf
-
- OpenVPN User
- Posts: 48
- Joined: Sun Oct 03, 2010 4:55 pm
Re: Error opening configuration file:
I was believing on that too, but When I restart the service gives me this error.
I have on my configuration the parameter cd /etc/openvpn/ is that correct?
It works on debian.
do you known why is not getting up the .conf?
I have on my configuration the parameter cd /etc/openvpn/ is that correct?
It works on debian.
do you known why is not getting up the .conf?
- janjust
- Forum Team
- Posts: 2703
- Joined: Fri Aug 20, 2010 2:57 pm
- Location: Amsterdam
- Contact:
Re: Error opening configuration file:
how do you restart the server? on centos you'd normally use
or
if openvpn works from the commandline but not as a service then there's something wrong with your /etc/openvpn files ; there's no need to use 'cd /etc/openvpn' inside an openvpn config file, as long as you use absolute paths to the certificate and key files.
If the openvpn service does not work then check the /var/log/messages file for any warnings/errors (other than 'cannot open config file').
As a final debugging trick you can run
and post the output here - it should give a good clue as to what is going wrong here.
Code: Select all
service openvpn restart
Code: Select all
/etc/init.d/openvpn restart
If the openvpn service does not work then check the /var/log/messages file for any warnings/errors (other than 'cannot open config file').
As a final debugging trick you can run
Code: Select all
bash -vx /etc/init.d/openvpn restart
-
- OpenVPN User
- Posts: 48
- Joined: Sun Oct 03, 2010 4:55 pm
Re: Error opening configuration file:
I will change the verbose to 9 and later I will recreate the .conf and I give you more information.
-
- OpenVPN User
- Posts: 48
- Joined: Sun Oct 03, 2010 4:55 pm
Re: Error opening configuration file:
it is not giving me any more logs and even reading the parameters log, log-append and staus. it is only giving me when I execute openvpn --config parameter.
I will reinstall the operational system and later try again, if I have the same problem I will post more questions.
thank you very much
I will reinstall the operational system and later try again, if I have the same problem I will post more questions.
thank you very much
-
- OpenVPN User
- Posts: 48
- Joined: Sun Oct 03, 2010 4:55 pm
Re: Error opening configuration file:
hello thanks again, I have reinstalled the os and its comeback reading the .conf.
- janjust
- Forum Team
- Posts: 2703
- Joined: Fri Aug 20, 2010 2:57 pm
- Location: Amsterdam
- Contact:
Re: Error opening configuration file:
can you post the configuration file that it is trying to read? or all /etc/openvpn/*.conf files, for that matter?
-
- OpenVpn Newbie
- Posts: 1
- Joined: Fri Jul 27, 2012 3:48 am
Re: Error opening configuration file:
Sorry for reopening an old thread, but I just had a similar issue and found this post while searching for an answer.
For me, it seems selinux (in enforcing mode) was blocking the init script from running, but allowing root to start the process from command line. Once I changed /etc/sysconfig/selinux to passive mode and rebooted, the init script started working.
[vpn]# /etc/init.d/openvpn start
/usr/sbin/openvpn --daemon --writepid /var/run/openvpn/vpnserv.pid --config /etc/openvpn/vpnserv.conf --cd /etc/openvpn --script-security 2
Options error: In [CMD-LINE]:1: Error opening configuration file: /etc/openvpn/vpnserv.conf
[vpn]# /usr/sbin/openvpn --daemon --writepid /var/run/openvpn/vpnserv.pid --config /etc/openvpn/vpnserv.conf --cd /etc/openvpn --script-security 2
[vpn]# ps -eaf |grep openvpn
root 1790 1 0 Jul26 ? 00:00:00 /usr/sbin/openvpn ......
Regards,
Scott
For me, it seems selinux (in enforcing mode) was blocking the init script from running, but allowing root to start the process from command line. Once I changed /etc/sysconfig/selinux to passive mode and rebooted, the init script started working.
[vpn]# /etc/init.d/openvpn start
/usr/sbin/openvpn --daemon --writepid /var/run/openvpn/vpnserv.pid --config /etc/openvpn/vpnserv.conf --cd /etc/openvpn --script-security 2
Options error: In [CMD-LINE]:1: Error opening configuration file: /etc/openvpn/vpnserv.conf
[vpn]# /usr/sbin/openvpn --daemon --writepid /var/run/openvpn/vpnserv.pid --config /etc/openvpn/vpnserv.conf --cd /etc/openvpn --script-security 2
[vpn]# ps -eaf |grep openvpn
root 1790 1 0 Jul26 ? 00:00:00 /usr/sbin/openvpn ......
Regards,
Scott