error after installation, Event ID:0 ovpn_admin_group
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 Newbie
- Posts: 3
- Joined: Wed Apr 12, 2017 1:34 pm
error after installation, Event ID:0 ovpn_admin_group
Hi,
The Event Viewer shows the following error:
The description for Event ID 0 from source openvpnserv cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
If the event originated on another computer, the display information had to be saved with the event.
The following information was included with the event:
openvpnserv error: The system cannot find the file specified. (0x2) Error querying registry value: HKLM\SOFTWARE\OpenVPN\ovpn_admin_group
Re-installing does not solve the problem. Thanks
The Event Viewer shows the following error:
The description for Event ID 0 from source openvpnserv cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
If the event originated on another computer, the display information had to be saved with the event.
The following information was included with the event:
openvpnserv error: The system cannot find the file specified. (0x2) Error querying registry value: HKLM\SOFTWARE\OpenVPN\ovpn_admin_group
Re-installing does not solve the problem. Thanks
-
- OpenVPN Protagonist
- Posts: 11137
- Joined: Fri Jun 03, 2016 1:17 pm
-
- OpenVpn Newbie
- Posts: 3
- Joined: Wed Apr 12, 2017 1:34 pm
Re: error after installation, Event ID:0 ovpn_admin_group
You guys don't make it easy to get any kind of meaningful help and it's a little confusing which board is the proper board. I can tell you I was using the client version and to solve the problem, I rolled back to "openvpn-install-2.3.14-I601-x86_64". The event id went away. I was using "openvpn-install-2.4.1-I601.exe". I have the hassle of typing my log-in information again but I can live with that over the event error.
-
- OpenVpn Newbie
- Posts: 3
- Joined: Wed Apr 12, 2017 1:34 pm
Re: error after installation, Event ID:0 ovpn_admin_group
You guys don't make it easy to get any kind of meaningful help and it's a little confusing which board is the proper board. I can tell you I was using the client version and to solve the problem, I rolled back to "openvpn-install-2.3.14-I601-x86_64" . The event id went away and I'm using Windows 7 64-bit. I was using "openvpn-install-2.4.1-I601.exe". I have the hassle of typing my log-in information again but I can live with that over the event error. I'll try updating with the next version that comes out.
Sorry for the double post. I'm not sure how to delete the above one.
Sorry for the double post. I'm not sure how to delete the above one.
-
- OpenVPN Protagonist
- Posts: 11137
- Joined: Fri Jun 03, 2016 1:17 pm
Re: error after installation, Event ID:0 ovpn_admin_group
You don't make it easy for us to help you .....HouseOfTheRisingSun wrote:You guys don't make it easy to get any kind of meaningful help
-
- OpenVPN Expert
- Posts: 685
- Joined: Tue May 01, 2012 9:30 pm
Re: error after installation, Event ID:0 ovpn_admin_group
free software mean dont need to make it as easy as it is . up to people use it if they like . somehow if you need quick. there are on the internet you can contact to ask someone help you
-
- OpenVpn Newbie
- Posts: 2
- Joined: Thu Apr 27, 2017 8:16 am
Re: error after installation, Event ID:0 ovpn_admin_group
The beauty of open source is, well, its open source. So after also seeing this in the event log and seeing your thread here, I decided to peek into the source.
Turns out the culprit is the GetRegString() function in common.c which logs any non-success return code immediately to the event log. So this is simply noise in the event log that can be disregarded. There is nothing wrong with your setup if you're seeing this.
Looking at the location its called from, I'd say it'd make sense to introduce a parameter to the GetRegString() function which governs if non-success return codes get logged to the event log or not. Perhaps by default they should be, but having a non-fatal error culminate in an error event being logged seems at least slightly odd.
Anyway, if I were an OpenVPN contributor, I'd probably rename GetRegString() into GetRegStringEx(), then create a very shallow wrapper around that by the old name GetRegString():
This way only the single instance (and possibly other non-fatal instances of calling GetRegString() to override a default) could be replaced by a call to GetRegStringEx(), passing FALSE as the last parameter:
Alternatively it could be logged as a warning instead of an error in a similar fashion.
Btw: in case someone wants to pick this up, feel free to. I hereby put it into the public domain where applicable and under CC0 in jurisdictions that don't know public domain. Feel free to use, I don't care about attribution
TL;DR: the non-fatal error in accessing this value should be logged as a warning or not logged altogether. From reading the code it's clear that there is nothing wrong with the configuration if you get to see this "error" as of version 2.4.1.
Turns out the culprit is the GetRegString() function in common.c which logs any non-success return code immediately to the event log. So this is simply noise in the event log that can be disregarded. There is nothing wrong with your setup if you're seeing this.
Code: Select all
if (status != ERROR_SUCCESS)
{
SetLastError(status);
return MsgToEventLog(M_SYSERR, TEXT("Error querying registry value: HKLM\\%s\\%s"), REG_KEY, value);
}
Code: Select all
/* read if present, else use default */
error = GetRegString(key, TEXT("ovpn_admin_group"), s->ovpn_admin_group, sizeof(s->ovpn_admin_group));
if (error != ERROR_SUCCESS)
{
openvpn_sntprintf(s->ovpn_admin_group, _countof(s->ovpn_admin_group), OVPN_ADMIN_GROUP);
error = 0; /* this error is not fatal */
}
Code: Select all
static DWORD
GetRegStringEx(HKEY key, LPCTSTR value, LPTSTR data, DWORD size, BOOL bLogToEventLog)
{
DWORD type;
LONG status = RegQueryValueEx(key, value, NULL, &type, (LPBYTE) data, &size);
if (status == ERROR_SUCCESS && type != REG_SZ)
{
status = ERROR_DATATYPE_MISMATCH;
}
if (status != ERROR_SUCCESS && bLogToEventLog)
{
SetLastError(status);
return MsgToEventLog(M_SYSERR, TEXT("Error querying registry value: HKLM\\%s\\%s"), REG_KEY, value);
}
return ERROR_SUCCESS;
}
static DWORD
GetRegString(HKEY key, LPCTSTR value, LPTSTR data, DWORD size)
{
return GetRegStringEx(key, value, data, size, TRUE);
}
Code: Select all
/* read if present, else use default */
error = GetRegStringEx(key, TEXT("ovpn_admin_group"), s->ovpn_admin_group, sizeof(s->ovpn_admin_group), FALSE);
if (error != ERROR_SUCCESS)
{
openvpn_sntprintf(s->ovpn_admin_group, _countof(s->ovpn_admin_group), OVPN_ADMIN_GROUP);
error = 0; /* this error is not fatal */
}
Btw: in case someone wants to pick this up, feel free to. I hereby put it into the public domain where applicable and under CC0 in jurisdictions that don't know public domain. Feel free to use, I don't care about attribution
TL;DR: the non-fatal error in accessing this value should be logged as a warning or not logged altogether. From reading the code it's clear that there is nothing wrong with the configuration if you get to see this "error" as of version 2.4.1.
-
- OpenVpn Newbie
- Posts: 2
- Joined: Thu Apr 27, 2017 8:16 am
Re: error after installation, Event ID:0 ovpn_admin_group
If you wanted to shut the code up without changing the default behavior, you could simply import the following .reg file:
Please note that, if the default name ever changes your setup will suddenly use the (then) non-default group name "OpenVPN Administrators".
Code: Select all
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\OpenVPN]
"ovpn_admin_group"="OpenVPN Administrators"