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

PortInUseException can be thrown when server address is wrong #21101

Closed
simasch opened this issue Apr 23, 2020 · 1 comment
Closed

PortInUseException can be thrown when server address is wrong #21101

simasch opened this issue Apr 23, 2020 · 1 comment
Assignees
Labels
type: bug A general bug
Milestone

Comments

@simasch
Copy link

simasch commented Apr 23, 2020

I'm using Spring Boot 2.2.6 with the embedded Tomcat server.

When I set the server.address property to a number then it seems to be a valid InetAddress.

For example:

server.address=12346

Unfortunately then I get a this error message:

Web server failed to start. Port 8080 was already in use.

This is very misleading because the error is not that Port 8080 is in use but that the IP address is invalid.

Can you improve this error message?

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Apr 23, 2020
@philwebb philwebb added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Apr 23, 2020
@philwebb philwebb modified the milestones: 2.1.x, 2.2.x Apr 23, 2020
@philwebb philwebb self-assigned this Apr 23, 2020
@philwebb philwebb changed the title Improve Error Message when server.address is wrong PortNotFoundException can be thrown when server address is wrong Apr 23, 2020
@philwebb philwebb changed the title PortNotFoundException can be thrown when server address is wrong PortInUseException can be thrown when server address is wrong Apr 23, 2020
@philwebb
Copy link
Member

Interesting find, thanks for reporting it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

3 participants