Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker compose up: execution expired (Net::OpenTimeout) #2280

Closed
2 tasks done
ChanCody opened this issue Mar 15, 2024 · 5 comments
Closed
2 tasks done

docker compose up: execution expired (Net::OpenTimeout) #2280

ChanCody opened this issue Mar 15, 2024 · 5 comments
Labels

Comments

@ChanCody
Copy link

Have you checked that your issue isn't already filed?

  • I read through FAQ and searched through the past issues, none of which addressed my issue.
  • Yes, I have checked that this issue isn't already filed.

Bug description

docker compose up: execution expired (Net::OpenTimeout)

How to reproduce the bug

just follow the INSTALL.md:

  1. install wsl in windows 11
  2. install Ubuntu by wsl --install -d Ubuntu
  3. install docker & docker-compose
  4. clone this repo & run docker compose pull, docker compose up

Error messages and logs

when I run docker compose up:

[+] Running 1/0
 ✔ Container chancodygithubio-jekyll-1  Created                                                                    0.0s
Attaching to jekyll-1
jekyll-1  | Resolving dependencies...
jekyll-1  |   Logging at level: debug
jekyll-1  |     Jekyll Version: 4.3.3
jekyll-1  | Configuration file: /srv/jekyll/_config.yml
jekyll-1  |   Logging at level: debug
jekyll-1  |     Jekyll Version: 4.3.3
jekyll-1  |          Requiring: /srv/jekyll/_plugins/cache-bust.rb
jekyll-1  |          Requiring: /srv/jekyll/_plugins/details.rb
jekyll-1  |          Requiring: /srv/jekyll/_plugins/external-posts.rb
jekyll-1  |          Requiring: /srv/jekyll/_plugins/file-exists.rb
jekyll-1  |          Requiring: /srv/jekyll/_plugins/google-scholar-citations.rb
jekyll-1  |          Requiring: /srv/jekyll/_plugins/hideCustomBibtex.rb
jekyll-1  |          Requiring: /srv/jekyll/_plugins/remove-accents.rb
jekyll-1  |          Requiring: jekyll-archives
jekyll-1  |          Requiring: jekyll-email-protect
jekyll-1  |          Requiring: jekyll-feed
jekyll-1  |          Requiring: jekyll-get-json
jekyll-1  |          Requiring: jekyll-imagemagick
jekyll-1  |          Requiring: jekyll-jupyter-notebook
jekyll-1  |          Requiring: jekyll-link-attributes
jekyll-1  |          Requiring: jekyll-minifier
jekyll-1  |          Requiring: jekyll-paginate-v2
jekyll-1  |          Requiring: jekyll/scholar
jekyll-1  |          Requiring: jekyll-sitemap
jekyll-1  |          Requiring: jekyll-toc
jekyll-1  |          Requiring: jekyll-twitter-plugin
jekyll-1  |          Requiring: jemoji
jekyll-1  |             Source: /srv/jekyll
jekyll-1  |        Destination: /srv/jekyll/_site
jekyll-1  |  Incremental build: disabled. Enable with --incremental
jekyll-1  |       Generating...
jekyll-1  |            Reading: /_layouts/about.liquid
jekyll-1  |            Reading: /_layouts/archive-category.liquid
jekyll-1  |            Reading: /_layouts/archive-tag.liquid
jekyll-1  |            Reading: /_layouts/archive-year.liquid
jekyll-1  |            Reading: /_layouts/bib.liquid
jekyll-1  |            Reading: /_layouts/cv.liquid
jekyll-1  |            Reading: /_layouts/default.liquid
jekyll-1  |            Reading: /_layouts/distill.liquid
jekyll-1  |            Reading: /_layouts/none.liquid
jekyll-1  |            Reading: /_layouts/page.liquid
jekyll-1  |            Reading: /_layouts/post.liquid
jekyll-1  |            Reading: /_layouts/profiles.liquid
jekyll-1  |        EntryFilter: excluded /Gemfile
jekyll-1  |        EntryFilter: excluded /docker-compose-slim.yml
jekyll-1  |        EntryFilter: excluded /package-lock.json
jekyll-1  |        EntryFilter: excluded /LICENSE
jekyll-1  |        EntryFilter: excluded /FAQ.md
jekyll-1  |        EntryFilter: excluded /README.md
jekyll-1  |        EntryFilter: excluded /INSTALL.md
jekyll-1  |        EntryFilter: excluded /purgecss.config.js
jekyll-1  |        EntryFilter: excluded /docker-compose.yml
jekyll-1  |        EntryFilter: excluded /CUSTOMIZE.md
jekyll-1  |        EntryFilter: excluded /lighthouse_results
jekyll-1  |        EntryFilter: excluded /.jekyll-cache
jekyll-1  |        EntryFilter: excluded /readme_preview
jekyll-1  |        EntryFilter: excluded /Dockerfile
jekyll-1  |        EntryFilter: excluded /CONTRIBUTING.md
jekyll-1  |        EntryFilter: excluded /bin
jekyll-1  |        EntryFilter: excluded /Gemfile.lock
jekyll-1  |        EntryFilter: excluded /package.json
jekyll-1  |            Reading: _posts/2015-03-15-formatting-and-links.md
jekyll-1  |            Reading: _posts/2015-05-15-images.md
jekyll-1  |            Reading: _posts/2015-07-15-code.md
jekyll-1  |            Reading: _posts/2015-10-20-disqus-comments.md
jekyll-1  |            Reading: _posts/2015-10-20-math.md
jekyll-1  |            Reading: _posts/2018-12-22-distill.md
jekyll-1  |            Reading: _posts/2020-09-28-github-metadata.md
jekyll-1  |            Reading: _posts/2020-09-28-twitter.md
jekyll-1  |            Reading: _posts/2021-07-04-diagrams.md
jekyll-1  |            Reading: _posts/2022-02-01-redirect.md
jekyll-1  |            Reading: _posts/2022-12-10-giscus-comments.md
jekyll-1  |            Reading: _posts/2023-03-20-table-of-contents.md
jekyll-1  |            Reading: _posts/2023-03-21-tables.md
jekyll-1  |            Reading: _posts/2023-04-24-videos.md
jekyll-1  |            Reading: _posts/2023-04-25-audios.md
jekyll-1  |            Reading: _posts/2023-04-25-sidebar-table-of-contents.md
jekyll-1  |            Reading: _posts/2023-05-12-custom-blockquotes.md
jekyll-1  |            Reading: _posts/2023-07-04-jupyter-notebook.md
jekyll-1  |            Reading: _posts/2023-07-12-post-bibliography.md
jekyll-1  |            Reading: _posts/2023-12-12-tikzjax.md
jekyll-1  |            Reading: _posts/2024-01-26-chartjs.md
jekyll-1  |            Reading: _posts/2024-01-26-echarts.md
jekyll-1  |            Reading: _posts/2024-01-26-geojson-map.md
jekyll-1  |            Reading: _posts/2024-01-27-advanced-images.md
jekyll-1  |            Reading: _posts/2024-01-27-code-diff.md
jekyll-1  |            Reading: _posts/2024-01-27-vega-lite.md
jekyll-1  |            Reading: assets/css/main.scss
jekyll-1  |        EntryFilter: excluded /_pages/about_einstein.md
jekyll-1  |            Reading: _pages/news.md
jekyll-1  |            Reading: _pages/profiles.md
jekyll-1  |            Reading: _pages/blog.md
jekyll-1  |            Reading: _pages/repositories.md
jekyll-1  |            Reading: _pages/about.md
jekyll-1  |            Reading: _pages/publications.md
jekyll-1  |            Reading: _pages/projects.md
jekyll-1  |            Reading: _pages/teaching.md
jekyll-1  |            Reading: _pages/404.md
jekyll-1  |            Reading: _pages/cv.md
jekyll-1  |            Reading: _pages/dropdown.md
jekyll-1  |            Reading: robots.txt
jekyll-1  |            Reading: _news/announcement_1.md
jekyll-1  |            Reading: _news/announcement_2.md
jekyll-1  |            Reading: _news/announcement_3.md
jekyll-1  |            Reading: _projects/1_project.md
jekyll-1  |            Reading: _projects/2_project.md
jekyll-1  |            Reading: _projects/3_project.md
jekyll-1  |            Reading: _projects/4_project.md
jekyll-1  |            Reading: _projects/5_project.md
jekyll-1  |            Reading: _projects/6_project.md
jekyll-1  |            Reading: _data/coauthors.yml
jekyll-1  |            Reading: _data/cv.yml
jekyll-1  |            Reading: _data/repositories.yml
jekyll-1  |            Reading: _data/venues.yml
jekyll-1  |         Generating: JekyllGetJson::GetJsonGenerator finished in 0.0001286 seconds.
jekyll-1  |         Generating: Jekyll::Scholar::DetailsGenerator finished in 2.23e-05 seconds.
jekyll-1  | "Fetching external posts from medium.com:"
jekyll-1  | /usr/lib/ruby/3.0.0/net/http.rb:987:in `initialize': execution expired (Net::OpenTimeout)
jekyll-1  |     from /usr/lib/ruby/3.0.0/net/http.rb:987:in `open'
jekyll-1  |     from /usr/lib/ruby/3.0.0/net/http.rb:987:in `block in connect'
jekyll-1  |     from /usr/lib/ruby/3.0.0/timeout.rb:107:in `timeout'
jekyll-1  |     from /usr/lib/ruby/3.0.0/net/http.rb:985:in `connect'
jekyll-1  |     from /usr/lib/ruby/3.0.0/net/http.rb:970:in `do_start'
jekyll-1  |     from /usr/lib/ruby/3.0.0/net/http.rb:959:in `start'
jekyll-1  |     from /usr/lib/ruby/3.0.0/net/http.rb:1512:in `request'
jekyll-1  |     from /var/lib/gems/3.0.0/gems/httparty-0.21.0/lib/httparty/request.rb:156:in `perform'
jekyll-1  |     from /var/lib/gems/3.0.0/gems/httparty-0.21.0/lib/httparty.rb:612:in `perform_request'
jekyll-1  |     from /var/lib/gems/3.0.0/gems/httparty-0.21.0/lib/httparty.rb:526:in `get'
jekyll-1  |     from /var/lib/gems/3.0.0/gems/httparty-0.21.0/lib/httparty.rb:645:in `get'
jekyll-1  |     from /srv/jekyll/_plugins/external-posts.rb:14:in `block in generate'
jekyll-1  |     from /srv/jekyll/_plugins/external-posts.rb:12:in `each'
jekyll-1  |     from /srv/jekyll/_plugins/external-posts.rb:12:in `generate'
jekyll-1  |     from /var/lib/gems/3.0.0/gems/jekyll-4.3.3/lib/jekyll/site.rb:193:in `block in generate'
jekyll-1  |     from /var/lib/gems/3.0.0/gems/jekyll-4.3.3/lib/jekyll/site.rb:191:in `each'
jekyll-1  |     from /var/lib/gems/3.0.0/gems/jekyll-4.3.3/lib/jekyll/site.rb:191:in `generate'
jekyll-1  |     from /var/lib/gems/3.0.0/gems/jekyll-4.3.3/lib/jekyll/site.rb:79:in `process'
jekyll-1  |     from /var/lib/gems/3.0.0/gems/jekyll-4.3.3/lib/jekyll/command.rb:28:in `process_site'
jekyll-1  |     from /var/lib/gems/3.0.0/gems/jekyll-4.3.3/lib/jekyll/commands/build.rb:65:in `build'
jekyll-1  |     from /var/lib/gems/3.0.0/gems/jekyll-4.3.3/lib/jekyll/commands/build.rb:36:in `process'
jekyll-1  |     from /var/lib/gems/3.0.0/gems/jekyll-4.3.3/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
jekyll-1  |     from /var/lib/gems/3.0.0/gems/jekyll-4.3.3/lib/jekyll/command.rb:91:in `each'
jekyll-1  |     from /var/lib/gems/3.0.0/gems/jekyll-4.3.3/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
jekyll-1  |     from /var/lib/gems/3.0.0/gems/jekyll-4.3.3/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'
jekyll-1  |     from /var/lib/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
jekyll-1  |     from /var/lib/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
jekyll-1  |     from /var/lib/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
jekyll-1  |     from /var/lib/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
jekyll-1  |     from /var/lib/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
jekyll-1  |     from /var/lib/gems/3.0.0/gems/jekyll-4.3.3/exe/jekyll:15:in `<top (required)>'
jekyll-1  |     from /usr/local/bin/jekyll:25:in `load'
jekyll-1  |     from /usr/local/bin/jekyll:25:in `<main>'

What operating system are you using?

Windows

Where are you seeing the problem on?

Running locally with Docker

More info

FYI:

  1. When I run docker compose up, it hangs a few seconds at log:
jekyll-1  | "Fetching external posts from medium.com:"
  1. I've tried docker compose up with and without proxy, and the error logs are the same.
  2. windows version: Winows 11 Pro, 21H2, 22000.2538
  3. wsl version: 2.1.5.0, fresh installed with Ubuntu 22.04.3 LTS

I've searched through all the issues and FAQ, but not found any similar error.

I'm new to Ruby, web, jekyll and al-folio, so apologies if there is an obvious solution.

@ChanCody ChanCody added the bug label Mar 15, 2024
@george-gca
Copy link
Collaborator

george-gca commented Mar 15, 2024

Probably your docker is not being able to access the internet just to get the external posts. The easiest way to solve this would be to just comment these lines in your _config.yml:

# External sources.
# If you have blog posts published on medium.com or other external sources,
# you can display them in your blog by adding a link to the RSS feed.
external_sources:
  - name: 
    rss_url:

Edit: FYI this is the plugin responsible for fetching external posts and this error is probably being thrown by the HTTParty.get function. So maybe it is worth checking for errors related to this library, like this one.

@ChanCody
Copy link
Author

@george-gca Thanks for your quick reply!

After commenting out these lines, another error occurs. I found the issue is due to network problems. I’m currently in China, where many websites can only be accessed through a proxy. Unfortunately, Windows proxy settings don’t work for WSL by default. Configuring WSL to use the Windows proxy can be a pain in a**. I’ve tried many methods, and here’s what works for me:

  1. Set proxy in Ubuntu, following this blog
  2. Set windows firewall to allow wsl to access the host machine, following this answer
  3. DON"T FORGET TO REBOOT YOUR PC!

You can check if the set-up works by wget www.google.com, a index.html file should be downloaded.

After all these, I can set up my page locally by docker compose up. But still, I have to comment those "external" lines. I can access medium.com in wsl by wget https://medium.com/@al-folio/feed, but docker compose up still hangs at jekyll-1 | "Fetching external posts from medium.com:, which is pretty weird.

Anyway, now I can custom my page locally! Happy coding!

Yet, I have another question: why does the "about" page not have a name part like other pages, which makes it looks weird:
"about" page:
image
"blog" page:
image

@george-gca
Copy link
Collaborator

Happy that it worked for you.

This was a design decision. In the about page your name is already being shown as the first text in that page and in a larger font, so it would be kind of redundant.

@ChanCody
Copy link
Author

Got it

@artyommatveev
Copy link

artyommatveev commented Jul 12, 2024

@george-gca Thanks for your quick reply!

After commenting out these lines, another error occurs. I found the issue is due to network problems. I’m currently in China, where many websites can only be accessed through a proxy. Unfortunately, Windows proxy settings don’t work for WSL by default. Configuring WSL to use the Windows proxy can be a pain in a**. I’ve tried many methods, and here’s what works for me:

  1. Set proxy in Ubuntu, following this blog
  2. Set windows firewall to allow wsl to access the host machine, following this answer
  3. DON"T FORGET TO REBOOT YOUR PC!

You can check if the set-up works by wget www.google.com, a index.html file should be downloaded.

After all these, I can set up my page locally by docker compose up. But still, I have to comment those "external" lines. I can access medium.com in wsl by wget https://medium.com/@al-folio/feed, but docker compose up still hangs at jekyll-1 | "Fetching external posts from medium.com:, which is pretty weird.

Anyway, now I can custom my page locally! Happy coding!

Yet, I have another question: why does the "about" page not have a name part like other pages, which makes it looks weird: "about" page: image "blog" page: image

Thank you, @ChanCody! I finally managed to access my localhost page with the help of your pieces of advice (especially the second one on the firewall). Speaking about that issue with Medium, I've got exactly the same behavior both on Windows 10 and 11. Actually, I've been using this tool in order to set up a VPN on Windows 10, and this "built-in" solution for Windows 11. In the described approaches, we consider that one turns on a VPN on the Windows side of an OS. However, as you see, I still haven't worked it out completely and am looking for existing approaches so as to be able to automatically load one's posts made on Medium to the corresponding personal website (meaning, using the external_sources field in the _config.yml file).

Getting back to the localhost access problem, it's worth noting that in the Windows 11 case, one should try installing a web browser inside the WSL and using the WSL's browser in order to open a localhost webpage. All the solutions for Windows 11 mentioned here haven't worked for me except this one.

Another important thing is that you can't use a VPN with WSL 2 (regardless of your OS) even if you've commented these lines:

external_sources:
  # - name: medium.com
  #   rss_url: https://medium.com/@al-folio/feed

In other words, you won't even be able to open the localhost webpage with a VPN on WSL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants