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

polymer serve no longer chooses unused ports #2403

Open
davidmaxwaterman opened this issue Apr 19, 2017 · 7 comments
Open

polymer serve no longer chooses unused ports #2403

davidmaxwaterman opened this issue Apr 19, 2017 · 7 comments

Comments

@davidmaxwaterman
Copy link

Description

Running polymer serve more than once used to work because it would choose unused ports, but that no longer happens and it always chooses 8081.

Versions & Environment

  • Polymer CLI:0.18.0
  • node:v7.8.0
  • Operating System:WSL - Linux DESKTOP-2RF28S0 4.4.0-43-Microsoft window.Loader name conflict #1-Microsoft Wed Dec 31 14:42:53 PST 2014 x86_64 x86_64 x86_64 GNU/Linux

Steps to Reproduce

  1. run polymer serve&
  2. run another polymer serve&

Expected Results

The second one should choose a different port to the first one, presumably the 'next' one from this list:
https://github.com/Polymer/polyserve/blob/master/src/start_server.ts#L458

Actual Results

The both choose port 8081.

@davidmaxwaterman
Copy link
Author

I notice that polymer serve -h says that the port defaults to 8080 - that is clearly not correct since it defaults to 8081. It used to be 8080 'some time ago', but hasn't been for quite a while.

@FredKSchott
Copy link
Contributor

@davidmaxwaterman thanks for filing. I actually can't reproduce on my machine and your version of the CLI:

$ polymer serve&
$ info:    Files in this directory are available under the following URLs
      applications: http://127.0.0.1:8000
      reusable components: http://127.0.0.1:8000/components/fschott/
    
$ polymer serve&
$ info:    Files in this directory are available under the following URLs
      applications: http://127.0.0.1:8001
      reusable components: http://127.0.0.1:8001/components/fschott/
    
$ polymer serve&
$ info:    Files in this directory are available under the following URLs
      applications: http://127.0.0.1:8003
      reusable components: http://127.0.0.1:8003/components/fschott/

This may be a windows only bug. I'll try to prioritize this for someone to get on a Windows machine and debug.

If anyone else is seeing this please comment and let us know!

@jsilvermist
Copy link
Contributor

Working as intended with node 6.10.2 and polymer-cli 0.18.0 on Windows 10 here, though the comment in help does refer to the wrong default port.

Maybe it's a Node 7 + Windows 10 bug?

@davidmaxwaterman
Copy link
Author

Are you using WSL? I bet it's something to do with the new CU version of Windows recently released.

@H3dz
Copy link

H3dz commented May 3, 2017

I have the same issue on Windows10.

Default port is 8081 and if it's used the next ones are 8001 and 8002.

Specifying the port with (polymer serve -p 8080) works.

I'm using:
-node v6.10.3
-polymer: 0.18.1

It started when I updated to Polymer 2.0.

@djm158
Copy link

djm158 commented May 7, 2018

I've seen this issue in Windows 10 with WSL.

node v8.10.0
polymer v1.6.0

In the following scenarios:

  • one WSL instance while in 2 different tmux sessions.
  • two separate WSL instances

polymer serve uses port 8081

In the following scenario:

  • two instances of git bash for windows

polymer serve correctly uses ports 8081 and 8080

@stale
Copy link

stale bot commented Mar 3, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Mar 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants