首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在Ubuntu上的mono上运行时,Serilog.Sink.LogEntries无法工作

在Ubuntu上的mono上运行时,Serilog.Sink.LogEntries无法工作
EN

Stack Overflow用户
提问于 2016-05-04 22:23:08
回答 1查看 305关注 0票数 1

我想把Serilog和LogEntries一起使用。当我在Windows上运行应用程序时,这很好用,但是当我在ubuntu14.2上的mono上构建和运行时,LogEntries没有收到消息。作为第二个slog接收器,我配置了控制台输出,这在Linux上有效。

在serilog中打开selfdebug后,我记录了这个异常:

代码语言:javascript
复制
2016-05-05T10:55:00 Exception while emitting periodic batch from Serilog.Sinks.Logentries.LogentriesSink: System.IO.IOException: The authentication or decryption has failed. ---> System.IO.IOException: The authentication or decryption has failed. ---> Mono.Security.Protocol.Tls.TlsException: The authentication or decryption has failed.
  at Mono.Security.Protocol.Tls.RecordProtocol.EndReceiveRecord (IAsyncResult asyncResult) [0x00040] in <filename unknown>:0 
  at Mono.Security.Protocol.Tls.SslClientStream.SafeEndReceiveRecord (IAsyncResult ar, Boolean ignoreEmpty) [0x00000] in <filename unknown>:0 
  at Mono.Security.Protocol.Tls.SslClientStream.NegotiateAsyncWorker (IAsyncResult result) [0x00071] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at Mono.Security.Protocol.Tls.SslClientStream.EndNegotiateHandshake (IAsyncResult result) [0x0003b] in <filename unknown>:0 
  at Mono.Security.Protocol.Tls.SslStreamBase.AsyncHandshakeCallback (IAsyncResult asyncResult) [0x0000c] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at Mono.Security.Protocol.Tls.SslStreamBase.EndRead (IAsyncResult asyncResult) [0x00057] in <filename unknown>:0 
  at System.Net.Security.SslStream.EndAuthenticateAsClient (IAsyncResult asyncResult) [0x00011] in <filename unknown>:0 
  at System.Net.Security.SslStream.AuthenticateAsClient (System.String targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation) [0x0000e] in <filename unknown>:0 
  at System.Net.Security.SslStream.AuthenticateAsClient (System.String targetHost) [0x00007] in <filename unknown>:0 
  at Serilog.Sinks.Logentries.LeClient.Connect () [0x00049] in <filename unknown>:0 
  at Serilog.Sinks.Logentries.LogentriesSink.EmitBatch (IEnumerable`1 events) [0x00023] in <filename unknown>:0 
  at Serilog.Sinks.PeriodicBatching.PeriodicBatchingSink.OnTick () [0x00051] in <filename unknown>:0 
2016-05-05T10:55:02 Exception while emitting periodic batch from Serilog.Sinks.Logentries.LogentriesSink: System.IO.IOException: The authentication or decryption has failed. ---> System.IO.IOException: The authentication or decryption has failed. ---> Mono.Security.Protocol.Tls.TlsException: The authentication or decryption has failed.
  at Mono.Security.Protocol.Tls.RecordProtocol.EndReceiveRecord (IAsyncResult asyncResult) [0x00040] in <filename unknown>:0 
  at Mono.Security.Protocol.Tls.SslClientStream.SafeEndReceiveRecord (IAsyncResult ar, Boolean ignoreEmpty) [0x00000] in <filename unknown>:0 
  at Mono.Security.Protocol.Tls.SslClientStream.NegotiateAsyncWorker (IAsyncResult result) [0x00071] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at Mono.Security.Protocol.Tls.SslClientStream.EndNegotiateHandshake (IAsyncResult result) [0x0003b] in <filename unknown>:0 
  at Mono.Security.Protocol.Tls.SslStreamBase.AsyncHandshakeCallback (IAsyncResult asyncResult) [0x0000c] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at Mono.Security.Protocol.Tls.SslStreamBase.EndRead (IAsyncResult asyncResult) [0x00057] in <filename unknown>:0 
  at System.Net.Security.SslStream.EndAuthenticateAsClient (IAsyncResult asyncResult) [0x00011] in <filename unknown>:0 
  at System.Net.Security.SslStream.AuthenticateAsClient (System.String targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation) [0x0000e] in <filename unknown>:0 
  at System.Net.Security.SslStream.AuthenticateAsClient (System.String targetHost) [0x00007] in <filename unknown>:0 
  at Serilog.Sinks.Logentries.LeClient.Connect () [0x00049] in <filename unknown>:0 
  at Serilog.Sinks.Logentries.LogentriesSink.EmitBatch (IEnumerable`1 events) [0x00023] in <filename unknown>:0 
  at Serilog.Sinks.PeriodicBatching.PeriodicBatchingSink.OnTick () [0x00051] in <filename unknown>:0 
2016-05-05T10:55:13 Exception while emitting periodic batch from Serilog.Sinks.Logentries.LogentriesSink: System.IO.IOException: The authentication or decryption has failed. ---> System.IO.IOException: The authentication or decryption has failed. ---> Mono.Security.Protocol.Tls.TlsException: The authentication or decryption has failed.
  at Mono.Security.Protocol.Tls.RecordProtocol.EndReceiveRecord (IAsyncResult asyncResult) [0x00040] in <filename unknown>:0 
  at Mono.Security.Protocol.Tls.SslClientStream.SafeEndReceiveRecord (IAsyncResult ar, Boolean ignoreEmpty) [0x00000] in <filename unknown>:0 
  at Mono.Security.Protocol.Tls.SslClientStream.NegotiateAsyncWorker (IAsyncResult result) [0x00071] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at Mono.Security.Protocol.Tls.SslClientStream.EndNegotiateHandshake (IAsyncResult result) [0x0003b] in <filename unknown>:0 
  at Mono.Security.Protocol.Tls.SslStreamBase.AsyncHandshakeCallback (IAsyncResult asyncResult) [0x0000c] in <filename Thread started: <Thread Pool> #9
unknown>:0 

这看起来像是在Mono和Logentries之间存在SSL问题。

EN

回答 1

Stack Overflow用户

发布于 2016-05-05 18:17:21

使用Linux Agent来跟踪创建的日志文件可能会更容易一些。然后,代理将此日志数据转发到您的帐户。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/37030588

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档