При попытке restore package, mono вываливается с ошибкой
Доброго дня,
Задача в jenkins исполняет следующий код
nuget restore backend/backend.sln
xbuild backend/backend.sln /verbosity:m /p:Configuration=Debug /t:rebuild
xbuild backend/backend.sln /verbosity:m /p:Configuration=Release /t:rebuild
У меня на машине эта команда отрабатывает. В Jenkins сборка прерывается ещё на restore packages с одной из следующих ошибок:
1.
Installing 'Microsoft.AspNet.WebApi.Owin 5.2.3'.
Stacktrace:
Native stacktrace:
mono() [0x4accac]
mono() [0x50451f]
mono() [0x42a7c7]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xf8d0) [0x7f98502228d0]
2.
+ nuget restore backend/backend.sln
Stacktrace:
Native stacktrace:
mono() [0x4accac]
mono() [0x50451f]
mono() [0x42a7c7]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xf8d0) [0x7f0d888038d0]
[0x2290b00]
Видно, что ошибка в одном и том же файле.
3.
Installing 'Rx-PlatformServices 2.2.5'.
ERROR building certificate chain: System.NullReferenceException: Object reference not set to an instance of an object
at System.Security.Cryptography.X509Certificates.X509Chain.get_Roots () [0x00000] in <filename unknown>:0
at System.Security.Cryptography.X509Certificates.X509Chain.get_CertificateCollection () [0x00000] in <filename unknown>:0
at System.Security.Cryptography.X509Certificates.X509Chain.FindParent (System.Security.Cryptography.X509Certificates.X509Certificate2 certificate) [0x00000] in <filename unknown>:0
at System.Security.Cryptography.X509Certificates.X509Chain.BuildChainFrom (System.Security.Cryptography.X509Certificates.X509Certificate2 certificate) [0x00000] in <filename unknown>:0
at System.Security.Cryptography.X509Certificates.X509Chain.Build (System.Security.Cryptography.X509Certificates.X509Certificate2 certificate) [0x00000] in <filename unknown>:0
at System.Net.ServicePointManager+ChainValidationHelper.ValidateChain (Mono.Security.X509.X509CertificateCollection certs) [0x00000] in <filename unknown>:0
Please, report this problem to the Mono team
ERROR processing certificate: System.Security.Cryptography.CryptographicException: Certificate instance is empty.
at System.Security.Cryptography.X509Certificates.X509Certificate2.get_Version () [0x00000] in <filename unknown>:0
at System.Net.ServicePointManager+ChainValidationHelper.CheckCertificateUsage (System.Security.Cryptography.X509Certificates.X509Certificate2 cert) [0x00000] in <filename unknown>:0
Please, report this problem to the Mono team
Installing 'Microsoft.Data.Services.Client 5.6.3'.
ERROR building certificate chain: System.NullReferenceException: Object reference not set to an instance of an object
at System.Security.Cryptography.X509Certificates.X509Chain.get_Roots () [0x00000] in <filename unknown>:0
at System.Security.Cryptography.X509Certificates.X509Chain.get_CertificateCollection () [0x00000] in <filename unknown>:0
at System.Security.Cryptography.X509Certificates.X509Chain.FindParent (System.Security.Cryptography.X509Certificates.X509Certificate2 certificate) [0x00000] in <filename unknown>:0
at System.Security.Cryptography.X509Certificates.X509Chain.BuildChainFrom (System.Security.Cryptography.X509Certificates.X509Certificate2 certificate) [0x00000] in <filename unknown>:0
at System.Security.Cryptography.X509Certificates.X509Chain.Build (System.Security.Cryptography.X509Certificates.X509Certificate2 certificate) [0x00000] in <filename unknown>:0
at System.Net.ServicePointManager+ChainValidationHelper.ValidateChain (Mono.Security.X509.X509CertificateCollection certs) [0x00000] in <filename unknown>:0
Please, report this problem to the Mono team
Unhandled Exception:
System.ArgumentNullException: Argument cannot be null.
Parameter name: obj
at System.Threading.Monitor.TryEnter (System.Object obj, Int32 millisecondsTimeout, System.Boolean& lockTaken) [0x00000] in <filename unknown>:0
at System.Threading.Monitor.Enter (System.Object obj, System.Boolean& lockTaken) [0x00000] in <filename unknown>:0
at (wrapper unknown) System.Threading.Monitor:FastMonitorEnterV4 (object,bool&)
at Mono.Security.Protocol.Tls.RecordProtocol+ReceiveRecordAsyncResult.SetComplete (System.Exception ex, System.Byte[] resultingBuffer) [0x00000] in <filename unknown>:0
at Mono.Security.Protocol.Tls.RecordProtocol+ReceiveRecordAsyncResult.SetComplete (System.Exception ex) [0x00000] in <filename unknown>:0
at Mono.Security.Protocol.Tls.RecordProtocol.InternalReceiveRecordCallback (IAsyncResult asyncResult) [0x00000] in <filename unknown>:0
Build step 'Execute shell' marked build as failure
Finished: FAILURE
Источник: Stack Overflow на русском