I am using Intellij Idea IDE version 2019.2.3 and I want to run two instances of my spring boot application in different ports, but I got just one running instance. I start the application in the port 8081 and after it runs, I change the port to 8083 and run it again in parallel with the previous one but i got this error :
`The Tomcat connector configured to listen on port 8083 failed to start. The port may already be in use or the connector may be misconfigured.
And when I come to the browser i found that the first port stopped working, when the application runs successfully in the last port`
I have tried to add a new "run configuration" but got the same problem.
Use the VM options field of the Sprint Boot run/debug configuration to define the port via the
-Dserver.port=9090
property. If the ports are different, you'll be able to start multiple instances:
The screenshot shows 2 run configurations started at the same time, one has -Dserver.port=9090
VM option, another has -Dserver.port=9091
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With