Upgrade Fails due to java.lang.IllegalArgumentException: port out of range
Platform Notice: Server and Data Center Only - This article only applies to Atlassian products on the server and data center platforms.
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.