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

#### Still need help?

The Atlassian Community is here for you.

Platform Notice: Server and Data Center Only - This article only applies to Atlassian products on the server and data center platforms.

# Summary

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.

7.6.0
.

# Diagnosis

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

......
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 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)

# Cause

The shutdown port is using an invalid port number.

# Solution

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.