Skip to content

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

@wilkinsona

Description

@wilkinsona

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions