What causes "route addition failed" errors on Windows 10 only & what is the fix for Windows 10?

Need help configuring your VPN? Just post here and you'll get that help.

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
woodrock
OpenVPN User
Posts: 37
Joined: Sun Jun 04, 2017 1:59 am

What causes "route addition failed" errors on Windows 10 only & what is the fix for Windows 10?

Post by woodrock » Sun Jun 04, 2017 10:44 pm

What causes this error on Windows 10 (and not on Windows XP)?
What is this error trying to tell me?
What is the fix?

It's important to note that I have been using freely available public VPN server openvpn configuration files off the net on Windows XP with no problems.

It's only when moving to Windows 10 this week, using the latest OpenVPN builds, that these problems shown below arise.

It's extremely important to note that the Windows 10 setup for my use model is fully and completely described over here:
- Tutorial to set up Windows 10 OpenVPN client to work on HUNDREDS of sometimes unreliable freely available openvpn config files
Image
Summarized, the use model in action is trivially simple:
1. I download openvpn files off the net from vpngate and I doubleclick on them.
2. That's it. That's the entire use model. It's that simple.
3. When I want to disconnect from VPN, I hit the [x] windows close box on the openvpn daemon running log file.

The problem I'm asking about is that the OpenVPN Daemon works just fine on these config files in Windows XP, but when the SAME config files are run the same way on Windows 10, I get the errors below (see Windows-specific UAC permission setup in the aforementioned tutorial)

Q: What are these errors telling me, and what can I do on Windows 10 to eliminate these errors?

Code: Select all

ROUTE: route addition failed using CreateIpForwardEntry: The object already exists.   [status=5010 if_index=8]
Route addition via IPAPI failed [adaptive]
Route addition fallback to route.exe
env_block: add PATH=C:\WINDOWS\System32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
C:\WINDOWS\system32\route.exe ADD 128.0.0.0 MASK 128.0.0.0 10.211.1.6
ROUTE: route addition failed using CreateIpForwardEntry: The object already exists.   [status=5010 if_index=8]
Route addition via IPAPI failed [adaptive]
Route addition fallback to route.exe
Image

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

Re: What causes "route addition failed" errors on Windows 10 only & what is the fix for Windows 10?

Post by TinCanTech » Mon Jun 05, 2017 1:12 am

Because you start too many vpns.

woodrock
OpenVPN User
Posts: 37
Joined: Sun Jun 04, 2017 1:59 am

Re: What causes "route addition failed" errors on Windows 10 only & what is the fix for Windows 10?

Post by woodrock » Mon Jun 05, 2017 4:01 am

TinCanTech wrote:Because you start too many vpns.
Hmmmmm... thank you for that advice pointing me in the direction of test to figure out where the OpenVPN bug lies.
Bearing in mind this OpenVPN bug doesn't occur in Windows XP, I just tried doubleclicking on a SINGLE config file.'

As you suggested might happen, I don't see an error.
Image

Then I closed down that VPN session by hitting the Windows [X] and waited a couple of minutes.
Then I doubleclicked on the very same config file, and now I do see the error 3 times.
Image

I only have two questions:
1. Is this just a warning or an error (in that I'm always worried about my VPN privacy)?
2. Why does this bug only occur on Windows 10 and not on Windows XP?

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

Re: What causes "route addition failed" errors on Windows 10 only & what is the fix for Windows 10?

Post by TinCanTech » Mon Jun 05, 2017 12:01 pm

woodrock wrote:Why does this bug only occur on Windows 10 and not on Windows XP?
The same error (not a bug) would occur on any OS because:
woodrock wrote:Then I closed down that VPN session by hitting the Windows [X] and waited a couple of minutes
You did not close openvpn gracefully, instead you killed it mid session. To close openvpn from a command window press F4. (As it says in the Window Title bar)

woodrock
OpenVPN User
Posts: 37
Joined: Sun Jun 04, 2017 1:59 am

Re: What causes "route addition failed" errors on Windows 10 only & what is the fix for Windows 10?

Post by woodrock » Tue Jun 06, 2017 3:27 am

TinCanTech wrote:The same error (not a bug) would occur on any OS
Thank you for pointing this out.
As noted in this tutorial, I haven't noticed this "route addition failed" error on WinXP SP3.

I just went back to the WinXP machine and confirmed by the following sequence, which I will write up separately because this question in this thread is about Windows 10 "route addition failed" errors, which do not occur on Windows XP using the exact same files & procedures.

Here's the WinXP test sequence, which never once eliciited these new Win10-only "route addition failed" errors:
1a) I doubleclicked on VPN config file 1 on WinXP (no route addition failed errors).
1b) I killed VPN 1 using the [X] box. (I will post the log file separately, in a different thread, as proof.)

2a) Moments later, doubleclicked on VPN config file 2 on WinXP (there were still no route addition failed errors).
2b) I killed VPN 2 using the [X] box. (I will post the log file separately, in a different thread, as proof.)

3a) Moments later I repeated step #1a above
3b) I killed VPN 1 using the [F4] key. (I will post the log file separately, in a different thread, as proof.)

4a) Moment later I repeated step #3 above.
4b) I killed VPN 2 using the [F4] key. (I will post the log file separately, in a different thread, as proof.)

5a) Moments later I repeated step #1a above
5b) I killed VPN 1 using the [F4] key. (I will post the log file separately, in a different thread, as proof.)

The reason I'm not posting the WinXP proof of the above here is that it's a lot of work to redact private information, and, even more importantly, this thread is only about Windows 10 so I don't want to detract from the main issue (we can take up why WinXP doesn't fail with the "route addition failed" errors separately).
TinCanTech wrote:You did not close openvpn gracefully, instead you killed it mid session. To close openvpn from a command window press F4. (As it says in the Window Title bar)
Thank you for pointing out the F4 (in the header even!), which, even though my use model has worked for years, I hadn't known about.
I will use F4 from now on in Windows 10 (and I will adjust the Windows 10 batch-vpn tutorial accordingly).

I see the F4 is documented (but only very briefly) over here.
Image
Image

I will stop using the [X] box to close the OpenVPN Daemon processes and I will start using the keyboard [F4] key moving forward.
Thank you for pointing out my faux pas.

woodrock
OpenVPN User
Posts: 37
Joined: Sun Jun 04, 2017 1:59 am

Re: What causes "route addition failed" errors on Windows 10 only & what is the fix for Windows 10?

Post by woodrock » Wed Jun 07, 2017 4:54 pm

woodrock wrote: I will stop using the [X] box to close the OpenVPN Daemon processes and I will start using the keyboard [F4] key moving forward.
Thank you for pointing out my faux pas.
It's been hard to break the habit of using the [X] to close the OpenVPN Daemon log window (what do you call that window anyway?).

But I'm getting used to hitting the [F4] key, which, unfortunately still requires the mouse because you have to focus your cursor on the OpenVPN Daemon log windows before it will close.

The good news is that, in another thread, TinCanTech kindly confirmed that the [X] works just fine in Windows XP; so the problem I saw only crops up in Windows 10 (or perhaps earlier as I skipped the intermediate Windows releases).
TinCanTech wrote:Also, OpenVPN 2.3.x appears to shutdown gracefully on [X] as well as F4 (At least my testing shows it does. If you watch your screen as you press [X] there are a couple of following commands which are issued)
The commands that TinCanTech kindly spoke about above that follow the [F4] occur in a tenth of a second, so, on Windows 10, I had to set my screen capture program (Irfanview freeware) to automatically snap screenshots every tenth of a second.

Here are those commands (at verbosity=3):

Code: Select all

Tue Jun 06 21:10:11 2017 Initialization Sequence Completed
[F4]
Tue Jun 06 21:10:32 2017 C:\WINDOWS\system32\route.exe DELETE 116.91.242.12 MASK 255.255.255.255 192.168.1.1
Tue Jun 06 21:10:32 2017 Route deletion via IPAPI succeeded [adaptive]
Tue Jun 06 21:10:32 2017 C:\WINDOWS\system32\route.exe DELETE 0.0.0.0 MASK 128.0.0.0 10.211.1.42
Tue Jun 06 21:10:32 2017 Route deletion via IPAPI succeeded [adaptive]
Tue Jun 06 21:10:32 2017 C:\WINDOWS\system32\route.exe DELETE 128.0.0.0 MASK 128.0.0.0 10.211.1.42
Tue Jun 06 21:10:32 2017 Route deletion via IPAPI succeeded [adaptive]
Tue Jun 06 21:10:32 2017 Closing TUN/TAP interface
Tue Jun 06 21:10:32 2017 TAP: DHCP address released
Tue Jun 06 21:10:32 2017 SIGTERM[hard,] received, process exiting
Image
Unfortunately, when I tried the same tenth-of-a-second-capture with the [X] on Windows 10, the window just died in that tenth of a second with no commands issued that I could see. Irfanview wouldn't go to a hundredth of a second screen capture, so I dropped it at that point (unless folks have questions).

In SUMMARY:
Thank you for your help in IMPROVING this very basic "privacy" KISS (keep it super simple) use model for OpenVPN where the users' IP address is what we're trying to protect from business and government meta-data aggregators.

This KISS PRIVACY (not security, per se!) use model can be summarized as below (PLEASE IMPROVE!)

1. Create directories for each task you wish to perform
(For example, gmail could be one task, Usenet could be another task, web browsing another task, online purchases another task, etc.)

2. Populate each directory with at least one unique free public VPN configuration file (which gives that task its own IP address)
(In practice, you need multiple free public VPN config files, simply because they're flaky, by design, at least from vpngate they are.)

3. Select one or more of those free public VPN config files, right click to OPEN, and one will work (almost always).
(You perform your task, and when you're done, you simply close the one working OpenVPN Daemon log window using the [F4] key.)

Of course, there are plenty of other things needed to be done for privacy (e.g., flash, java, HOSTS, MAC spoofing, panopticlick.eff.org, UserAgents, phone-home settings, etc.) but this thread is only about the simplest of use models for OpenVPN on Windows which makes use of hundreds of freely available sometimes flaky public VPN server config files (where you can't hide from the VPN server collecting your meta data, so that's not the goal).

PLEASE: Improvements to this KISS use model are always welcome, where your suggestions will help everyone who reads this in the future.

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

Re: What causes "route addition failed" errors on Windows 10 only & what is the fix for Windows 10?

Post by TinCanTech » Wed Jun 07, 2017 5:36 pm

Thread title
  • Re: What causes "route addition failed" errors on Windows 10 only & what is the fix for Windows 10?
In your case
  • Route addition failed ... The object already exists

    This means you are trying to add the same route more than once

woodrock
OpenVPN User
Posts: 37
Joined: Sun Jun 04, 2017 1:59 am

Re: What causes "route addition failed" errors on Windows 10 only & what is the fix for Windows 10?

Post by woodrock » Wed Jun 07, 2017 6:31 pm

TinCanTech wrote:This means you are trying to add the same route more than once
Thank you for summarizing and keeping this thread on topic so that others, in the future, can benefit, as well as me benefiting now.
I agree with you.

Here's a summary of the main difference between Windows XP & Windows 10:
1. In Windows XP, hitting the [X] or [F4] causes the routes added for VPN to be deleted.
2. In Windows 10, hitting the [X] does NOT cause those VPN-related routes to be deleted.
3. Luckily, in Windows 10, hitting [F4] DOES cause those VPN-related routes to be deleted.
So, clearly, the "solution' is for me (and anyone else) to use [F4] and not [X] on Windows 10! :)


I probably should bone up on the Windows "arp" and "route" commands to dig deeper into WHY the OpenVPN Daemon on Windows 10 can't close routes that Windows XP has no problem closing.
Image

It seems, from reading that documentation, that either "route print" or "arp -a" should show that on Windows XP, the routes added by OpenVPN are deleted with both the [X] and [F4] operations, while the routes added by OpenVPN (likely) won't be deleted on Windows 10 with the [X] operation, but they will be deleted with the [F4] operation.

I don't know if this is a bug or a feature, or if it's something imposed by Windows 10 that we just have to live with.
I'm not complaining since the solution is so simple (I'll just use F4).

But, at the moment, it does seem like a bug; but maybe not because the [X] was never documented to work in the first place. :)

Post Reply