microsoft / azure-pipelines-agent

Azure Pipelines Agent 🚀
MIT License
1.73k stars 869 forks source link

[BUG]: Linux agent config return invalid SSL certificate while using --sslskipcertvalidation #4516

Closed zeinali0 closed 11 months ago

zeinali0 commented 1 year ago

What happened?

I'm trying to run a self-hosted azure pipeline agent (vsts-agent-linux) I'm using ./config.sh --sslskipcertvalidation to configure agent, it work on first connection it ask for pipeline name and register the agent in pipeline agents successfully but after it ask for working directory (_work) when i press enter it return SSL connection problem. I also trusted my self-signed certificate on my linux machine and when i check ssl of my Azure DevOps Server with openssl it return ok.

Versions

vsts-agent-linux-x64-3.230.0

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

Azure DevOps Server type

Azure DevOps Server (Please specify exact version in the textbox below)

Azure DevOps Server Version (if applicable)

Azure DevOps Server 2022

Operation system

Centos 9

Version controll system

No response

Relevant log output

  ___                      ______ _            _ _
 / _ \                     | ___ (_)          | (_)
/ /_\ \_____   _ _ __ ___  | |_/ /_ _ __   ___| |_ _ __   ___  ___
|  _  |_  / | | | '__/ _ \ |  __/| | '_ \ / _ \ | | '_ \ / _ \/ __|
| | | |/ /| |_| | | |  __/ | |   | | |_) |  __/ | | | | |  __/\__ \
\_| |_/___|\__,_|_|  \___| \_|   |_| .__/ \___|_|_|_| |_|\___||___/
                                   | |
        agent v3.230.0             |_|          (commit 38c1c98)

[2023-11-09 14:53:58Z INFO ConfigurationManager] ConfigureAsync
[2023-11-09 14:53:58Z INFO ConfigurationStore] IsConfigured()
[2023-11-09 14:53:58Z INFO ConfigurationStore] IsConfigured: False
[2023-11-09 14:53:58Z INFO ConfigurationManager] Is configured: False
[2023-11-09 14:53:58Z INFO CommandSettings] Flag 'sslskipcertvalidation': 'True'
[2023-11-09 14:53:58Z INFO ConfigurationManager] Reset agent cert setting base on commandline args.
[2023-11-09 14:53:58Z INFO AgentCertificateManager] Setup agent certificate setting base on configuration inputs.
[2023-11-09 14:53:58Z INFO AgentCertificateManager] Ignore SSL server certificate validation error
[2023-11-09 14:53:58Z INFO Terminal] WRITE LINE:
[2023-11-09 14:53:58Z INFO Terminal] WRITE LINE: >> End User License Agreements:
[2023-11-09 14:53:58Z INFO Terminal] WRITE LINE:
[2023-11-09 14:53:58Z INFO HostContext] Well known directory 'Bin': '/root/myagent/bin'
[2023-11-09 14:53:58Z INFO HostContext] Well known directory 'Root': '/root/myagent'
[2023-11-09 14:53:58Z INFO Terminal] WRITE LINE: Building sources from a TFVC repository requires accepting the Team Explorer Everywhere End User License Agreement. This step is not required for building sources from Git repositories.

A copy of the Team Explorer Everywhere license agreement can be found at:
  /root/myagent/license.html
[2023-11-09 14:53:58Z INFO Terminal] WRITE LINE:
[2023-11-09 14:53:58Z INFO CommandSettings] Flag 'acceptteeeula': 'False'
[2023-11-09 14:53:58Z INFO CommandSettings] Flag 'unattended': 'False'
[2023-11-09 14:53:59Z INFO PromptManager] ReadValue
[2023-11-09 14:53:59Z INFO Terminal] WRITE: Enter (Y/N) Accept the Team Explorer Everywhere license agreement now? (press enter for N) >
[2023-11-09 14:53:59Z INFO Terminal] READ LINE
[2023-11-09 14:54:00Z INFO Terminal] Read value: 'y'
[2023-11-09 14:54:00Z INFO CommandSettings] Flag 'deploymentgroup': 'False'
[2023-11-09 14:54:00Z INFO CommandSettings] Flag 'deploymentpool': 'False'
[2023-11-09 14:54:00Z INFO CommandSettings] Flag 'environment': 'False'
[2023-11-09 14:54:00Z INFO ExtensionManager] Getting extensions for interface: 'Microsoft.VisualStudio.Services.Agent.Listener.Configuration.IConfigurationProvider'
[2023-11-09 14:54:00Z INFO ExtensionManager] Creating instance: Microsoft.VisualStudio.Services.Agent.Listener.Configuration.BuildReleasesAgentConfigProvider, Agent.Listener
[2023-11-09 14:54:00Z INFO ExtensionManager] Creating instance: Microsoft.VisualStudio.Services.Agent.Listener.Configuration.DeploymentGroupAgentConfigProvider, Agent.Listener
[2023-11-09 14:54:00Z INFO ExtensionManager] Creating instance: Microsoft.VisualStudio.Services.Agent.Listener.Configuration.SharedDeploymentAgentConfigProvider, Agent.Listener
[2023-11-09 14:54:00Z INFO ExtensionManager] Creating instance: Microsoft.VisualStudio.Services.Agent.Listener.Configuration.EnvironmentVMResourceConfigProvider, Agent.Listener
[2023-11-09 14:54:00Z INFO Terminal] WRITE LINE:
[2023-11-09 14:54:00Z INFO Terminal] WRITE LINE: >> Connect:
[2023-11-09 14:54:00Z INFO Terminal] WRITE LINE:
[2023-11-09 14:54:00Z INFO CommandSettings] Arg 'url': ''
[2023-11-09 14:54:00Z INFO CommandSettings] Flag 'unattended': 'False'
[2023-11-09 14:54:00Z INFO PromptManager] ReadValue
[2023-11-09 14:54:00Z INFO Terminal] WRITE: Enter server URL >
[2023-11-09 14:54:00Z INFO Terminal] READ LINE
[2023-11-09 14:54:10Z INFO Terminal] Read value: 'https://192.168.10.102'
[2023-11-09 14:54:10Z INFO ConfigurationManager] GetCredentialProvider
[2023-11-09 14:54:10Z INFO CommandSettings] Arg 'auth': ''
[2023-11-09 14:54:10Z INFO CommandSettings] Flag 'unattended': 'False'
[2023-11-09 14:54:10Z INFO PromptManager] ReadValue
[2023-11-09 14:54:10Z INFO Terminal] WRITE: Enter authentication type (press enter for PAT) >
[2023-11-09 14:54:10Z INFO Terminal] READ LINE
[2023-11-09 14:54:11Z INFO Terminal] Read value: ''
[2023-11-09 14:54:11Z INFO PromptManager] Falling back to the default: 'PAT'
[2023-11-09 14:54:11Z INFO ConfigurationManager] Creating credential for auth: PAT
[2023-11-09 14:54:11Z INFO CredentialManager] GetCredentialProvider
[2023-11-09 14:54:11Z INFO CredentialManager] Creating type PAT
[2023-11-09 14:54:11Z INFO CredentialManager] Creating credential type: PAT
[2023-11-09 14:54:11Z INFO PersonalAccessToken] EnsureCredential
[2023-11-09 14:54:11Z INFO CommandSettings] Arg 'token': ''
[2023-11-09 14:54:11Z INFO CommandSettings] Flag 'unattended': 'False'
[2023-11-09 14:54:11Z INFO PromptManager] ReadValue
[2023-11-09 14:54:11Z INFO Terminal] WRITE: Enter personal access token >
[2023-11-09 14:54:11Z INFO Terminal] READ SECRET
[2023-11-09 14:54:16Z INFO HostContext] Setting up value for origin: Terminal.ReadSecret
[2023-11-09 14:54:16Z INFO Terminal] Read value: '***'
[2023-11-09 14:54:16Z INFO ConfigurationManager] cred retrieved
[2023-11-09 14:54:16Z INFO CommandSettings] Flag 'sslskipcertvalidation': 'True'
[2023-11-09 14:54:16Z INFO PersonalAccessToken] GetVssCredentials
[2023-11-09 14:54:16Z INFO PersonalAccessToken] token retrieved: 52 chars
[2023-11-09 14:54:16Z INFO PersonalAccessToken] cred created
[2023-11-09 14:54:19Z INFO VisualStudioServices] Starting operation Location.GetConnectionData
[2023-11-09 14:54:19Z INFO ConfigurationManager] Diagnostic data for request:
[SSL Policy Errors]
RemoteCertificateChainErrors: ChainStatus has returned a non empty array
[HttpRequest]
Requested URI: https://192.168.10.102/_apis/connectionData?connectOptions=0&lastChangeId=14&lastChangeId64=14
Request method: GET
[HttpRequestHeaders]
X-TFS-Session: fe86ddbd-b1b5-4182-96cf-52ce325a07cd
X-VSS-E2EID: 8ff655fa-685f-4f1c-95b1-b2c22b4074b6
User-Agent: VSServices/19.227.34302.0, (NetStandard; Linux 5.14.0-381.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Oct 30 23:56:21 UTC 2023), VstsAgentCore-linux-x64/3.230.0, (Linux 5.14.0-381.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Oct 30 23:56:21 UTC 2023)
[Certificate]
Effective date: 11/9/2023 6:45:11 AM
Expiration date: 11/9/2048 6:55:11 AM
Issuer: CN=192.168.10.102
Subject: CN=192.168.10.102
[ChainStatus]
Status: InvalidBasicConstraints
Status Information: key usage does not include certificate signing

[2023-11-09 14:54:19Z INFO ConfigurationManager] Ignoring certificate errors.
[2023-11-09 14:54:19Z INFO VisualStudioServices] Finished operation Location.GetConnectionData
[2023-11-09 14:54:19Z INFO VisualStudioServices] Starting operation Location.GetConnectionData
[2023-11-09 14:54:19Z INFO VisualStudioServices] Finished operation Location.GetConnectionData
[2023-11-09 14:54:19Z INFO PersonalAccessToken] GetVssCredentials
[2023-11-09 14:54:19Z INFO PersonalAccessToken] token retrieved: 52 chars
[2023-11-09 14:54:19Z INFO PersonalAccessToken] cred created
[2023-11-09 14:54:19Z INFO Terminal] WRITE LINE: Connecting to server ...
[2023-11-09 14:54:19Z INFO AgentServer] Establish connection with 100 seconds timeout.
[2023-11-09 14:54:19Z INFO VisualStudioServices] Starting operation Location.GetConnectionData
[2023-11-09 14:54:19Z INFO AgentServer] Diagnostic data for request:
[SSL Policy Errors]
RemoteCertificateChainErrors: ChainStatus has returned a non empty array
[HttpRequest]
Requested URI: https://192.168.10.102/_apis/connectionData?connectOptions=0&lastChangeId=14&lastChangeId64=14
Request method: GET
[HttpRequestHeaders]
X-TFS-Session: fe86ddbd-b1b5-4182-96cf-52ce325a07cd
X-VSS-E2EID: a88d580c-9cce-48b5-b3fb-303b1b8d5431
User-Agent: VSServices/19.227.34302.0, (NetStandard; Linux 5.14.0-381.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Oct 30 23:56:21 UTC 2023), VstsAgentCore-linux-x64/3.230.0, (Linux 5.14.0-381.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Oct 30 23:56:21 UTC 2023)
[Certificate]
Effective date: 11/9/2023 6:45:11 AM
Expiration date: 11/9/2048 6:55:11 AM
Issuer: CN=192.168.10.102
Subject: CN=192.168.10.102
[ChainStatus]
Status: InvalidBasicConstraints
Status Information: key usage does not include certificate signing

[2023-11-09 14:54:19Z INFO AgentServer] Ignoring certificate errors.
[2023-11-09 14:54:19Z INFO VisualStudioServices] Finished operation Location.GetConnectionData
[2023-11-09 14:54:19Z INFO AgentServer] Establish connection with 60 seconds timeout.
[2023-11-09 14:54:19Z INFO VisualStudioServices] Starting operation Location.GetConnectionData
[2023-11-09 14:54:19Z INFO AgentServer] Establish connection with 60 seconds timeout.
[2023-11-09 14:54:19Z INFO AgentServer] Diagnostic data for request:
[SSL Policy Errors]
RemoteCertificateChainErrors: ChainStatus has returned a non empty array
[HttpRequest]
Requested URI: https://192.168.10.102/_apis/connectionData?connectOptions=0&lastChangeId=14&lastChangeId64=14
Request method: GET
[HttpRequestHeaders]
X-TFS-Session: fe86ddbd-b1b5-4182-96cf-52ce325a07cd
X-VSS-E2EID: cafdecca-4afb-4197-b518-34ebfda8c285
User-Agent: VSServices/19.227.34302.0, (NetStandard; Linux 5.14.0-381.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Oct 30 23:56:21 UTC 2023), VstsAgentCore-linux-x64/3.230.0, (Linux 5.14.0-381.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Oct 30 23:56:21 UTC 2023)
[Certificate]
Effective date: 11/9/2023 6:45:11 AM
Expiration date: 11/9/2048 6:55:11 AM
Issuer: CN=192.168.10.102
Subject: CN=192.168.10.102
[ChainStatus]
Status: InvalidBasicConstraints
Status Information: key usage does not include certificate signing

[2023-11-09 14:54:19Z INFO AgentServer] Ignoring certificate errors.
[2023-11-09 14:54:19Z INFO VisualStudioServices] Starting operation Location.GetConnectionData
[2023-11-09 14:54:19Z INFO VisualStudioServices] Finished operation Location.GetConnectionData
[2023-11-09 14:54:19Z INFO AgentServer] Diagnostic data for request:
[SSL Policy Errors]
RemoteCertificateChainErrors: ChainStatus has returned a non empty array
[HttpRequest]
Requested URI: https://192.168.10.102/_apis/connectionData?connectOptions=0&lastChangeId=14&lastChangeId64=14
Request method: GET
[HttpRequestHeaders]
X-TFS-Session: fe86ddbd-b1b5-4182-96cf-52ce325a07cd
X-VSS-E2EID: 81845aeb-e432-4980-821e-d04c66e127b9
User-Agent: VSServices/19.227.34302.0, (NetStandard; Linux 5.14.0-381.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Oct 30 23:56:21 UTC 2023), VstsAgentCore-linux-x64/3.230.0, (Linux 5.14.0-381.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Oct 30 23:56:21 UTC 2023)
[Certificate]
Effective date: 11/9/2023 6:45:11 AM
Expiration date: 11/9/2048 6:55:11 AM
Issuer: CN=192.168.10.102
Subject: CN=192.168.10.102
[ChainStatus]
Status: InvalidBasicConstraints
Status Information: key usage does not include certificate signing

[2023-11-09 14:54:19Z INFO AgentServer] Ignoring certificate errors.
[2023-11-09 14:54:19Z INFO VisualStudioServices] Finished operation Location.GetConnectionData
[2023-11-09 14:54:19Z INFO ConfigurationManager] Test Connection complete.
[2023-11-09 14:54:19Z INFO HostContext] Well known directory 'Bin': '/root/myagent/bin'
[2023-11-09 14:54:19Z INFO HostContext] Well known directory 'Root': '/root/myagent'
[2023-11-09 14:54:19Z INFO HostContext] Well known config file 'RSACredentials': '/root/myagent/.credentials_rsaparams'
[2023-11-09 14:54:19Z INFO RSAFileKeyManager] Creating new RSA key using 2048-bit key length
[2023-11-09 14:54:20Z INFO RSAFileKeyManager] Successfully saved RSA key parameters to file /root/myagent/.credentials_rsaparams
[2023-11-09 14:54:20Z INFO RSAFileKeyManager] Which: 'chmod'
[2023-11-09 14:54:20Z INFO RSAFileKeyManager] Location: '{matches.First()}'
[2023-11-09 14:54:20Z INFO HostContext] Well known directory 'Bin': '/root/myagent/bin'
[2023-11-09 14:54:20Z INFO HostContext] Well known directory 'Root': '/root/myagent'
[2023-11-09 14:54:20Z INFO ProcessInvokerWrapper] Starting process:
[2023-11-09 14:54:20Z INFO ProcessInvokerWrapper]   File name: '/usr/bin/chmod'
[2023-11-09 14:54:20Z INFO ProcessInvokerWrapper]   Arguments: '600 /root/myagent/.credentials_rsaparams'
[2023-11-09 14:54:20Z INFO ProcessInvokerWrapper]   Working directory: '/root/myagent'
[2023-11-09 14:54:20Z INFO ProcessInvokerWrapper]   Require exit code zero: 'False'
[2023-11-09 14:54:20Z INFO ProcessInvokerWrapper]   Encoding web name:  ; code page: ''
[2023-11-09 14:54:20Z INFO ProcessInvokerWrapper]   Force kill process on cancellation: 'False'
[2023-11-09 14:54:20Z INFO ProcessInvokerWrapper]   Redirected STDIN: 'False'
[2023-11-09 14:54:20Z INFO ProcessInvokerWrapper]   Persist current code page: 'False'
[2023-11-09 14:54:20Z INFO ProcessInvokerWrapper]   Keep redirected STDIN open: 'False'
[2023-11-09 14:54:20Z INFO ProcessInvokerWrapper]   High priority process: 'False'
[2023-11-09 14:54:20Z INFO ProcessInvokerWrapper]   ContinueAfterCancelProcessTreeKillAttempt: 'False'
[2023-11-09 14:54:20Z INFO ProcessInvokerWrapper] Exited process 2245 with exit code 0
[2023-11-09 14:54:20Z INFO ProcessInvokerWrapper] Process started with process id 2245, waiting for process exit.
[2023-11-09 14:54:20Z INFO ProcessInvokerWrapper] STDOUT/STDERR stream read finished.
[2023-11-09 14:54:20Z INFO ProcessInvokerWrapper] STDOUT/STDERR stream read finished.
[2023-11-09 14:54:20Z INFO ProcessInvokerWrapper] Finished process 2245 with exit code 0, and elapsed time 00:00:00.0156526.
[2023-11-09 14:54:20Z INFO RSAFileKeyManager] Successfully set permissions for RSA key parameters file /root/myagent/.credentials_rsaparams
[2023-11-09 14:54:20Z INFO Terminal] WRITE LINE:
[2023-11-09 14:54:20Z INFO Terminal] WRITE LINE: >> Register Agent:
[2023-11-09 14:54:20Z INFO Terminal] WRITE LINE:
[2023-11-09 14:54:20Z INFO CommandSettings] Arg 'pool': ''
[2023-11-09 14:54:20Z INFO CommandSettings] Flag 'unattended': 'False'
[2023-11-09 14:54:20Z INFO PromptManager] ReadValue
[2023-11-09 14:54:20Z INFO Terminal] WRITE: Enter agent pool (press enter for default) >
[2023-11-09 14:54:20Z INFO Terminal] READ LINE
[2023-11-09 14:54:29Z INFO Terminal] Read value: 'Azure Pipelines'
[2023-11-09 14:54:29Z INFO BuildReleasesAgentConfigProvider] Found pool Azure Pipelines with id 2 and name Azure Pipelines
[2023-11-09 14:54:29Z INFO CommandSettings] Arg 'agent': ''
[2023-11-09 14:54:29Z INFO CommandSettings] Flag 'unattended': 'False'
[2023-11-09 14:54:29Z INFO PromptManager] ReadValue
[2023-11-09 14:54:29Z INFO Terminal] WRITE: Enter agent name (press enter for localhost) >
[2023-11-09 14:54:29Z INFO Terminal] READ LINE
[2023-11-09 14:54:36Z INFO Terminal] Read value: 'linux-agent-233'
[2023-11-09 14:54:36Z INFO Terminal] WRITE LINE: Scanning for tool capabilities.
[2023-11-09 14:54:37Z INFO ExtensionManager] Getting extensions for interface: 'Microsoft.VisualStudio.Services.Agent.Capabilities.ICapabilitiesProvider'
[2023-11-09 14:54:37Z INFO ExtensionManager] Creating instance: Microsoft.VisualStudio.Services.Agent.Capabilities.AgentCapabilitiesProvider, Microsoft.VisualStudio.Services.Agent
[2023-11-09 14:54:37Z INFO ExtensionManager] Creating instance: Microsoft.VisualStudio.Services.Agent.Capabilities.EnvironmentCapabilitiesProvider, Microsoft.VisualStudio.Services.Agent
[2023-11-09 14:54:37Z INFO ExtensionManager] Creating instance: Microsoft.VisualStudio.Services.Agent.Capabilities.NixCapabilitiesProvider, Microsoft.VisualStudio.Services.Agent
[2023-11-09 14:54:37Z INFO ExtensionManager] Creating instance: Microsoft.VisualStudio.Services.Agent.Capabilities.UserCapabilitiesProvider, Microsoft.VisualStudio.Services.Agent
[2023-11-09 14:54:37Z INFO EnvironmentCapabilitiesProvider] Adding '_': './bin/Agent.Listener'
[2023-11-09 14:54:37Z INFO EnvironmentCapabilitiesProvider] Adding 'AGENT_ALLOW_RUNASROOT': '1'
[2023-11-09 14:54:37Z INFO EnvironmentCapabilitiesProvider] Adding 'AZP_AGENT_USE_LEGACY_HTTP': 'true'
[2023-11-09 14:54:37Z INFO EnvironmentCapabilitiesProvider] Adding 'BASH_FUNC_which%%': '() {  ( alias;
 eval ${which_declare} ) | /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot $@
}'
[2023-11-09 14:54:37Z INFO EnvironmentCapabilitiesProvider] Adding 'DBUS_SESSION_BUS_ADDRESS': 'unix:path=/run/user/0/bus'
[2023-11-09 14:54:37Z INFO EnvironmentCapabilitiesProvider] Adding 'DEBUGINFOD_URLS': 'https://debuginfod.centos.org/ '
[2023-11-09 14:54:37Z INFO EnvironmentCapabilitiesProvider] Adding 'HISTCONTROL': 'ignoredups'
[2023-11-09 14:54:37Z INFO EnvironmentCapabilitiesProvider] Adding 'HISTSIZE': '1000'
[2023-11-09 14:54:37Z INFO EnvironmentCapabilitiesProvider] Adding 'HOME': '/root'
[2023-11-09 14:54:37Z INFO EnvironmentCapabilitiesProvider] Adding 'HOSTNAME': 'localhost'
[2023-11-09 14:54:37Z INFO EnvironmentCapabilitiesProvider] Adding 'LANG': 'en_US.UTF-8'
[2023-11-09 14:54:37Z INFO EnvironmentCapabilitiesProvider] Adding 'LESSOPEN': '||/usr/bin/lesspipe.sh %s'
[2023-11-09 14:54:37Z INFO EnvironmentCapabilitiesProvider] Adding 'LOGNAME': 'root'
[2023-11-09 14:54:37Z INFO EnvironmentCapabilitiesProvider] Skipping: 'LS_COLORS'
[2023-11-09 14:54:37Z INFO EnvironmentCapabilitiesProvider] Adding 'MAIL': '/var/spool/mail/root'
[2023-11-09 14:54:37Z INFO EnvironmentCapabilitiesProvider] Adding 'MOTD_SHOWN': 'pam'
[2023-11-09 14:54:37Z INFO EnvironmentCapabilitiesProvider] Adding 'OLDPWD': '/root/myagent'
[2023-11-09 14:54:37Z INFO EnvironmentCapabilitiesProvider] Adding 'PATH': '/root/.local/bin:/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin'
[2023-11-09 14:54:37Z INFO EnvironmentCapabilitiesProvider] Adding 'PWD': '/root/myagent'
[2023-11-09 14:54:37Z INFO EnvironmentCapabilitiesProvider] Adding 'SELINUX_LEVEL_REQUESTED': ''
[2023-11-09 14:54:37Z INFO EnvironmentCapabilitiesProvider] Adding 'SELINUX_ROLE_REQUESTED': ''
[2023-11-09 14:54:37Z INFO EnvironmentCapabilitiesProvider] Adding 'SELINUX_USE_CURRENT_RANGE': ''
[2023-11-09 14:54:37Z INFO EnvironmentCapabilitiesProvider] Adding 'SHELL': '/bin/bash'
[2023-11-09 14:54:37Z INFO EnvironmentCapabilitiesProvider] Skipping: 'SHLVL'
[2023-11-09 14:54:37Z INFO EnvironmentCapabilitiesProvider] Adding 'SSH_CLIENT': '192.168.10.1 64109 22'
[2023-11-09 14:54:37Z INFO EnvironmentCapabilitiesProvider] Adding 'SSH_CONNECTION': '192.168.10.1 64109 192.168.10.233 22'
[2023-11-09 14:54:37Z INFO EnvironmentCapabilitiesProvider] Adding 'SSH_TTY': '/dev/pts/0'
[2023-11-09 14:54:37Z INFO EnvironmentCapabilitiesProvider] Skipping: 'TERM'
[2023-11-09 14:54:37Z INFO EnvironmentCapabilitiesProvider] Adding 'USER': 'root'
[2023-11-09 14:54:37Z INFO EnvironmentCapabilitiesProvider] Adding 'which_declare': 'declare -f'
[2023-11-09 14:54:37Z INFO EnvironmentCapabilitiesProvider] Adding 'XDG_DATA_DIRS': '/root/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share'
[2023-11-09 14:54:37Z INFO EnvironmentCapabilitiesProvider] Adding 'XDG_RUNTIME_DIR': '/run/user/0'
[2023-11-09 14:54:37Z INFO EnvironmentCapabilitiesProvider] Adding 'XDG_SESSION_CLASS': 'user'
[2023-11-09 14:54:37Z INFO EnvironmentCapabilitiesProvider] Adding 'XDG_SESSION_ID': '2'
[2023-11-09 14:54:37Z INFO EnvironmentCapabilitiesProvider] Adding 'XDG_SESSION_TYPE': 'tty'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Which: 'android'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Not found.
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Checking file: 'tools/android'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Checking file: '/root/Library/Developer/Xamarin/android-sdk-macosx/tools/android'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Which: 'ant'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Not found.
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Which: 'waagent'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Not found.
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Which: 'bundle'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Not found.
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Which: 'clang'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Not found.
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Which: 'cmake'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Not found.
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Which: 'curl'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Location: '{matches.First()}'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Adding 'curl': '/usr/bin/curl'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Which: 'docker'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Not found.
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Which: 'dotnet'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Not found.
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Which: 'git'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Location: '{matches.First()}'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Adding 'git': '/usr/bin/git'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Which: 'gulp'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Not found.
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Which: 'java'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Not found.
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Which: 'javac'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Not found.
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Which: 'make'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Not found.
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Which: 'mvn'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Not found.
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Which: 'xbuild'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Not found.
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Checking file: '/Library/Frameworks/Mono.framework/Commands/xbuild'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Which: 'msbuild'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Not found.
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Checking file: '/Library/Frameworks/Mono.framework/Commands/msbuild'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Which: 'node'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Not found.
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Which: 'nodejs'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Not found.
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Which: 'npm'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Not found.
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Which: 'python'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Location: '{matches.First()}'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Adding 'python': '/usr/bin/python'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Which: 'python3'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Location: '{matches.First()}'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Adding 'python3': '/usr/bin/python3'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Which: 'sh'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Location: '{matches.First()}'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Adding 'sh': '/usr/bin/sh'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Which: 'svn'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Not found.
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Which: 'ruby'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Not found.
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Which: 'rake'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Not found.
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Which: 'svn'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Not found.
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Which: 'mdtool'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Not found.
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Checking file: '/Applications/Xamarin Studio.app/Contents/MacOS/mdtool'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Checking file: '/Applications/Visual Studio.app/Contents/MacOS/vstool'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Which: 'generator'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Not found.
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Checking file: '/Library/Frameworks/Xamarin.Android.framework/Commands/generator'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Checking file: '/Library/Frameworks/Xamarin.Android.framework/Versions/Current/Version'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Which: 'xcode-select'
[2023-11-09 14:54:37Z INFO CapabilitiesBuilder] Not found.
[2023-11-09 14:54:37Z INFO HostContext] Well known directory 'Bin': '/root/myagent/bin'
[2023-11-09 14:54:37Z INFO HostContext] Well known directory 'Root': '/root/myagent'
[2023-11-09 14:54:37Z INFO AgentCapabilitiesProvider] Adding 'Agent.Name': 'linux-agent-233'
[2023-11-09 14:54:37Z INFO AgentCapabilitiesProvider] Adding 'Agent.OS': 'Linux'
[2023-11-09 14:54:37Z INFO AgentCapabilitiesProvider] Adding 'Agent.OSArchitecture': 'X64'
[2023-11-09 14:54:37Z INFO AgentCapabilitiesProvider] Adding 'InteractiveSession': 'True'
[2023-11-09 14:54:37Z INFO AgentCapabilitiesProvider] Adding 'Agent.Version': '3.230.0'
[2023-11-09 14:54:37Z INFO AgentCapabilitiesProvider] Adding 'Agent.ComputerName': 'localhost'
[2023-11-09 14:54:37Z INFO HostContext] Well known directory 'Bin': '/root/myagent/bin'
[2023-11-09 14:54:37Z INFO HostContext] Well known directory 'Root': '/root/myagent'
[2023-11-09 14:54:37Z INFO AgentCapabilitiesProvider] Adding 'Agent.HomeDirectory': '/root/myagent'
[2023-11-09 14:54:37Z INFO Terminal] WRITE LINE: Connecting to the server.
[2023-11-09 14:54:37Z INFO Terminal] WRITE LINE: Successfully added the agent
[2023-11-09 14:54:37Z INFO ConfigurationManager] Agent server url resolve by server: 'http://192.168.10.102/'.
[2023-11-09 14:54:37Z INFO ConfigurationManager] Replace server returned url's scheme://host:port component with user input server url's scheme://host:port: 'https://192.168.10.102/'.
[2023-11-09 14:54:37Z INFO ConfigurationManager] Set oauth endpoint url's scheme://host:port component to match agent configure url's scheme://host:port: 'https://192.168.10.102/_apis/oauth2/token'.
[2023-11-09 14:54:37Z INFO ConfigurationStore] Saving OAuth credential @ /root/myagent/.credentials
[2023-11-09 14:54:37Z INFO ConfigurationStore] Credentials Saved.
[2023-11-09 14:54:37Z INFO Terminal] WRITE LINE: Testing agent connection.
[2023-11-09 14:54:37Z INFO ConfigurationStore] HasCredentials()
[2023-11-09 14:54:37Z INFO ConfigurationStore] stored True
[2023-11-09 14:54:37Z INFO CredentialManager] GetCredentialProvider
[2023-11-09 14:54:37Z INFO CredentialManager] Creating type OAuth
[2023-11-09 14:54:37Z INFO CredentialManager] Creating credential type: OAuth
[2023-11-09 14:54:37Z INFO RSAFileKeyManager] Loading RSA key parameters from file /root/myagent/.credentials_rsaparams
[2023-11-09 14:54:37Z INFO AgentServer] Establish connection with 100 seconds timeout.
[2023-11-09 14:54:37Z INFO VisualStudioServices] Starting operation Location.GetConnectionData
[2023-11-09 14:54:37Z INFO AgentServer] Diagnostic data for request:
[SSL Policy Errors]
RemoteCertificateChainErrors: ChainStatus has returned a non empty array
[HttpRequest]
Requested URI: https://192.168.10.102/_apis/connectionData?connectOptions=0&lastChangeId=14&lastChangeId64=14
Request method: GET
[HttpRequestHeaders]
X-TFS-Session: fe86ddbd-b1b5-4182-96cf-52ce325a07cd
X-VSS-E2EID: a2587ff4-64ff-48ad-b33b-dfa7e65e6556
User-Agent: VSServices/19.227.34302.0, (NetStandard; Linux 5.14.0-381.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Oct 30 23:56:21 UTC 2023), VstsAgentCore-linux-x64/3.230.0, (Linux 5.14.0-381.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Oct 30 23:56:21 UTC 2023)
[Certificate]
Effective date: 11/9/2023 6:45:11 AM
Expiration date: 11/9/2048 6:55:11 AM
Issuer: CN=192.168.10.102
Subject: CN=192.168.10.102
[ChainStatus]
Status: InvalidBasicConstraints
Status Information: key usage does not include certificate signing

[2023-11-09 14:54:37Z INFO AgentServer] Ignoring certificate errors.
[2023-11-09 14:54:37Z WARN VisualStudioServices] Authentication failed with status code 401.
X-TFS-ProcessId: f7377eb9-7113-47b2-ba01-62655a29168b
ActivityId: bf77f10b-3190-4d42-8c1c-108b23812ad0
X-TFS-Session: fe86ddbd-b1b5-4182-96cf-52ce325a07cd
X-VSS-E2EID: a2587ff4-64ff-48ad-b33b-dfa7e65e6556
X-VSS-SenderDeploymentId: 342f9b80-2bc3-4241-9556-401f102cf15f
X-TFS-SoapException: %3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%3Csoap%3AEnvelope%20xmlns%3Asoap%3D%22http%3A%2F%2Fwww.w3.org%2F2003%2F05%2Fsoap-envelope%22%3E%3Csoap%3ABody%3E%3Csoap%3AFault%3E%3Csoap%3ACode%3E%3Csoap%3AValue%3Esoap%3AReceiver%3C%2Fsoap%3AValue%3E%3Csoap%3ASubcode%3E%3Csoap%3AValue%3EUnauthorizedRequestException%3C%2Fsoap%3AValue%3E%3C%2Fsoap%3ASubcode%3E%3C%2Fsoap%3ACode%3E%3Csoap%3AReason%3E%3Csoap%3AText%20xml%3Alang%3D%22en%22%3ETF400813%3A%20Resource%20not%20available%20for%20anonymous%20access.%20Client%20authentication%20required.%3C%2Fsoap%3AText%3E%3C%2Fsoap%3AReason%3E%3C%2Fsoap%3AFault%3E%3C%2Fsoap%3ABody%3E%3C%2Fsoap%3AEnvelope%3E
X-TFS-ServiceError: TF400813%3A%20Resource%20not%20available%20for%20anonymous%20access.%20Client%20authentication%20required.
WWW-Authenticate: Bearer, Basic realm="http://192.168.10.102/", NTLM
X-Powered-By: ASP.NET
P3P: CP="CAO DSP COR ADMa DEV CONo TELo CUR PSA PSD TAI IVDo OUR SAMi BUS DEM NAV STA UNI COM INT PHY ONL FIN PUR LOC CNT"
Lfs-Authenticate: NTLM
X-Content-Type-Options: nosniff
Date: Thu, 09 Nov 2023 14:54:36 GMT

[2023-11-09 14:54:37Z INFO RSAFileKeyManager] Loading RSA key parameters from file /root/myagent/.credentials_rsaparams
[2023-11-09 14:54:37Z INFO RSAFileKeyManager] Loading RSA key parameters from file /root/myagent/.credentials_rsaparams
[2023-11-09 14:54:38Z INFO VisualStudioServices] AAD Correlation ID for this token request: Unknown
[2023-11-09 14:54:38Z INFO VisualStudioServices] Finished operation Location.GetConnectionData
[2023-11-09 14:54:38Z INFO AgentServer] Establish connection with 60 seconds timeout.
[2023-11-09 14:54:38Z INFO VisualStudioServices] Starting operation Location.GetConnectionData
[2023-11-09 14:54:38Z INFO AgentServer] Establish connection with 60 seconds timeout.
[2023-11-09 14:54:38Z INFO AgentServer] Diagnostic data for request:
[SSL Policy Errors]
RemoteCertificateChainErrors: ChainStatus has returned a non empty array
[HttpRequest]
Requested URI: https://192.168.10.102/_apis/connectionData?connectOptions=0&lastChangeId=14&lastChangeId64=14
Request method: GET
[HttpRequestHeaders]
X-TFS-Session: fe86ddbd-b1b5-4182-96cf-52ce325a07cd
X-VSS-E2EID: 72c0c795-1a9f-4183-a9ca-f5cab1564127
User-Agent: VSServices/19.227.34302.0, (NetStandard; Linux 5.14.0-381.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Oct 30 23:56:21 UTC 2023), VstsAgentCore-linux-x64/3.230.0, (Linux 5.14.0-381.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Oct 30 23:56:21 UTC 2023)
[Certificate]
Effective date: 11/9/2023 6:45:11 AM
Expiration date: 11/9/2048 6:55:11 AM
Issuer: CN=192.168.10.102
Subject: CN=192.168.10.102
[ChainStatus]
Status: InvalidBasicConstraints
Status Information: key usage does not include certificate signing

[2023-11-09 14:54:38Z INFO AgentServer] Ignoring certificate errors.
[2023-11-09 14:54:38Z INFO VisualStudioServices] Starting operation Location.GetConnectionData
[2023-11-09 14:54:38Z INFO VisualStudioServices] Finished operation Location.GetConnectionData
[2023-11-09 14:54:38Z INFO AgentServer] Diagnostic data for request:
[SSL Policy Errors]
RemoteCertificateChainErrors: ChainStatus has returned a non empty array
[HttpRequest]
Requested URI: https://192.168.10.102/_apis/connectionData?connectOptions=0&lastChangeId=14&lastChangeId64=14
Request method: GET
[HttpRequestHeaders]
X-TFS-Session: fe86ddbd-b1b5-4182-96cf-52ce325a07cd
X-VSS-E2EID: bbeed9b9-ff84-4801-a8a5-02c80183a056
User-Agent: VSServices/19.227.34302.0, (NetStandard; Linux 5.14.0-381.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Oct 30 23:56:21 UTC 2023), VstsAgentCore-linux-x64/3.230.0, (Linux 5.14.0-381.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Oct 30 23:56:21 UTC 2023)
[Certificate]
Effective date: 11/9/2023 6:45:11 AM
Expiration date: 11/9/2048 6:55:11 AM
Issuer: CN=192.168.10.102
Subject: CN=192.168.10.102
[ChainStatus]
Status: InvalidBasicConstraints
Status Information: key usage does not include certificate signing

[2023-11-09 14:54:38Z INFO AgentServer] Ignoring certificate errors.
[2023-11-09 14:54:38Z INFO VisualStudioServices] Finished operation Location.GetConnectionData
[2023-11-09 14:54:38Z INFO CommandSettings] Arg 'work': ''
[2023-11-09 14:54:38Z INFO CommandSettings] Flag 'unattended': 'False'
[2023-11-09 14:54:38Z INFO PromptManager] ReadValue
[2023-11-09 14:54:38Z INFO Terminal] WRITE: Enter work folder (press enter for _work) >
[2023-11-09 14:54:38Z INFO Terminal] READ LINE
[2023-11-09 14:54:39Z INFO Terminal] Read value: ''
[2023-11-09 14:54:39Z INFO PromptManager] Falling back to the default: '_work'
[2023-11-09 14:54:39Z INFO CommandSettings] Flag 'disableloguploads': 'False'
[2023-11-09 14:54:39Z INFO CommandSettings] Flag 'alwaysextracttask': 'False'
[2023-11-09 14:54:39Z INFO ConfigurationStore] Saving agent settings.
[2023-11-09 14:54:40Z INFO ConfigurationStore] Settings Saved.
[2023-11-09 14:54:40Z INFO ConfigurationManager] Save agent cert setting to disk.
[2023-11-09 14:54:40Z INFO HostContext] Well known directory 'Bin': '/root/myagent/bin'
[2023-11-09 14:54:40Z INFO HostContext] Well known directory 'Root': '/root/myagent'
[2023-11-09 14:54:40Z INFO HostContext] Well known config file 'Certificates': '/root/myagent/.certificates'
[2023-11-09 14:54:40Z INFO AgentCertificateManager] Store Skip ServerCertificateValidation setting to '/root/myagent/.certificates'
[2023-11-09 14:54:40Z INFO Terminal] WRITE LINE: 2023-11-09 14:54:40Z: Settings Saved.
[2023-11-09 14:54:40Z INFO SystemDControlManager] Service name 'vsts.agent.192.Azure Pipelines.linux-agent-233.service' display name 'Azure Pipelines Agent (192.Azure Pipelines.linux-agent-233)' will be used for service configuration.
[2023-11-09 14:54:40Z INFO HostContext] Well known directory 'Bin': '/root/myagent/bin'
[2023-11-09 14:54:40Z INFO HostContext] Well known directory 'Root': '/root/myagent'
[2023-11-09 14:54:40Z INFO HostContext] Well known directory 'Bin': '/root/myagent/bin'
[2023-11-09 14:54:40Z INFO HostContext] Well known directory 'Bin': '/root/myagent/bin'
[2023-11-09 14:54:40Z INFO HostContext] Well known directory 'Root': '/root/myagent'
[2023-11-09 14:54:40Z INFO UnixUtil] Which: 'chmod'
[2023-11-09 14:54:40Z INFO UnixUtil] Location: '{matches.First()}'
[2023-11-09 14:54:40Z INFO UnixUtil] Running /usr/bin/chmod 755 "/root/myagent/svc.sh"
[2023-11-09 14:54:40Z INFO ProcessInvokerWrapper] Starting process:
[2023-11-09 14:54:40Z INFO ProcessInvokerWrapper]   File name: '/usr/bin/chmod'
[2023-11-09 14:54:40Z INFO ProcessInvokerWrapper]   Arguments: '755 "/root/myagent/svc.sh"'
[2023-11-09 14:54:40Z INFO ProcessInvokerWrapper]   Working directory: '/root/myagent'
[2023-11-09 14:54:40Z INFO ProcessInvokerWrapper]   Require exit code zero: 'True'
[2023-11-09 14:54:40Z INFO ProcessInvokerWrapper]   Encoding web name:  ; code page: ''
[2023-11-09 14:54:40Z INFO ProcessInvokerWrapper]   Force kill process on cancellation: 'False'
[2023-11-09 14:54:40Z INFO ProcessInvokerWrapper]   Redirected STDIN: 'False'
[2023-11-09 14:54:40Z INFO ProcessInvokerWrapper]   Persist current code page: 'False'
[2023-11-09 14:54:40Z INFO ProcessInvokerWrapper]   Keep redirected STDIN open: 'False'
[2023-11-09 14:54:40Z INFO ProcessInvokerWrapper]   High priority process: 'False'
[2023-11-09 14:54:40Z INFO ProcessInvokerWrapper]   ContinueAfterCancelProcessTreeKillAttempt: 'False'
[2023-11-09 14:54:40Z INFO ProcessInvokerWrapper] Updated oom_score_adj to 500 for PID: 2248.
[2023-11-09 14:54:40Z INFO ProcessInvokerWrapper] Process started with process id 2248, waiting for process exit.
[2023-11-09 14:54:40Z INFO ProcessInvokerWrapper] STDOUT/STDERR stream read finished.
[2023-11-09 14:54:40Z INFO ProcessInvokerWrapper] STDOUT/STDERR stream read finished.
[2023-11-09 14:54:40Z INFO ProcessInvokerWrapper] Exited process 2248 with exit code 0
[2023-11-09 14:54:40Z INFO ProcessInvokerWrapper] Finished process 2248 with exit code 0, and elapsed time 00:00:00.0033141.
[2023-11-09 14:54:40Z INFO ConfigurationStore] HasCredentials()
[2023-11-09 14:54:40Z INFO ConfigurationStore] stored True
[2023-11-09 14:54:40Z INFO CredentialManager] GetCredentialProvider
[2023-11-09 14:54:40Z INFO CredentialManager] Creating type OAuth
[2023-11-09 14:54:40Z INFO CredentialManager] Creating credential type: OAuth
[2023-11-09 14:54:40Z INFO RSAFileKeyManager] Loading RSA key parameters from file /root/myagent/.credentials_rsaparams
[2023-11-09 14:54:40Z INFO ConfigurationManager] LoadSettings
[2023-11-09 14:54:40Z INFO ConfigurationStore] IsConfigured()
[2023-11-09 14:54:40Z INFO ConfigurationStore] IsConfigured: True
[2023-11-09 14:54:40Z INFO ConfigurationManager] Is configured: True
[2023-11-09 14:54:40Z INFO ConfigurationStore] Read setting file: 193 chars
[2023-11-09 14:54:40Z INFO ConfigurationManager] Settings Loaded
[2023-11-09 14:54:40Z INFO TelemetryPublisher] Diagnostic data for request:
[SSL Policy Errors]
RemoteCertificateChainErrors: ChainStatus has returned a non empty array
[HttpRequest]
Requested URI: https://192.168.10.102/_apis/CustomerIntelligence/Events
Request method: POST
[HttpRequestHeaders]
X-TFS-Session: fe86ddbd-b1b5-4182-96cf-52ce325a07cd
X-VSS-E2EID: d505cd8d-8719-4d13-b660-404d05b74eac
User-Agent: VSServices/19.227.34302.0, (NetStandard; Linux 5.14.0-381.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Oct 30 23:56:21 UTC 2023), VstsAgentCore-linux-x64/3.230.0, (Linux 5.14.0-381.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Oct 30 23:56:21 UTC 2023)
[Certificate]
Effective date: 11/9/2023 6:45:11 AM
Expiration date: 11/9/2048 6:55:11 AM
Issuer: CN=192.168.10.102
Subject: CN=192.168.10.102
[ChainStatus]
Status: InvalidBasicConstraints
Status Information: key usage does not include certificate signing

[2023-11-09 14:54:40Z ERR  VisualStudioServices] POST request to https://192.168.10.102/_apis/CustomerIntelligence/Events failed. System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.
 ---> System.Security.Authentication.AuthenticationException: The remote certificate was rejected by the provided RemoteCertificateValidationCallback.
   at System.Net.Security.SslStream.SendAuthResetSignal(ProtocolToken message, ExceptionDispatchInfo exception)
   at System.Net.Security.SslStream.CompleteHandshake(SslAuthenticationOptions sslAuthenticationOptions)
   at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm)
   at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, Boolean async, Stream stream, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, Boolean async, Stream stream, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(HttpRequestMessage request)
   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)
   at Microsoft.VisualStudio.Services.Common.VssHttpRetryMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
[2023-11-09 14:54:40Z WARN TelemetryPublisher] Telemetry command failed: System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.
 ---> System.Security.Authentication.AuthenticationException: The remote certificate was rejected by the provided RemoteCertificateValidationCallback.
   at System.Net.Security.SslStream.SendAuthResetSignal(ProtocolToken message, ExceptionDispatchInfo exception)
   at System.Net.Security.SslStream.CompleteHandshake(SslAuthenticationOptions sslAuthenticationOptions)
   at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm)
   at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, Boolean async, Stream stream, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   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(HttpMethod method, Guid locationId, Object routeValues, ApiResourceVersion version, HttpContent content, IEnumerable`1 queryParameters, Object userState, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Services.CustomerIntelligence.WebApi.CustomerIntelligenceHttpClient.PublishEventsAsync(CustomerIntelligenceEvent[] events, Object userState, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Services.Agent.Listener.Telemetry.TelemetryPublisher.PublishEventsAsync(IHostContext context, CustomerIntelligenceEvent ciEvent) in /home/vsts/work/1/s/src/Agent.Listener/Telemetry/TelemetryPublisher.cs:line 95
   at Microsoft.VisualStudio.Services.Agent.Listener.Telemetry.TelemetryPublisher.PublishEvent(IHostContext context, Command command) in /home/vsts/work/1/s/src/Agent.Listener/Telemetry/TelemetryPublisher.cs:line 83

[root@localhost]#openssl  s_client -showcerts -connect 192.168.10.102:443

Server certificate
subject=CN = 192.168.10.102
issuer=CN = 192.168.10.102
---
No client certificate CA names sent
Peer signing digest: SHA256
Peer signature type: RSA
Server Temp Key: ECDH, secp384r1, 384 bits
---
SSL handshake has read 1338 bytes and written 453 bytes
Verification: OK
---
New, TLSv1.2, Cipher is ECDHE-RSA-AES256-GCM-SHA384
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
    Protocol  : TLSv1.2
    Cipher    : ECDHE-RSA-AES256-GCM-SHA384
    Session-ID: 4E2E00001E620E3A7076B588EEE2A23BF2875CDA3B98DE6C157CCB561CB9CD8A
    Session-ID-ctx:
    Master-Key: A4D7B4C679E78AC5FC2625533B8B8ACE72684D2E2216A1495DC84420123FECA89A545991199D05502518D48759ADBAAE
    PSK identity: None
    PSK identity hint: None
    SRP username: None
    Start Time: 1699533811
    Timeout   : 7200 (sec)
    Verify return code: 0 (ok)
    Extended master secret: yes
ChrisPetr0 commented 1 year ago

I have the same problem with self-hosted Ubuntu 20.04 instance in an Azure Devops managed scaleset. The agent fails to provision (in Azure scaleset, you don't specify agent script or anything, it's all handled by Microsoft). The error it throws is :

Virtual Machine Scale Set Name: "redacted"): Code="VMExtensionProvisioningError" Message="VM has reported a failure when processing extension 'Microsoft.Azure.DevOps.Pipelines.Agent' (publisher 'Microsoft.VisualStudio.Services' and type 'TeamServicesAgentLinux'). Error message: \"The Extension failed to execute: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1131)>\". More information on troubleshooting is available at https://aka.ms/vmextensionlinuxtroubleshoot. " Target="2909"

I've updated to Ubuntu 22.04 and believe it has the same type issue.

BTW: this started October 17th and has been that way since.

max-zaytsev commented 1 year ago

@zeinali0 , @ChrisPetr0 thanks for reporting this! We'll take a look

DmitriiBobreshev commented 11 months ago

Hi @zeinali0, @ChrisPetr0, the fix was included in v3.232.0 which is in the pre-release stage now. Could you please check that the error is fixed if it's possible, or I could re-ping you once we fully release it?

ChrisPetr0 commented 11 months ago

Hi @zeinali0, @ChrisPetr0, the fix was included in v3.232.0 which is in the pre-release stage now. Could you please check that the error is fixed if it's possible, or I could re-ping you once we fully release it?

Good Day Dmitri - I won't be able to test until week of Dec 18th but happy to do so once I am able ! Thanks for the update

kirill-ivlev commented 11 months ago

Hi @ChrisPetr0, Agent v.3.232.0 is available as a stable release, this version should resolve the issue. I'll close this issue for this moment, but please feel free to share updates if this issue still occurs.