Options error: --cert fails

Scripts to manage certificates or generate config files

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
xsneaky
OpenVpn Newbie
Posts: 1
Joined: Fri Mar 17, 2023 8:45 pm

Options error: --cert fails

Post by xsneaky » Fri Mar 17, 2023 8:52 pm

Hello

When i try to connect to my vpn server i keep getting same error.
After connecting i get error in my certificates

Mar 17 20:38:56 instance-1 ovpn-client[]: Options error: --cert fails with 'client.crt': No such file or directory (errno=2)
Mar 17 20:38:56 instance-1 ovpn-client[]: WARNING: cannot stat file 'client.key': No such file or directory (errno=2)
Mar 17 20:38:56 instance-1 ovpn-client[]: Options error: --key fails with 'client.key': No such file or directory (errno=2)
Mar 17 20:38:56 instance-1 ovpn-client[]: Options error: Please correct these errors.

I have embed the data in my ovpn file
<ca>
</ca>
<cert>
</cert>
<key>
</key>

anyone know if im just making a stupid mistake or a solution to fix my problem?

tharunganapathi
OpenVpn Newbie
Posts: 1
Joined: Mon May 22, 2023 1:15 pm

Re: Options error: --cert fails

Post by tharunganapathi » Fri May 26, 2023 5:28 am

I am getting the same issue. Please send the solution here if you find any. In the mean time, i will also search for the solutions.

Fadim
OpenVPN User
Posts: 40
Joined: Mon May 15, 2023 12:14 pm

Re: Options error: --cert fails

Post by Fadim » Fri May 26, 2023 12:41 pm

The first thing I would do is to make sure that the file paths in the configuration match the actual locations of these certificate files.
And then double-check the file permissions to ensure they are readable by the OpenVPN client.

Also, if you have embedded the certificate data directly in the .ovpn file, make sure you have included the correct content between the <cert> and </cert> tags.

User avatar
Pippin
Forum Team
Posts: 1201
Joined: Wed Jul 01, 2015 8:03 am
Location: irc://irc.libera.chat:6697/openvpn

Re: Options error: --cert fails

Post by Pippin » Fri May 26, 2023 12:54 pm

Hi,

File paths to certs/keys and embedded (inline) certs/keys are mutually exclusive.
.
I gloomily came to the ironic conclusion that if you take a highly intelligent person and give them the best possible, elite education, then you will most likely wind up with an academic who is completely impervious to reality.
Halton Arp

Post Reply