Not able to change default port

We are getting error while running the project on a different port (8090)

[INFO] Scanning for projects…
[INFO] -----------------------< org.example:myproject >------------------------
[INFO] Building My Project 0.1.0-SNAPSHOT
[INFO] --------------------------------[ pom ]---------------------------------
[INFO] — maven-enforcer-plugin:1.4:enforce (enforce-maven-versions) @ myproject —
[INFO] — build-helper-maven-plugin:3.0.0:regex-property (property-commandline-offline) @ myproject —
[INFO] No match to regex ‘“true”’ found in ‘“false”’. The initial value ‘“false”’ is left as-is…
[INFO] — build-helper-maven-plugin:3.0.0:regex-property (property-commandline-online) @ myproject —
[INFO] — cargo-maven2-plugin:1.7.3:start (cargo-run) @ myproject —
[INFO] [talledLocalContainer] Tomcat 9.x starting…
[INFO] [stalledLocalDeployer] Deploying [/root/myproject/cms/target/cms] to [/root/myproject/target/tomcat9x/webapps]…
[INFO] [stalledLocalDeployer] Deploying WAR by creating Tomcat context XML file in [/root/myproject/target/tomcat9x/conf/Catalina/localhost]…
[INFO] [stalledLocalDeployer] Deploying [/root/myproject/essentials/target/essentials] to [/root/myproject/target/tomcat9x/webapps]…
[WARNING] [talledLocalContainer] org.codehaus.cargo.container.ContainerException: Port number 8080 (defined with the property cargo.servlet.port) is in use. Please free it on the system or set it to a different port in the container configuration.
[ERROR] Starting container [org.codehaus.cargo.container.tomcat.Tomcat9xInstalledLocalContainer@6a0cbc6f] failed, now stopping container
[INFO] [talledLocalContainer] Tomcat 9.x is stopping…
[WARNING] [talledLocalContainer] ERROR: transport error 202: bind failed: Address already in use
[WARNING] [talledLocalContainer] ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
[WARNING] [talledLocalContainer] JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [debugInit.c:750]

1 Like

Have you tried to see this [1], right?


1 Like

[WARNING] [talledLocalContainer] ERROR: transport error 202: bind failed: Address already in use

Looks like some other application is already running on that port. Perhaps a previous instance of the same project didn’t terminate?

1 Like

Thanks for the reply.
8080 port is already used for other projects in the same server, so can we use custom port to run in 8090 instead of 8080 port?

yeah in that server other projects are running in 8080 port, so can we change the port to 8090 instead of 8080?