microsoft / azure-pipelines-agent

Azure Pipelines Agent 🚀
MIT License
1.72k stars 864 forks source link

[BUG]: Connecting to server ... #4464

Closed Amine-Smahi closed 11 months ago

Amine-Smahi commented 11 months ago

What happened?

No progress, just Connecting to server ...

Versions

vsts-agent-linux-x64-3.227.1.tar.gz

Environment type (Please select at least one enviroment where you face this issue)

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

No response

Operation system

Ubuntu 23.04

Version controll system

git

Relevant log output

[2023-10-09 18:53:01Z INFO Terminal] WRITE LINE: 
[2023-10-09 18:53:01Z INFO CommandSettings] Flag 'acceptteeeula': 'False'
[2023-10-09 18:53:01Z INFO CommandSettings] Flag 'unattended': 'False'
[2023-10-09 18:53:01Z INFO PromptManager] ReadValue
[2023-10-09 18:53:01Z INFO Terminal] WRITE: Enter (Y/N) Accept the Team Explorer Everywhere license agreement now? (press enter for N) > 
[2023-10-09 18:53:01Z INFO Terminal] READ LINE
[2023-10-09 18:53:06Z INFO Terminal] Read value: 'y'
[2023-10-09 18:53:06Z INFO CommandSettings] Flag 'deploymentgroup': 'False'
[2023-10-09 18:53:06Z INFO CommandSettings] Flag 'deploymentpool': 'False'
[2023-10-09 18:53:06Z INFO CommandSettings] Flag 'environment': 'False'
[2023-10-09 18:53:06Z INFO ExtensionManager] Getting extensions for interface: 'Microsoft.VisualStudio.Services.Agent.Listener.Configuration.IConfigurationProvider'
[2023-10-09 18:53:06Z INFO ExtensionManager] Creating instance: Microsoft.VisualStudio.Services.Agent.Listener.Configuration.BuildReleasesAgentConfigProvider, Agent.Listener
[2023-10-09 18:53:06Z INFO ExtensionManager] Creating instance: Microsoft.VisualStudio.Services.Agent.Listener.Configuration.DeploymentGroupAgentConfigProvider, Agent.Listener
[2023-10-09 18:53:06Z INFO ExtensionManager] Creating instance: Microsoft.VisualStudio.Services.Agent.Listener.Configuration.SharedDeploymentAgentConfigProvider, Agent.Listener
[2023-10-09 18:53:06Z INFO ExtensionManager] Creating instance: Microsoft.VisualStudio.Services.Agent.Listener.Configuration.EnvironmentVMResourceConfigProvider, Agent.Listener
[2023-10-09 18:53:06Z INFO Terminal] WRITE LINE: 
[2023-10-09 18:53:06Z INFO Terminal] WRITE LINE: >> Connect:
[2023-10-09 18:53:06Z INFO Terminal] WRITE LINE: 
[2023-10-09 18:53:06Z INFO CommandSettings] Arg 'url': ''
[2023-10-09 18:53:06Z INFO CommandSettings] Flag 'unattended': 'False'
[2023-10-09 18:53:06Z INFO PromptManager] ReadValue
[2023-10-09 18:53:06Z INFO Terminal] WRITE: Enter server URL > 
[2023-10-09 18:53:06Z INFO Terminal] READ LINE
[2023-10-09 18:53:25Z INFO Terminal] Read value: 'https://dev.azure.com/oranapi'
[2023-10-09 18:53:25Z INFO ConfigurationManager] GetCredentialProvider
[2023-10-09 18:53:25Z INFO CommandSettings] Arg 'auth': ''
[2023-10-09 18:53:25Z INFO CommandSettings] Flag 'unattended': 'False'
[2023-10-09 18:53:25Z INFO PromptManager] ReadValue
[2023-10-09 18:53:25Z INFO Terminal] WRITE: Enter authentication type (press enter for PAT) > 
[2023-10-09 18:53:25Z INFO Terminal] READ LINE
[2023-10-09 18:53:26Z INFO Terminal] Read value: ''
[2023-10-09 18:53:26Z INFO PromptManager] Falling back to the default: 'PAT'
[2023-10-09 18:53:26Z INFO ConfigurationManager] Creating credential for auth: PAT
[2023-10-09 18:53:26Z INFO CredentialManager] GetCredentialProvider
[2023-10-09 18:53:26Z INFO CredentialManager] Creating type PAT
[2023-10-09 18:53:26Z INFO CredentialManager] Creating credential type: PAT
[2023-10-09 18:53:26Z INFO PersonalAccessToken] EnsureCredential
[2023-10-09 18:53:26Z INFO CommandSettings] Arg 'token': ''
[2023-10-09 18:53:26Z INFO CommandSettings] Flag 'unattended': 'False'
[2023-10-09 18:53:26Z INFO PromptManager] ReadValue
[2023-10-09 18:53:26Z INFO Terminal] WRITE: Enter personal access token > 
[2023-10-09 18:53:26Z INFO Terminal] READ SECRET
[2023-10-09 18:53:32Z INFO HostContext] Setting up value for origin: Terminal.ReadSecret
[2023-10-09 18:53:32Z INFO Terminal] Read value: '***'
[2023-10-09 18:53:32Z INFO ConfigurationManager] cred retrieved
[2023-10-09 18:53:32Z INFO CommandSettings] Flag 'sslskipcertvalidation': 'False'
[2023-10-09 18:53:32Z INFO PersonalAccessToken] GetVssCredentials
[2023-10-09 18:53:32Z INFO PersonalAccessToken] token retrieved: 52 chars
[2023-10-09 18:53:32Z INFO PersonalAccessToken] cred created
[2023-10-09 18:53:32Z INFO VisualStudioServices] Starting operation Location.GetConnectionData
[2023-10-09 18:55:12Z WARN VisualStudioServices] GET request to https://dev.azure.com/oranapi/_apis/connectionData timed out after 100 seconds.
[2023-10-09 18:55:12Z INFO VisualStudioServices] Finished operation Location.GetConnectionData
[2023-10-09 18:55:12Z INFO VisualStudioServices] Starting operation Location.GetConnectionData
[2023-10-09 18:55:43Z INFO VisualStudioServices] Finished operation Location.GetConnectionData
[2023-10-09 18:55:43Z INFO VisualStudioServices] Starting operation Location.GetConnectionData
[2023-10-09 18:55:43Z INFO VisualStudioServices] Finished operation Location.GetConnectionData
[2023-10-09 18:55:43Z INFO PersonalAccessToken] GetVssCredentials
[2023-10-09 18:55:43Z INFO PersonalAccessToken] token retrieved: 52 chars
[2023-10-09 18:55:43Z INFO PersonalAccessToken] cred created
[2023-10-09 18:55:43Z INFO Terminal] WRITE LINE: Connecting to server ...
[2023-10-09 18:55:43Z INFO AgentServer] Establish connection with 100 seconds timeout.
[2023-10-09 18:55:44Z INFO VisualStudioServices] Starting operation Location.GetConnectionData
[2023-10-09 18:57:24Z WARN VisualStudioServices] GET request to https://dev.azure.com/oranapi/_apis/connectionData timed out after 100 seconds.
[2023-10-09 18:57:24Z INFO VisualStudioServices] Finished operation Location.GetConnectionData
[2023-10-09 18:57:24Z INFO VisualStudioServices] Starting operation Location.GetConnectionData
[2023-10-09 18:57:54Z INFO VisualStudioServices] Finished operation Location.GetConnectionData
[2023-10-09 18:57:54Z INFO AgentServer] Establish connection with 60 seconds timeout.
[2023-10-09 18:57:54Z INFO VisualStudioServices] Starting operation Location.GetConnectionData
[2023-10-09 18:57:54Z INFO AgentServer] Establish connection with 60 seconds timeout.
[2023-10-09 18:57:54Z INFO VisualStudioServices] Starting operation Location.GetConnectionData
[2023-10-09 18:58:54Z WARN VisualStudioServices] GET request to https://dev.azure.com/oranapi/_apis/connectionData timed out after 60 seconds.
[2023-10-09 18:58:54Z INFO VisualStudioServices] Finished operation Location.GetConnectionData
[2023-10-09 18:58:54Z INFO VisualStudioServices] Starting operation Location.GetConnectionData
[2023-10-09 18:58:54Z WARN VisualStudioServices] GET request to https://dev.azure.com/oranapi/_apis/connectionData timed out after 60 seconds.
[2023-10-09 18:58:54Z INFO VisualStudioServices] Finished operation Location.GetConnectionData
[2023-10-09 18:58:54Z INFO VisualStudioServices] Starting operation Location.GetConnectionData
[2023-10-09 18:59:54Z WARN VisualStudioServices] GET request to https://dev.azure.com/oranapi/_apis/connectionData timed out after 60 seconds.
[2023-10-09 18:59:54Z INFO VisualStudioServices] Finished operation Location.GetConnectionData
[2023-10-09 18:59:54Z INFO AgentServer] Catch exception during connect. 4 attempt left.
[2023-10-09 18:59:54Z WARN VisualStudioServices] GET request to https://dev.azure.com/oranapi/_apis/connectionData timed out after 60 seconds.
[2023-10-09 18:59:54Z INFO VisualStudioServices] Finished operation Location.GetConnectionData
[2023-10-09 18:59:54Z INFO AgentServer] Catch exception during connect. 4 attempt left.
[2023-10-09 18:59:54Z ERR  AgentServer] System.TimeoutException: The HTTP request timed out after 00:01:00.
 ---> System.Threading.Tasks.TaskCanceledException: A task was canceled.
   at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.AuthenticationHelper.SendWithAuthAsync(HttpRequestMessage request, Uri authUri, Boolean async, ICredentials credentials, Boolean preAuthenticate, Boolean isProxyAuth, Boolean doRequestAuth, HttpConnectionPool pool, CancellationToken cancellationToken)
   at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Services.Common.VssHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at Microsoft.VisualStudio.Services.Common.VssHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Services.Common.VssHttpRetryMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.SendAsync(HttpRequestMessage message, HttpCompletionOption completionOption, Object userState, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.SendAsync[T](HttpRequestMessage message, Object userState, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Services.Location.Client.LocationHttpClient.GetConnectionDataAsync(ConnectOptions connectOptions, Int64 lastChangeId, CancellationToken cancellationToken, Object userState)
   at Microsoft.VisualStudio.Services.WebApi.Location.VssServerDataProvider.GetConnectionDataAsync(ConnectOptions connectOptions, Int32 lastChangeId, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Services.WebApi.Location.VssServerDataProvider.ConnectAsync(ConnectOptions connectOptions, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Services.Agent.AgentServer.EstablishVssConnection(Uri serverUrl, VssCredentials credentials, TimeSpan timeout) in /home/vsts/work/1/s/src/Microsoft.VisualStudio.Services.Agent/AgentServer.cs:line 216
[2023-10-09 18:59:54Z ERR  AgentServer] System.TimeoutException: The HTTP request timed out after 00:01:00.
 ---> System.Threading.Tasks.TaskCanceledException: A task was canceled.
   at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.AuthenticationHelper.SendWithAuthAsync(HttpRequestMessage request, Uri authUri, Boolean async, ICredentials credentials, Boolean preAuthenticate, Boolean isProxyAuth, Boolean doRequestAuth, HttpConnectionPool pool, CancellationToken cancellationToken)
   at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Services.Common.VssHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at Microsoft.VisualStudio.Services.Common.VssHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Services.Common.VssHttpRetryMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.SendAsync(HttpRequestMessage message, HttpCompletionOption completionOption, Object userState, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.SendAsync[T](HttpRequestMessage message, Object userState, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Services.Location.Client.LocationHttpClient.GetConnectionDataAsync(ConnectOptions connectOptions, Int64 lastChangeId, CancellationToken cancellationToken, Object userState)
   at Microsoft.VisualStudio.Services.WebApi.Location.VssServerDataProvider.GetConnectionDataAsync(ConnectOptions connectOptions, Int32 lastChangeId, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Services.WebApi.Location.VssServerDataProvider.ConnectAsync(ConnectOptions connectOptions, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Services.Agent.AgentServer.EstablishVssConnection(Uri serverUrl, VssCredentials credentials, TimeSpan timeout) in /home/vsts/work/1/s/src/Microsoft.VisualStudio.Services.Agent/AgentServer.cs:line 216
[2023-10-09 18:59:54Z INFO VisualStudioServices] Starting operation Location.GetConnectionData
[2023-10-09 18:59:54Z INFO VisualStudioServices] Starting operation Location.GetConnectionData
Amine-Smahi commented 11 months ago

after ruuning ./run.sh --diagnostics


*** PingTest ***
Attempt to Ping: www.bing.com with timeout 10000
Address: 0.0.0.0
Status: TimedOut
Round trip time: 0
Error reported in diagnostic logs. Please examine the log for more details.
    - /home/neo-admin/Downloads/vsts-agent-linux-x64-3.227.0/_diag/Agent_20231009-190635-utc.log
Unsuccessful status response from www.bing.com.  Verify internet connection is working
*** PingTest Failed ***

checking the log file :

[2023-10-09 19:06:46Z INFO Terminal] WRITE LINE:   Drive type: Unknown
[2023-10-09 19:06:46Z INFO Terminal] WRITE LINE:   Volume label: /run/user/1000/doc
[2023-10-09 19:06:46Z ERR  Terminal] WRITE ERROR (exception):
[2023-10-09 19:06:46Z ERR  Terminal] System.UnauthorizedAccessException: Access to the path is denied.
 ---> System.IO.IOException: Operation not permitted
   --- End of inner exception stack trace ---
   at System.IO.DriveInfo.CheckStatfsResultAndThrowIfNecessary(Int32 result)
   at System.IO.DriveInfo.get_DriveFormat()
   at Microsoft.VisualStudio.Services.Agent.Listener.Diagnostics.DiskInfo.Execute(ITerminal terminal) in /home/vsts/work/1/s/src/Agent.Listener/Diagnostics/DiskInfo.cs:line 18
[2023-10-09 19:06:46Z INFO Terminal] WRITE LINE: *** DiskInfo Completed ***
kirill-ivlev commented 11 months ago

Hi @Amine-Smahi, Based on the provided logs, most likely you have network issues on your machine, I recommend to double check it on your side. Do you use any proxy software?

Amine-Smahi commented 11 months ago

Hi @kirill-ivlev, i have no network issues, everything else work fine, i do not use any proxy, it's really frustrating

kirill-ivlev commented 11 months ago

@Amine-Smahi could you execute for testing propose following command: wget https://dev.azure.com/oranapi/_apis/connectionData or replace it with CURL if wget is not installed.

Amine-Smahi commented 11 months ago

Hi @kirill-ivlev, sorry for my late reply, Even though i had no problem opening websites and watch videos, any command from terminal was having connection issues, by disabling WiFi and re enabling it in Ubuntu, it solved the problem (hopefully for good),

Thank you for the support