Unable to Change JIRA's URL (EAR WAR installation)
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. 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
Symptoms
When configuring the EAR-WAR installation, after changing the URL in jira.xml, the new url is not working. The following error is thrown in the logs:
09:52:01,706 ERROR [ManagerBase:372\] IOException while loading persisted sessions: java.io.EOFException
java.io.EOFException
at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2228)
at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2694)
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:761)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:277)
at org.apache.catalina.util.CustomObjectInputStream.<init>(CustomObjectInputStream.java:5
Cause
In addition to changing the context path, you must rename the file jira.xml to reflect your new url. For example, if you changed your url from http://mycompany.com/jira to http://mycompany.com/omgbugs then you need to rename jira.xml to omgbugs.xml. If you haven't done this, your new url will not work.
Whenever Catalina is shut down normally and restarted, or when an application reload is triggered, the standard Manager implementation will attempt to serialize all currently active sessions to a disk file located via the pathname attribute. All such saved sessions will then be deserialized and activated (assuming they have not expired in the mean time) when the application reload is completed.
Resolution
- Stop the tomcat server.
- Delete the deployed "jira" folder in $CATALINA/webapps
- Rename the $CATALINA/conf/Catalina/localhost/jira.xml to $CATALINA/conf/Catalina/localhost/omgbugs.xml
- Rename the context path in the $CATALINA/conf/Catalina/localhost/omgbugs.xml as following:
<Context path="/omgbugs"
- Modify the configuration in $CATALINA/conf/Catalina/localhost/omgbugs.xml from:
... <Manager className="org.apache.catalina.session.PersistentManager" saveOnRestart="false"/> ...
... <Manager pathname=""/> ...
For more information, please refer to these pages: