Disconnecting (Exit Code 1)

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

jtk83

Posts: 3
Joined: Sat Jan 07, 2023 11:23 am

Post by jtk83 » Sat Jan 07, 2023 11:36 am
Hello,

I recently changed VPN client apps, from OpenVPN to Viscosity, because I noticed how easy it was to add multiple connections and select which ones I wanted to connect to in Viscosity. I have Windows 10 and installed Viscosity for Windows 1.10.4, bought a license as well and registered through the app. I then imported my config file bundle and tried connecting to each but was met with an Disconnecting status every time. I then uninstalled the app and deleted all folders, restarted the pc, reinstalled, registered, and imported config file again. Still the same status each time and I've checked the log, checked through the forum for the same exit code and error message and cannot find any that match. Below is the log file.
Code: Select all
Jan 06 4:24:43 PM: State changed to Creating...
Jan 06 4:24:46 PM: State changed to Disconnected
Jan 06 4:25:02 PM: State changed to Connecting
Jan 06 4:25:02 PM: Viscosity Windows 1.10.4 (1769)
Jan 06 4:25:02 PM: Running on Windows 10 2009 (19045) 64 bit
Jan 06 4:25:02 PM: Running on .NET Framework Version 4.8.04084.528372
Jan 06 4:25:02 PM: Checking reachability status of connection...
Jan 06 4:25:02 PM: Connection is reachable. Starting connection attempt.
Jan 06 4:25:02 PM: Interface Type: ViscTunTap
Jan 06 4:25:02 PM: Bringing up interface...
Jan 06 4:25:03 PM: Options error: --key and --management-external-key are mutually exclusive

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

Jan 06 4:25:05 PM: State changed to Disconnecting (OpenVPN System Failure)
Jan 06 4:25:05 PM: OpenVPN has exited. Exitcode = 1
Jan 06 4:25:05 PM: State changed to Disconnected
Your help is very much appreciated. I hope to get this resolved very soon. Thank you in advance.

Aaron

Posts: 26
Joined: Wed Nov 30, 2022 2:53 pm

Post by Aaron » Sun Jan 08, 2023 3:12 am
Hi,

Please try removing the "management-external-key" command from your connection - it's unlikely you want this to be present in the configuration and it is what is blocking OpenVPN from connecting. To do this, edit your connection in Viscosity, click on the Advanced tab, and then remove it from the advanced commands area. Then Save your changes and try connecting again.

Some further details on how to edit advanced commands can be found at the link below:
https://www.sparklabs.com/support/kb/ar ... n-commands

Regards,
Aaron
Web: https://www.sparklabs.com
Support: https://www.sparklabs.com/support
Twitter: https://twitter.com/sparklabs

jtk83

Posts: 3
Joined: Sat Jan 07, 2023 11:23 am

Post by jtk83 » Tue Jan 10, 2023 7:30 am
Aaron,

Thank you for your response. I followed your advice and checked the advanced commands that mentions any "management-external-key" but I'm not seeing it. I provided the current commands and a list of the viscosity options because I see the "Options Error:" in the logs.
Code: Select all
data-ciphers AES-128-GCM:AES-256-CBC
data-ciphers-fallback AES-256-CBC
auth SHA256
dev-node {DDFD9D6A-D585-4012-83B9-6BD52E079AF3}
resolv-retry infinite
verify-x509-name VPN_Server_cert name
cryptoapicert "SUBJ:US, Arizona, Some Info Omitted for Privacy On this line"
explicit-exit-notify
Viscosity Options that are checked:
Persist Tun
Persist Key
Require certificate was signed for server use
Compression Off
No Bind
Pull Options

Please let me know what needs to be deleted off the commands above. Thank you very much.

Aaron

Posts: 26
Joined: Wed Nov 30, 2022 2:53 pm

Post by Aaron » Thu Jan 12, 2023 5:53 pm
Hi,

Ah, your connection is using "cryptoapicert". This means that your certificate and key is set to come from the Windows Certificate Store instead.

If you've loaded your certificate/key pair into the Windows certificate store, then you should clear any key or certificate set under the Authentication tab:
https://www.sparklabs.com/support/kb/ar ... entication

If you're not intending to using an identity from the Windows certificate store, and you have a certificate and key set under the Authentication tab, then you should remove the "cryptoapicert "SUBJ:US, Arizona..."" line instead.

Regards,
Aaron
Web: https://www.sparklabs.com
Support: https://www.sparklabs.com/support
Twitter: https://twitter.com/sparklabs

jtk83

Posts: 3
Joined: Sat Jan 07, 2023 11:23 am

Post by jtk83 » Wed Mar 01, 2023 4:38 am
Aaron,

Thank you very much for your help. I removed the “cryptoapicert” line and connection was successful. Have a great day.
5 posts Page 1 of 1