Score:0

AWS OpenVpn "Connection failed. Try again" - Exception (0x80004005)

in flag

I have been unable to connect through the AWS OpenVPN client for quite some time. When I click connect, the message "Connection failed. Please try again." I found a similar case on other forums and tried different solutions:

  1. I reinstalled the client. I permanently removed the AWS Vpn client with roaming directories and registries using RevoUninstaller (multiple times).
  1. I switched to the latest version of AWS VPN Client - 3.0.0.
  1. I uninstalled all other vpn clients associated with various projects
  1. I also requested a new password for the vpn user, which expired a few days ago.
  2. I disabled the firewall and created exclusions in windows defender for some files
  3. I also tried the Tap adapter disable/enable solution which was already mentioned in the article https://jainsaket-1994.medium.com/aws-client-vpn-error-connection-failed-try-again-dd62e0b97db5
  1. Reset network configuration permanently
  1. I also checked if any Tap adapter has "Get IP address automatically" and "Get dns server address automatically" checked in IPv4 settings.

The problem is similar to the one in the article AWS VPN Client connection to new VPC Endpoint is failing. The solutions given did not help. The logs are slightly different.

C:\Users\MyUser\AppData\Roaming\AWSVPNClient\logs

2022-05-05 12:52:04.411 +02:00 [DBG] CloudWatch response received
2022-05-05 12:52:04.411 +02:00 [DBG] CloudWatch response status code: OK
2022-05-05 12:52:04.411 +02:00 [DBG] successfully put metrics to cloudwatch
2022-05-05 12:52:04.411 +02:00 [DBG] Deleting successfully sent batch of metric events
2022-05-05 12:52:04.418 +02:00 [DBG] Checking if table MetricsTable is empty
2022-05-05 12:52:04.419 +02:00 [DBG] is empty: True
2022-05-05 12:52:04.419 +02:00 [DBG] Finished sending batches of metrics to cloudwatch.
2022-05-05 12:52:04.989 +02:00 [DBG] Caught exception when getting connection status. Exception information: System.TimeoutException: The message did not respond within the expected timeframe or was cancelled
   at ACVC.Core.OpenVpn.OvpnConnectionManager.<SendMessage>d__111.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at ACVC.Core.OpenVpn.OvpnConnectionManager.<GetConnectionStatus>d__116.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at ACVC.Core.Metrics.MetricsClient.<RecordBytesMetricsAndAnalytics>d__21.MoveNext()
2022-05-05 12:52:05.002 +02:00 [DBG] Inserted event UI_APP_VPN_CONNECT_GENERAL_ERROR 0 to MetricsTable
2022-05-05 12:52:05.002 +02:00 [INF] Terminating connection
2022-05-05 12:52:05.002 +02:00 [WRN] Acs did not stop correctly!
2022-05-05 12:52:05.002 +02:00 [DBG]  Ending connection details reporting.
2022-05-05 12:52:05.002 +02:00 [WRN] We are calling GracefulKill in a method that is not supposed to change Connection state.
2022-05-05 12:52:05.002 +02:00 [DBG] GracefulKill

C:\Program Files\Amazon\AWS VPN Client\WinServiceLogs\MyUser

2022-04-30 14:20:14.087 +02:00 [INF] Logger initialized
2022-04-30 14:20:14.117 +02:00 [DBG] [TI=7] Domain username: AzureAD\MyUser
2022-04-30 14:20:14.117 +02:00 [DBG] [TI=7] Start method called: C:\Users\MyUser\AppData\Roaming\AWSVPNClient\OpenVpnConfigs\current_connection.txt C:\Users\MyUser\AppData\Roaming\AWSVPNClient\acvc-8096.txt
2022-04-30 14:20:14.180 +02:00 [ERR] [TI=7] Unhandled exception
System.ComponentModel.Win32Exception (0x80004005): Operacja nie zakończyła się pomyślnie, ponieważ plik zawiera wirusa lub potencjalnie niechciane oprogramowanie
   w System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
   w ACVC.Core.Utils.ProcessUtils.StartAndReadProcessOutput(Process process, Boolean logStdout, Boolean logStderr, Int32 timeoutMillisec)
   w ACVC.WPF.Service.Wcf.OvpnProcessRunner.Start(String validationFilePath, String managementPortPasswordFile)
2022-04-30 14:20:17.871 +02:00 [DBG] C:\Windows\System32\netsh.exe stdout: URL reservation delete failed, Error: 2
Nie moľna odnale«† okrelonego pliku.
2022-04-30 14:20:17.872 +02:00 [DBG] C:\Windows\System32\netsh.exe stderr: 
2022-04-30 14:20:17.872 +02:00 [DBG] C:\Windows\System32\netsh.exe exit code: 1
2022-04-30 14:20:17.872 +02:00 [DBG] [TI=6] Removed whitelist on http://127.0.0.1:35001/ for SAML ACS
2022-04-30 14:20:17.872 +02:00 [DBG] [TI=6] Wait for OpenVPN processes to finish graceful shutdown
2022-04-30 14:20:17.877 +02:00 [DBG] [TI=6] All OpenVPN processes exited properly
2022-04-30 14:20:17.877 +02:00 [DBG] [TI=6] Finished waiting OpenVPN graceful shutdown. Proceed with killing any orphaned OpenVPN processes
2022-04-30 14:20:17.990 +02:00 [DBG] [TI=6] Orphaned process are alive: False

For this exception I also did sfc /scannow command by cmd but with no effect.

I think the problem is related to some change on my computer. I can't figure out which file is associated with this exception. I am running out of knowledge on this subject. Has anyone encountered a similar problem?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.