question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SSL unexpected EOF error due to non-blocking CircularBufferStream

See original GitHub issue

To reproduce:

  1. Fresh clone of the repository, open the sln
  2. Open IrcBot.cs, change line 159 to client.Connect(server, true, registrationInfo); (to enable ssl).
  3. Start the “MarkovTextBot” sample
  4. When prompted, enter “connect chat.freenode.net” (which listens on port 6697 for SSL connections)

The following exception is thrown:

System.AggregateException occurred
  HResult=0x80131500
  Message=One or more errors occurred.
  Source=<Cannot evaluate the exception source>
  StackTrace:
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.Wait()
   at IrcDotNet.StandardIrcClient.GetDataStream(Boolean useSsl, String targetHost) in C:\Documents\projects\IrcDotNet\source\IrcDotNet\StandardIrcClient.cs:line 592
   at IrcDotNet.StandardIrcClient.ConnectCompleted(Object sender, SocketAsyncEventArgs e) in C:\Documents\projects\IrcDotNet\source\IrcDotNet\StandardIrcClient.cs:line 444
   at System.Net.Sockets.SocketAsyncEventArgs.OnCompleted(SocketAsyncEventArgs e)
   at System.Net.Sockets.SocketAsyncEventArgs.ExecutionCallback(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

Inner Exception 1:
IOException:  Received an unexpected EOF or 0 bytes from the transport stream.

Where the InnerException is:

System.IO.IOException:  Received an unexpected EOF or 0 bytes from the transport stream.
   at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes)
   at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Net.Security.SslState.InternalEndProcessAuthentication(LazyAsyncResult lazyResult)
   at System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result)
   at System.Net.Security.SslStream.EndAuthenticateAsClient(IAsyncResult asyncResult)
   at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)

I tried the same with another IRC server (also over SSL), with the same result.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:15 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
orelerakicommented, Mar 14, 2020

@canton7, Hi, after seeing there are no maintainers, i asked by the Owner and became a Maintainer. I will soon start updating the libraries and my first goals will be fixing crashes. If you will be patient a bit more, i will check this matter and hope to implement a fix soon.

1reaction
wledfor2commented, Jul 18, 2017

Does anyone have a temp workaround for this issue? It’s very crippling, with more and more IRC networks going SSL only.

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Unexpected EOF" SSL error when registering system to ...
Issue. There was an SSL error: (-1, 'Unexpected EOF') A common cause of this error is the system time being incorrect. Verify that...
Read more >
SSL error "unexpected eof while reading" on same ...
First, I'm aware of the SSL Library Error: error:0A000126:SSL routines::unexpected eof while reading error stemming from OpenSSL 3 ...
Read more >
Net::FTPSSL giving error Unexpected EOF on Command ...
I'm trying to use Perl and Net::FTPSSL on an ubuntu server to upload a local file to an externally hosted webserver. The login...
Read more >
Warning: fread(): SSL routines::unexpected eof
I'm using OpenSSL v3.0.7 on CentOS9, I used to run on CentOS6 with OpenSSL v1.0.2k-fips which was fine. I do not have FIPS...
Read more >
Host disconnects from vCenter Server with the error: Got ...
Host disconnects from vCenter Server with the error: Got vmacore exception: SSL Exception: Unexpected EOF (2064246). Symptoms.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found