WSL icon indicating copy to clipboard operation
WSL copied to clipboard

Unable to access jekyll website hosted at 127.0.0.1:4000 served through Bash [Windows 10 Insider build #14951]

Open keeratsingh opened this issue 10 years ago • 5 comments

  • A brief description I am unable to access a jekyll website hosted at 127.0.0.1:4000 served through Bash [Windows 10 Insider build #14951] It says the host refused the connection. This works on a previous build #14393 as tested by rolling back to a previous build.
  • Expected results The website is hosted and accessible at 127.0.0.1:4000
  • Actual results (with terminal output if applicable) It says the host refused the connection when trying to access the website through a web browser Configuration file: /mnt/d/OneDrive/Projects/keeratsingh.github.io/_config.yml Source: source Destination: _site Incremental build: disabled. Enable with --incremental Generating... done in 5.621 seconds. Auto-regeneration: enabled for 'source' Configuration file: /mnt/d/OneDrive/Projects/keeratsingh.github.io/_config.yml Server address: http://127.0.0.1:4000/ Server running... press ctrl-c to stop.
  • Your Windows build number 14951
  • Steps / All commands required to reproduce the error from a brand new installation Build a jekyll website by: jekyll serve --force_polling

keeratsingh avatar Oct 28 '16 04:10 keeratsingh

@keeratsingh Could you check your firewall to see if port 4000 allows incoming connections?

benhillis avatar Oct 31 '16 21:10 benhillis

@benhillis Here is an output from the cmd prompt C:\WINDOWS\system32>telnet 127.0.0.1 4000 Connecting To 127.0.0.1...Could not open connection to the host, on port 4000: Connect failed

  • I have even tried setting an inbound rule from the firewall, it still doesn't open the port
  • The same problem exists with build 14959 as well. Given below is the screenshot as seen the jekyll site is build and hosted at 127.0.0.1:4000
  • netstat -an | find "4000" shows no 4000 port open

jekyll

keeratsingh avatar Nov 05 '16 06:11 keeratsingh

  • Jekyll site build and hosted at 127.0.0.1:4000 works if I use the Jekyll on windows package through command prompt and not bash as seen in the screenshot below.
  • netstat -an | find "4000" shows ports open and listening, which is not seen in case of Bash.

jekyll2

keeratsingh avatar Nov 06 '16 22:11 keeratsingh

@keeratsingh - Thanks for trying out WSL. It's working fine for me on build 14955 (I haven't tried on previous build and I don't see any reasons why it shouldn't be working on previous builds as well). Anyways, I used the sample Jekyll site from here for testing (Note that I have no affiliation to it).

Steps I followed:

  1. git clone the above repo
  2. Jekyll serve

jekyll

sunilmut avatar Nov 10 '16 01:11 sunilmut

As confirmed recently. This is working for me in Windows 10 Version 1607 OS Build 14393. Closing the issue.

keeratsingh avatar Apr 16 '17 04:04 keeratsingh