System.Reflection.TargetInvocationException

Got a problem with Viscosity or need help? Ask here!

wdatkinson

Posts: 1
Joined: Fri May 05, 2017 12:29 am

Post by wdatkinson » Fri May 05, 2017 12:35 am
My installs ran fine on two different machines a while back. Now whenever I launch and attempt a connect, I get the following in the logs:
Code: Select all
May 04 10:22:00 AM: Connection is reachable. Starting connection attempt.
May 04 10:22:00 AM: - System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ComponentModel.Win32Exception: Access is denied
May 04 10:22:00 AM:   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
May 04 10:22:00 AM:   at ViscosityService.ViscosityDaemon.startOpenVPN(String uniqueID, String openVPNVer, IE6PskmFRoG87yNFUUbKK4UrvWE config, StreamReader sr, StreamWriter sw, NamedPipeServerStream pipeServer)
May 04 10:22:00 AM:   --- End of inner exception stack trace ---
May 04 10:22:00 AM:   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
May 04 10:22:00 AM:   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
May 04 10:22:00 AM:   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
May 04 10:22:00 AM:   at pZws0zpgF8eM5VZZcPYdcZIe71w.G57U7fpPzVoQPuOxx1JQETtxDZb(Object )

The OpenVPN subsystem could not be started. Please check the following:
- Check for any error messages above this notification.
- Ensure ViscosityService is running.
- Make sure the configuration is valid

May 04 10:22:00 AM: State changed to Disconnected
On my server side, I have:
Code: Select all
May  4 10:11:48 vpn openvpn-vtun0[28979]: OpenVPN 2.1.3 x86_64-pc-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] built on Mar  9 2015
May  4 10:11:48 vpn openvpn-vtun0[28979]: MANAGEMENT: unix domain socket listening on /tmp/openvpn-mgmt-intf
May  4 10:11:48 vpn openvpn-vtun0[28979]: NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
May  4 10:11:48 vpn openvpn-vtun0[28979]: Diffie-Hellman initialized with 2048 bit key
May  4 10:11:48 vpn openvpn-vtun0[28979]: /usr/bin/openssl-vulnkey -q -b 2048 -m <modulus omitted>
May  4 10:11:48 vpn openvpn-vtun0[28979]: TLS-Auth MTU parms [ L:1543 D:140 EF:40 EB:0 ET:0 EL:0 ]
May  4 10:11:48 vpn openvpn-vtun0[28979]: Socket Buffers: R=[87380->131072] S=[16384->131072]
May  4 10:11:48 vpn openvpn-vtun0[28979]: TUN/TAP device vtun0 opened
May  4 10:11:48 vpn openvpn-vtun0[28979]: TUN/TAP TX queue length set to 100
May  4 10:11:48 vpn openvpn-vtun0[28979]: /sbin/ifconfig vtun0 10.5.150.1 netmask 255.255.255.0 mtu 1500 broadcast 10.5.150.255
May  4 10:11:48 vpn zebra[2325]: interface vtun0 index 73369 <POINTOPOINT,NOARP,MULTICAST> added.
May  4 10:11:48 vpn zebra[2325]: warning: PtP interface vtun0 with addr 10.5.150.1/32 needs a peer address
May  4 10:11:48 vpn zebra[2325]: interface vtun0 index 73369 changed <UP,POINTOPOINT,RUNNING,NOARP,MULTICAST>.
May  4 10:11:48 vpn openvpn-vtun0[28979]: Data Channel MTU parms [ L:1543 D:1450 EF:43 EB:4 ET:0 EL:0 ]
May  4 10:11:48 vpn openvpn-vtun0[28983]: Listening for incoming TCP connection on [undef]:443
May  4 10:11:48 vpn openvpn-vtun0[28983]: TCPv4_SERVER link local (bound): [undef]:443
May  4 10:11:48 vpn openvpn-vtun0[28983]: TCPv4_SERVER link remote: [undef]
May  4 10:11:48 vpn openvpn-vtun0[28983]: MULTI: multi_init called, r=256 v=256
May  4 10:11:48 vpn openvpn-vtun0[28983]: IFCONFIG POOL: base=10.5.150.2 size=252
May  4 10:11:48 vpn openvpn-vtun0[28983]: MULTI: TCP INIT maxclients=1024 maxevents=1028
May  4 10:11:48 vpn openvpn-vtun0[28983]: Initialization Sequence Completed
So from the server side, all would appear well, but obviously the client is having an issue. I've re-installed, tried running as an admin, set compatibility mode, etc.

One machine is Win7/64-bit and the other is Win10/64-bit.

Eric

User avatar
Posts: 1146
Joined: Sun Jan 03, 2010 3:27 am

Post by Eric » Fri May 05, 2017 10:16 am
Hi wdatkinson,

Are these machines locked down in any way or has the SYSTEM inbuilt user been changed in any way? The error indicates that the service does not have rights to run processes, you may need to change the user ViscoityService runs as to an Administrator instead of local System.

Regards,
Eric
Eric Thorpe
Viscosity Developer

Web: http://www.sparklabs.com
Support: http://www.sparklabs.com/support
Twitter: http://twitter.com/sparklabs
2 posts Page 1 of 1