WSL: Using LocalForward gives error and then new port is unavailable to other bash windows

A brief description

I’m using a LocalForward to make a remote couchdb instance available at localhost:5984 with the following config:

Host server
HostName hostname
User username
LocalForward 5984 localhost:5984

When I run ssh server I get the following error:

bind: Address already in use

The thing is that on the Windows side in chrome, I can hit localhost:5984, but when I curl http://localhost5984 in a new bash window I get the following error:

curl: (7) Couldn't connect to server

Expected results

Bash and windows should both be able to access LocalForward port

Actual results (with terminal output if applicable)

Windows can access LocalForward port, but Bash cannot

Your Windows build

Windows 10 Anniversary Edition

Steps / commands required to reproduce the error

Set up LocalForward Verify port is accessible in Windows Curl port in bash to verify inaccessibility

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Reactions: 19
  • Comments: 16 (2 by maintainers)

Most upvoted comments

@richiepreece, ah, sorry, I had not read your report sufficiently carefully. I can confirm that I am seeing the exact same behaviour as you – native Windows apps (e.g. Edge) can access the forwarded port, but it seems to be unavailable from WSL.