Skip to content
Advertisement

Why after that I quit a Spring Boot application in a Linux shell (by CTRL+Z) a process still listen on the 8080 port? (the port used by my application

I am working on a Spring Boot application running it on a Linux machine. It is a batch application containing Spring Boot Admin tool listening on the 8080 port.

I have the following “problem”: I run it into my shell for the first time using this command:

JavaScript

it correctly start and I can access to the Spring Boot Admin tool panel at this address http://localhost:8080/

Supse that I stop my batch application execution clicking CTRL+Z on my keyboard, so the Spring Boot application is now stopped and I obtain this output message:

JavaScript

Ok, now if I run again my application by the same start command:

JavaScript

now I am obtaining this error message:

JavaScript

So if I perform this command to find the process that is listening on port 8080:

JavaScript

If now that I killed the previous process I restart again my Spring Boot application it will be started without problem.

Why if I quit a Spring Boot application listening on the 8080 port (using CTRL+Z into the Linux shell), this process still listen on this port? I expected that the entire application will be killed and that nothing listen on the port

Advertisement

Answer

Ctrl + Z doesn’t kill the application but suspend it and put it in background, use Ctrl + C if you want to abort the running application.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement