Strange Webrick exception

I get this exception pretty consistently every time my site rebuilds

[2019-01-21 18:15:06] ERROR Errno::ECONNRESET: Connection reset by peer @ io_fillbuf - fd:18
    /Users/mitchell/.asdf/installs/ruby/2.4.1/lib/ruby/2.4.0/webrick/httpserver.rb:82:in `eof?'
    /Users/mitchell/.asdf/installs/ruby/2.4.1/lib/ruby/2.4.0/webrick/httpserver.rb:82:in `run'
    /Users/mitchell/.asdf/installs/ruby/2.4.1/lib/ruby/2.4.0/webrick/server.rb:290:in `block in start_thread'

I think this might be caused by a plugin I’m using (jekyll-postcss), but I’m not really clear as to why that would be happening.

I run my site with bundle exec jekyll serve --livereload --drafts --future --port 5000

Any ideas?

Thanks!

Do you get the same error without the plugin? When you omit to specify a custom port?

@mitchhanberg, I’m getting the same errors, have you been able to resolve it?

No, but I haven’t put any thought into figuring it out since it doesn’t seem to have affect my development progress.

PS Sorry this response took a while.

getting same error

[2020-01-29 15:34:01] ERROR Errno::ECONNRESET: Connection reset by peer @ io_fillbuf - fd:16 
        /Users/aeum3893/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/webrick/httpserver.rb:82:in `eof?'
        /Users/aeum3893/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/webrick/httpserver.rb:82:in `run'
        /Users/aeum3893/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/webrick/server.rb:307:in `block in start_thread'

Anyone resolved it?

I have been bothered by this problem for many years.

$ bundle exec jekyll serve --trace
Configuration file: /home/leimao/GitHub/leimao.github.io/_config.yml
            Source: /home/leimao/GitHub/leimao.github.io
       Destination: /home/leimao/GitHub/leimao.github.io/_site
 Incremental build: disabled. Enable with --incremental
      Generating... 
                    done in 0.812 seconds.
 Auto-regeneration: enabled for '/home/leimao/GitHub/leimao.github.io'
    Server address: http://127.0.0.1:4000
  Server running... press ctrl-c to stop.
[2020-12-31 10:15:47] ERROR Errno::ECONNRESET: Connection reset by peer @ io_fillbuf - fd:17 
	/usr/lib/ruby/2.7.0/webrick/httpserver.rb:82:in `eof?'
	/usr/lib/ruby/2.7.0/webrick/httpserver.rb:82:in `run'
	/usr/lib/ruby/2.7.0/webrick/server.rb:307:in `block in start_thread'
[2020-12-31 10:15:47] ERROR Errno::ECONNRESET: Connection reset by peer @ io_fillbuf - fd:18 
	/usr/lib/ruby/2.7.0/webrick/httpserver.rb:82:in `eof?'
	/usr/lib/ruby/2.7.0/webrick/httpserver.rb:82:in `run'
	/usr/lib/ruby/2.7.0/webrick/server.rb:307:in `block in start_thread'
[2020-12-31 10:15:47] ERROR Errno::ECONNRESET: Connection reset by peer @ io_fillbuf - fd:17 
	/usr/lib/ruby/2.7.0/webrick/httpserver.rb:82:in `eof?'
	/usr/lib/ruby/2.7.0/webrick/httpserver.rb:82:in `run'
	/usr/lib/ruby/2.7.0/webrick/server.rb:307:in `block in start_thread'

I’m also getting these exact errors (except with ruby 2.6.5). I can’t find a fix anywhere. Some forums have said to delete .jekyll-cache or _site, but that hasn’t had any affect for me.

Replying to bump this up in hopes that someone has discovered a solution.

is there anything actually wrong? does the site build? the error appears to be from the webrick webserver, not sure that would effect the build.

Are you using anything other than vanilla jekyll? plugins?

For this error, I only get it in a project I’m developing from a custom theme (I’m reaching out to that author to see if he’s encountered it).

It seems to prevent certain assets from loading. For example, I have an audio clip on each page, and if the server is running (jekyll serve), this error prevents the audio file from loading. I haven’t built the site yet, so it mostly just makes development & testing very tedious.

It’s been very inconsistent until recently. The webrick error would show up, and I’d just restart the server and have no more problems for a while. But in the past few days, this error pops up within minutes of starting the server, every time I start it.

EDIT: to clarify, the output in the _site folder does seem to work find as a static site, with all the audio, images, links, etc. working fine. I just want to be able to run the server and edit without stopping & starting after each save.

maybe see if you can update webrick? I don’t think this is jekyll related really - jekyll is using webrick as the server and there is something it doesn’t like.

Might also update ruby to 2.7.

So I also receive this error after running bundle exec jekyll serve

[2022-06-07 09:15:41] ERROR Errno::ECONNRESET: Connection reset by peer @ io_fillbuf - fd:13 
        /usr/lib/ruby/2.7.0/webrick/httpserver.rb:82:in `eof?'
        /usr/lib/ruby/2.7.0/webrick/httpserver.rb:82:in `run'
        /usr/lib/ruby/2.7.0/webrick/server.rb:307:in `block in start_thread'

Now the server address I receive is Server address: http://127.0.0.1:5000/notes/.
After opening this I get the above mentioned error.

But if I open some other inner url (like http://localhost:5000/notes/linux/) istead of the root url after doing bundle exec jekyll serve, I don’t get any error and the entire site works normally.

This is the only workaround I have for me. I’m using https://github.com/just-the-docs/just-the-docs this theme

I am in the process of developing a site and I wanted to include some custom html that displays a youtube video. I had just been using an iframe, but I wanted to get the page to auto play the video when the page begins so I began using the Youtube API and as soon as I started using the API I started getting this error as well. I assume they are related, but have yet to figure out how or how to fix them.

Still running into the same issue, I found this on the webrick repo but adding the patch doesn’t seem to resolve it either. I have also found references to the issue in the jekyll and tailwind repos. Most of the time it seems to reload the page, it does break eventually though