'Create an azure pipeline agent on linux
I wanted to create an Azure Pipeline Agent on a linux machine, but I met such error -
Error reported in diagnostic logs. Please examine the log for more details.
- /scratch/agent/\_diag/Agent_20220315-095325-utc.log
The SSL connection could not be established, see inner exception.
Failed to connect. Try again or ctrl-c to quit
I checked inner exception and saw this -
\[HttpRequestHeaders\]
X-TFS-Session: 97dd8bb0-8f5d-40d0-b308-d7c35e51b896
X-VSS-E2EID: 2810d892-818d-46a8-95b5-39f4d253a71d
User-Agent: VSServices/16.199.32223.0, (NetStandard; Linux 3.12.49-11-default #1 SMP Wed Nov 11 20:52:43 UTC 2015 \[8d714a0\]), VstsAgentCore-linux-x64/2.200.2, (Linux 3.12.49-11-default #1 SMP Wed Nov 11 20:52:43 UTC 2015 (8d714a0))
\[Certificate\]
Effective date: 11/10/2021 00:14:27
Expiration date: 11/10/2022 00:14:27
Issuer: CN=Microsoft RSA TLS CA 02, O=Microsoft Corporation, C=US
Subject: CN=dev.azure.com
\[2022-03-15 02:49:22Z ERR VisualStudioServices\] GET request to https://dev.azure.com/hexagonmi/\_apis/connectionData?connectOptions=1&lastChangeId=-1&lastChangeId64=-1 failed. System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.
\---\> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.
at System.Net.Security.SslStream.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, ExceptionDispatchInfo exception)
at System.Net.Security.SslStream.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslStream.StartSendBlob(Byte\[\] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslStream.ProcessReceivedBlob(Byte\[\] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslStream.StartReadFrame(Byte\[\] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslStream.StartReceiveBlob(Byte\[\] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslStream.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslStream.StartSendBlob(Byte\[\] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslStream.ProcessReceivedBlob(Byte\[\] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslStream.StartReadFrame(Byte\[\] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslStream.PartialFrameCallback(AsyncProtocolRequest asyncRequest)
--- End of stack trace from previous location where exception was thrown ---
I tried to change URL to use HTTP, but it did not work.
Solution 1:[1]
"The remote certificate is invalid according to the validation procedure" error,
it is likely that your server certificate is self-signed, or you have used the wrong host name to connect (the host name must match the name on the certificate),
For example imap.example.com and example.com may point to the same server, but certificate is issued only to imap.example.com and this is the address you should use), so please check the certificate in your IIS.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Kangcheng Jin-MSFT |