Linux 머신에서 Azure Pipeline Agent를 수행하는 경우에 “The SSL connection could not be established, see inner exception” 와 같은 오류 메시지와 함께 정상 수행되지 않는 경우가 있습니다. 보고된 메시지 자체는 매우 일반적인 메시지이므로, 좀 더 자세한 오류 정보가 필요합니다. 일반적으로 Azure Pipeline Agent의 경우는 Agent가 설치된 디렉토리 밑에 _diag 라는 폴더가 존재합니다. 해당 폴더에는 Agent_YYYYMMDD-0XXXXX-utc.log 같은 형태의 로그가 저장되어 있습니다. 그러므로, 문제가 발생한 시점을 확인하면 보다 자세한 오류를 확인할 수 있는 데, 해당 에러는 아래의 오류에 의해서 발생한 메시지였습니다.
[SSL Policy Errors] RemoteCertificateChainErrors: ChainStatus has returned a non empty array …
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
[YYYY-MM-DD TT:MM:SSZ ERR VisualStudioServices] GET request to https://dev.azure.com/organization/_apis/connectionData?connectOptions=X&lastChangeId=XXXXXXXXX&lastChangeId64=XXXXXXXXX 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.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)
해당 문제는 해당 Linux (CentOS)에서 수행하는 Azure Pipeline Agent가 .NET Core App임에 따라 아래의 언급된 내용과 관련이 있을 수 있습니다.