OpenVPN 2.5.4 bug with status command

This forum is for admins who are looking to build or expand their OpenVPN setup.

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.
Post Reply
joks
OpenVpn Newbie
Posts: 12
Joined: Wed Oct 06, 2021 6:45 am

OpenVPN 2.5.4 bug with status command

Post by joks » Wed Oct 06, 2021 6:52 am

Hello, in my server config under Windows 2019 i have always this line:

status "C:\\Program Files\\OpenVPN\\log\\status.log"

after update from version 2.5.3 to yesterday version 2.5.4 when i restart openvpn service i have this error in logs:

options error: --status fails with 'C:\Program Files\OpenVPN\\log\status.log' Unknown error (errno=183)

i notice when i go into C:\Program Files\OpenVPN\ and delete "log" folder and create it again and start openvpn service it`s run fine for first time, but when i restart service after few minutes still i have Unknown error (errno=183) so the only way for now is disable in server config "status" command and now after restart openvpn service it works.

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: OpenVPN 2.5.4 bug with status command

Post by TinCanTech » Wed Oct 06, 2021 7:46 pm

You need to escape those backslashes, as shown in the manual.

joks
OpenVpn Newbie
Posts: 12
Joined: Wed Oct 06, 2021 6:45 am

Re: OpenVPN 2.5.4 bug with status command

Post by joks » Thu Oct 07, 2021 1:35 pm

already tried it and other solutions like

status "C:\Program Files\OpenVPN\log\status.log"
status C:\Program Files\OpenVPN\log\status.log
status log
status status.log
status status.log 20

the service always starts the first time, but after it is restarted service manual, it does not get up anymore and indicates an unknown error.
I only have installations for windows so I don't know if it's the same error for linux after service restart

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: OpenVPN 2.5.4 bug with status command

Post by TinCanTech » Thu Oct 07, 2021 10:53 pm

There is an example in the manual, which shows how to do it correctly.

joks
OpenVpn Newbie
Posts: 12
Joined: Wed Oct 06, 2021 6:45 am

Re: OpenVPN 2.5.4 bug with status command

Post by joks » Sat Oct 09, 2021 5:52 am

i have like in manual!!!

status openvpn-status.log
log openvpn.log
verb 4

it was works in previous releases and suddenly after the update stopped working
edit:
fixed by downgrade to 2.5.3 version maybe in future it will be fixed

probably this change ruins everything
https://github.com/OpenVPN/openvpn/comm ... 355bb10074

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: OpenVPN 2.5.4 bug with status command

Post by TinCanTech » Sat Oct 09, 2021 11:17 am

joks wrote:
Sat Oct 09, 2021 5:52 am
i have like in manual!!!
No you do not.
joks wrote:
Sat Oct 09, 2021 5:52 am
probably this change ruins everything
Unlikely.

joks
OpenVpn Newbie
Posts: 12
Joined: Wed Oct 06, 2021 6:45 am

Re: OpenVPN 2.5.4 bug with status command

Post by joks » Sat Oct 09, 2021 7:14 pm

in the official and in the example server configuration attached with windows installer is write:
https://openvpn.net/community-resources/how-to/

Status File
status openvpn-status.log
which will output a list of current client connections to the file openvpn-status.log once per minute.

so if you say that i have wrong command correct the manual and example config file

cs
OpenVpn Newbie
Posts: 4
Joined: Sun Oct 10, 2021 6:07 pm

Re: OpenVPN 2.5.4 bug with status command

Post by cs » Tue Oct 12, 2021 12:08 am

check log file attribute
If it is read only uncheck read-only attribute
On Thursday evening I have installed upgrade OpenVPN to ver 2.5.4, downloaded here: https://openvpn.net/community-downloads/, => Windows 64-bit MSI installer
Previously my ver was 2.5.3
Installation on PCs was fine. But on server side (Windows server) there is probably a bug: Openvpon service makes file openvpn-status.log, located in folder (…OpenVPN\config-auto) read-only (attribute)
This feature makes OpenVPN not working
The solution, found over a couple of hours finding, was to make this attribute readable (uncheck this option)
Upgrade was performed on two servers, and this behavior took place twice
So we suspect it is a bug

joks
OpenVpn Newbie
Posts: 12
Joined: Wed Oct 06, 2021 6:45 am

Re: OpenVPN 2.5.4 bug with status command

Post by joks » Tue Oct 12, 2021 10:33 am

thx cs now my openvpn server its working again after restart ;)

and the moderator kept telling me the wrong configuration file even though I wrote everything step by step :lol:

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: OpenVPN 2.5.4 bug with status command

Post by TinCanTech » Tue Oct 12, 2021 1:58 pm

Openvpn installer does not create or touch the file in question.

PLT
OpenVpn Newbie
Posts: 1
Joined: Fri Oct 15, 2021 7:03 am

Re: OpenVPN 2.5.4 bug with status command

Post by PLT » Fri Oct 15, 2021 7:24 am

Hi,

I would like to confirm that indeed after upgrade to 2.5.4 on server the server run only once, and it did not want to run again without any conclusive message as to why. After removing openvpn-status.log file the server run again. Then it did not want to restart. Turned out the reason is that forementioned file is created with "read-only" attribute.

Also please be advised that in my case simply removing the "read-only" attribute allows the server to start/re-start once but then upon initialization the file is re-created and again it has read-only attribute.

This is definitely an issue and it has been introduced in 2.5.4 as I have just tested 2.5.3 and it does not exhibit such behaviour and it works fine. The openvpn-status.log is created without "read-only" in 2.5.3

joks
OpenVpn Newbie
Posts: 12
Joined: Wed Oct 06, 2021 6:45 am

Re: OpenVPN 2.5.4 bug with status command

Post by joks » Fri Oct 15, 2021 12:51 pm

this change is to blame:
https://github.com/OpenVPN/openvpn/comm ... 355bb10074

i create ticket for this bug:
https://community.openvpn.net/openvpn/t ... 430#ticket

probably the error only occurs under Windows

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: OpenVPN 2.5.4 bug with status command

Post by TinCanTech » Fri Oct 15, 2021 2:02 pm

I concur.

The real problem is not the installation but when openvpn is started, then the status file is created as readonly.

cs
OpenVpn Newbie
Posts: 4
Joined: Sun Oct 10, 2021 6:07 pm

Re: OpenVPN 2.5.4 bug with status command

Post by cs » Mon Oct 18, 2021 6:53 pm

Yes, we have to change read only status of status log every time server is restarted

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: OpenVPN 2.5.4 bug with status command

Post by TinCanTech » Mon Oct 18, 2021 7:30 pm

A solution is being prepared.

joks
OpenVpn Newbie
Posts: 12
Joined: Wed Oct 06, 2021 6:45 am

Re: OpenVPN 2.5.4 bug with status command

Post by joks » Tue Oct 19, 2021 10:51 am

for now i create a .bat script that is run with windows log on (windows scheduler) and remove read-only

@echo off
attrib -r "C:\Program Files\OpenVPN\log\*.*" /s

now after windows update or other reboot openvpn will start

cs
OpenVpn Newbie
Posts: 4
Joined: Sun Oct 10, 2021 6:07 pm

Re: OpenVPN 2.5.4 bug with status command

Post by cs » Thu Oct 21, 2021 8:09 pm

joks wrote:
Tue Oct 19, 2021 10:51 am
for now i create a .bat script that is run with windows log on (windows scheduler) and remove read-only

@echo off
attrib -r "C:\Program Files\OpenVPN\log\*.*" /s

now after windows update or other reboot openvpn will start
Thanks joks, written as a bat, shortcut placed run -> shell:startup, every time server is restarted your bat attr “read only” makes off

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: OpenVPN 2.5.4 bug with status command

Post by TinCanTech » Thu Oct 21, 2021 8:19 pm

This bug has been fixed here:
https://openvpn.net/community-downloads/

cs
OpenVpn Newbie
Posts: 4
Joined: Sun Oct 10, 2021 6:07 pm

Re: OpenVPN 2.5.4 bug with status command

Post by cs » Thu Oct 21, 2021 8:32 pm

TinCanTech wrote:
Thu Oct 21, 2021 8:19 pm
This bug has been fixed here:
https://openvpn.net/community-downloads/
TinCanTech
Simply download the installer again and reinstall ?

joks
OpenVpn Newbie
Posts: 12
Joined: Wed Oct 06, 2021 6:45 am

Re: OpenVPN 2.5.4 bug with status command

Post by joks » Mon Nov 13, 2023 8:16 pm

Hello, after i update to latest OpenVPN 2.6.7 this bug which I reported 2 years ago it appears again (in previews version 2.6.6 and 2.6.5 it was fine).
Under my Windows 2019 64x bit server i have in server config file added:
status "C:\\Program Files\\OpenVPN\\log\\openvpn-status.log"
and then openvpn service start openvpn-status.log have read-only attribute :/ and openvpn doesn't work (service is running but network adapter is disconected).
when i unchecked read-only attribute on file openvpn-status.log then it works about 1 day and the attributes are set again :/
i dont know what is changed in latest version but under Windows the bug came back

Post Reply