Upgrade Fails due to java.lang.IllegalArgumentException: port out of range

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible


When performing an upgrade for Confluence, the shutdown port cannot be set to a negative number. The Shutdown port provides an OS neutral way to close a Tomcat application (Confluence, Jira, etc.). This value must be set to a non-negative number.




The upgrade process fails before completion. Reviewing the logs, we find the following:

Your instance of Confluence is currently being upgraded.
Checking if Confluence has been shutdown...
In action "Check Confluence is shut [Run script]" (screen "Upgrade Actions [Form]"), property "Script":
java.lang.IllegalArgumentException: port out of range:-1
at java.base/java.net.InetSocketAddress.checkPort(Unknown Source)
at java.base/java.net.InetSocketAddress.<init>(Unknown Source)
at com.atlassian.inception.TomcatChecker.isTomcatRunning(TomcatChecker.java:15)
at com.install4j.script.I4jScript_Internal_72.eval(I4jScript_Internal_72.java:5)
at com.install4j.script.I4jScript_Internal_72.evaluate(I4jScript_Internal_72.java:*40)
at com.install4j.runtime.installer.helper.Script.evaluate(Script.java:33)
at com.install4j.runtime.installer.ContextImpl.runScript(ContextImpl.java:202)


The shutdown port is using an invalid port number. 


Update the shutdown port value. The shutdown port can be found at the very top of the server.xml file:

<Server port="7999" shutdown="SHUTDOWN" debug="0">
    <Service name="Tomcat-Standalone">

In order to resolve the port out of range error during an upgrade, we'll have to update the port value of the server.xml file to a non-negative value.

Last modified on Jan 21, 2021

Was this helpful?

Provide feedback about this article
Powered by Confluence and Scroll Viewport.