Skip to content

Embedded web servers behave inconsistently when server.port is set to -1 #17073

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

Open
wilkinsona opened this issue Jun 5, 2019 · 2 comments
Open
Labels
status: pending-design-work Needs design work before any code can be developed type: task A general task
Milestone

Comments

@wilkinsona
Copy link
Member

The behaviour is as follows when starting with server.port=-1:

  • Jetty: app starts and stays running, but is not listening for HTTP connections
  • Netty: app fails to start as -1 is an illegal port number
  • Tomcat: app starts and stays running, but is not listening for HTTP connections
  • Undertow: app starts and then stops

Further to the above, the way that autoStart is implemented at the moment is a little odd. When a web server is created with autoStart set to false, calling start() on that server will then have no effect and there's no way to set autoStart back to true so that the web server can be started. In other words, it's not really disabling automatic start, but disabling start altogether.

@wilkinsona wilkinsona added type: bug A general bug for: team-attention An issue we'd like other members of the team to review status: pending-design-work Needs design work before any code can be developed labels Jun 5, 2019
@wilkinsona wilkinsona added this to the 2.1.x milestone Jun 5, 2019
@wilkinsona
Copy link
Member Author

We'd like to align Netty and Undertow with Jetty and Tomcat. We'll decide if the fix should go in 2.1.x or if it should wait till 2.2 depending on how risky it seems.

@wilkinsona wilkinsona removed the for: team-attention An issue we'd like other members of the team to review label Jun 7, 2019
@sandeshm22

This comment has been minimized.

@philwebb philwebb modified the milestones: 2.1.x, 2.2.x Jun 10, 2020
@philwebb philwebb modified the milestones: 2.2.x, 2.3.x Dec 16, 2020
@philwebb philwebb added the for: team-meeting An issue we'd like to discuss as a team to make progress label Jun 1, 2021
@wilkinsona wilkinsona modified the milestones: 2.3.x, 2.4.x Jun 10, 2021
@philwebb philwebb modified the milestones: 2.4.x, 2.6.x Jul 9, 2021
@philwebb philwebb added type: task A general task and removed for: team-meeting An issue we'd like to discuss as a team to make progress type: bug A general bug labels Jul 9, 2021
@philwebb philwebb modified the milestones: 2.6.x, 3.x Aug 23, 2021
@scottfrederick scottfrederick added the status: blocked An issue that's blocked on an external project change label Nov 1, 2021
@wilkinsona wilkinsona added the for: team-meeting An issue we'd like to discuss as a team to make progress label Apr 26, 2022
@philwebb philwebb removed the for: team-meeting An issue we'd like to discuss as a team to make progress label Jun 22, 2022
@wilkinsona wilkinsona removed the status: blocked An issue that's blocked on an external project change label Apr 25, 2025
@wilkinsona wilkinsona modified the milestones: 3.x, 4.0.x Apr 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: pending-design-work Needs design work before any code can be developed type: task A general task
Projects
None yet
Development

No branches or pull requests

4 participants