Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Tomcat Error after trying to Migrate Server

Shannon_Parker March 16, 2020

Hello,

I am trying to migrate our Confluence Server from a Windows 2012 R2 server to a Windows 2019 server.  I tired following steps I have found online; run the install up to the point of the startup page, shutting it down, copying all the old files to the new server and starting Confluence back up, but Tomcat throws a 500 error.  Have matching versions of Confluence and Java installed on both servers.

Here is the first lines of the "Exception" and "Root Cause" sections.  If more is needed, can provide.

org.apache.jasper.JasperException: org.apache.jasper.JasperException: java.lang.ClassNotFoundException: org.apache.jsp.errors_jsp

 

org.apache.jasper.JasperException: java.lang.ClassNotFoundException: org.apache.jsp.errors_jsp

 

Thank you for any help!

Shannon

1 answer

0 votes
Moses Thomas
Community Champion
March 16, 2020

@Shannon_Parker  We need more logs info,  please  provide <Confluence-home-dir>/logs/atlassian-confluence.log

Shannon_Parker March 16, 2020
Moses Thomas
Community Champion
March 16, 2020

@Shannon_Parker   After going  through the logs you have provided,  I have seen that you have performed upgrade and have restarted Confluence  after failure.

Possible Root cause

Some system plugins are disabled / did not start properly.

2020-03-13 15:33:33,955 INFO [Catalina-utility-4] [atlassian.plugin.manager.DefaultPluginManager] lambda$shutdown$5 Preparing to shut down the plugin system
2020-03-13 15:33:34,033 INFO [Catalina-utility-4] [atlassian.plugin.manager.DefaultPluginManager] lambda$shutdown$5 Shutting down the plugin system
2020-03-13 15:33:47,995 WARN [FelixStartLevel] [plugin.osgi.factory.OsgiBundlePlugin] disableInternal Cannot disable Bundle 'com.ibm.icu-64.1', not ACTIVE
2020-03-13 15:33:48,011 WARN [FelixStartLevel] [plugin.osgi.factory.OsgiBundlePlugin] disableInternal Cannot disable Bundle 'com.atlassian.plugin.jslibs', not ACTIVE
2020-03-13 15:33:48,167 WARN [FelixStartLevel] [plugin.osgi.factory.OsgiBundlePlugin] disableInternal Cannot disable Bundle 'com.atlassian.confluence.plugins.confluence-icons', not ACTIVE
2020-03-13 15:33:48,214 WARN [FelixStartLevel] [plugin.osgi.factory.OsgiBundlePlugin] disableInternal Cannot disable Bundle 'com.atlassian.confluence.plugins.confluence-editor-v4', not ACTIVE
2020-03-13 15:33:48,386 WARN [FelixStartLevel] [plugin.osgi.factory.OsgiBundlePlugin] disableInternal Cannot disable Bundle 'org.apache.servicemix.bundles.spring-tx-5.1.8.RELEASE_1', not ACTIVE
2020-03-13 15:33:48,386 WARN [FelixStartLevel] [plugin.osgi.factory.OsgiBundlePlugin] disableInternal Cannot disable Bundle 'org.apache.servicemix.bundles.spring-jdbc-5.1.8.RELEASE_1', not ACTIVE
2020-03-13 15:33:48,901 WARN [FelixStartLevel] [plugin.osgi.factory.OsgiBundlePlugin] disableInternal Cannot disable Bundle 'com.atlassian.plugins.atlassian-spring-interceptor-adapter-plugin-1.1', not ACT
IVE
2020-03-13 15:33:48,901 WARN [FelixStartLevel] [plugin.osgi.factory.OsgiBundlePlugin] disableInternal Cannot disable Bundle 'com.atlassian.plugin.atlassian-spring-scanner-runtime', not ACTIVE
2020-03-13 15:33:48,901 WARN [FelixStartLevel] [plugin.osgi.factory.OsgiBundlePlugin] disableInternal Cannot disable Bundle 'com.atlassian.plugin.atlassian-spring-scanner-annotation', not ACTIVE
2020-03-13 15:33:48,901 WARN [FelixStartLevel] [plugin.osgi.factory.OsgiBundlePlugin] disableInternal Cannot disable Bundle 'com.atlassian.platform.spring-velocity-support-0.0.7', not ACTIVE
2020-03-13 15:33:48,901 WARN [FelixStartLevel] [plugin.osgi.factory.OsgiBundlePlugin] disableInternal Cannot disable Bundle 'com.atlassian.oauth.atlassian-oauth-api-4.0.2', not ACTIVE
2020-03-13 15:33:48,917 WARN [FelixStartLevel] [plugin.osgi.factory.OsgiBundlePlugin] disableInternal Cannot disable Bundle 'com.atlassian.gadgets.atlassian-gadgets-spi-4.4.4', not ACTIVE
2020-03-13 15:33:48,917 WARN [FelixStartLevel] [plugin.osgi.factory.OsgiBundlePlugin] disableInternal Cannot disable Bundle 'com.atlassian.gadgets.atlassian-gadgets-api-4.4.4', not ACTIVE
2020-03-13 15:33:49,635 WARN [FelixStartLevel] [plugin.osgi.factory.OsgiBundlePlugin] disableInternal Cannot disable Bundle 'com.atlassian.bundles.json-20070829.0.0.1', not ACTIVE
2020-03-13 15:33:49,900 WARN [Catalina-utility-4] [plugin.osgi.factory.OsgiBundlePlugin] uninstallInternal OSGi container not running or undefined: Will not remove bundle listener and will not close packa
ge admin service

Resolution

How to reset all Confluence plugins back to their default state through the database 

 

Try and give feed  back

 

Kind regards,

MO

Shannon_Parker March 16, 2020

@Moses Thomas  Just tried; shutdown Confluence, ran the SQL statement, it said it affected one row, but still got the same error when I restarted the service.  I also noticed that I don't seem to be getting any new logs...  Not sure if that is an issue or if it is not even getting to the point of it generating logs.

Moses Thomas
Community Champion
March 16, 2020

@Shannon_Parker  Have you cleared plugin cache before restarting Confluence as mentioned in the documentation ?

Shannon_Parker March 16, 2020

@Moses Thomas Yes, renamed all the folders listed with a "_old" on the end, they were not recreated once I restarted Confluence.

Moses Thomas
Community Champion
March 16, 2020

@Shannon_Parker  There should be new logs generated could you share them?

Shannon_Parker March 16, 2020

@Moses Thomas I would, but when I look in the log folders the logs do not look to have been modified, everything still only has a time stamp of 3/13, I am not seeing any new logs being generated

Moses Thomas
Community Champion
March 16, 2020

@Shannon_Parker  Is Database running? what is DB  status ?  could you share  tomcat logs,  catalina.out   in  <confluence-installation-dir>/logs/catalina.out

Shannon_Parker March 16, 2020

@Moses Thomas The database is up an running, we are using a MS SQL database.  Here is the log that I found that somewhat matches the log you asked for.  I looked in a few different areas and did not see a "catalina.out" file

https://www.dropbox.com/s/niwhiufrwiw91v3/catalina.2020-03-13.log?dl=0

Moses Thomas
Community Champion
March 16, 2020

@Shannon_Parker 

13-Mar-2020 16:58:52.956 SEVERE [main] org.apache.catalina.startup.Catalina.stopServer Could not contact [localhost:8000] (base port [8000] and offset [0]). Tomcat may not be running.
13-Mar-2020 16:58:52.956 SEVERE [main] org.apache.catalina.startup.Catalina.stopServer Error stopping Catalina
 java.net.ConnectException: Connection refused: connect

Last record from the logs was connection refused.  Please ensure that Tomcat is running. by checking network status and see if there is a TCP connection establish at 8000  and  a java process is  available.   And  could you also state how you start Confluence which  user is starting Confluence ? Admin user  or  a  dedicated user ?

Shannon_Parker March 16, 2020

@Moses Thomas We have everything setup to run as a service, so the "Network Services" is the account running Tomcat.  Usually to start the service manually, use the "start_service.bat" file with an elevated command prompt in the Confluence folder and the "stop_service.bat" file to stop it.  I see a "tomcat9.exe" in Task Manager, it uses a good amount of CPU on start up, gets to about 80MB of memory, then CPU drops to 0, then try to see if we get to the home page, but it has the 500 error page up

Moses Thomas
Community Champion
March 16, 2020

@Shannon_Parker  OK now show me what you  have in  <jira-install>/bin/setenv.bat ,  I think i know now.

Shannon_Parker March 16, 2020

Alright, here is the contents of "setenv.bat";

 

https://www.dropbox.com/s/gnw3zrglsur6gv1/setenv.txt?dl=0

Moses Thomas
Community Champion
March 16, 2020

 

@Shannon_Parker 

These two guys in JAVA runtime  arguments are the ones  blocking Tomcat,  they  have been  deprecated in CONF 7.x

set CATALINA_OPTS=-XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=2M %CATALINA_OPTS%


set CATALINA_OPTS=-XX:-PrintGCDetails -XX:+PrintGCDateStamps -XX:-PrintTenuringDistribution %CATALINA_OPTS%

 

Just  change the set  to rem  which will  kick  them out of the way. :D  save and restart confluence we should be happy.

More also  you  can increase  JVM  memory you have,  But it's necessary  depending on how  large is  your instance.

set CATALINA_OPTS=-Xms1024m -Xmx1024m -XX:+UseG1GC %CATALINA_OPTS%

 

increasing available memory

 So i would add  -Xmx 512  more

set CATALINA_OPTS=-Xms1024m -Xmx1548m -XX:+UseG1GC %CATALINA_OPTS%

Shannon_Parker March 16, 2020

@Moses Thomas 

Made the "rem" changes, saw "tomcat9.exe" spin up and stop at about 80MB again and CPU dropped to 0, Tomcat9.exe stays running, but when I browse to http://localhost:8090 still get the error screen.  What I find odd is I rename the "Atlassian" folder in "Program Files" to "_old" and put the original files back and everything loads up fine and I am taken to the startup pages (asking for license info and SQL database connection).  It only seems to break when I try to start the service with the file structure from the old server we are trying to migrate from.

Moses Thomas
Community Champion
March 16, 2020

@Shannon_Parker   Yes because when you copy all files to new server,  You will have a  different setting

one  more file is important to  modify, we have done something with setenv.bat

now  in <Confluence-install-dir>/conf/server.xml

the database  setting is in this file/Tomcat setting. This file must correlate with the new server. Tomcat has been configured not to  show  anything when you enter

http://localhost:8090.  Since tomcat is running,  then you need to  be sure that the database URL is correct  in the server.xml.  It should work.

Shannon_Parker March 17, 2020

@Moses Thomas   

I am not seeing anything in the server.xml about Tomcat, mostly everything in that file is commented out except for the last part at the bottom, looks to be something with the Engine name, and nothing related to the database URL.  Is that something that I need to add?  I do not ever remember needing to edit the XML before.

Moses Thomas
Community Champion
March 17, 2020

@Shannon_Parker  Please share the file

Moses Thomas
Community Champion
March 17, 2020

@Shannon_Parker   let gets this clear, do you have two  installation  folders  old  and new ?  or  just  the  old installation folders  your copied  from old server ?

Shannon_Parker March 17, 2020

@Moses Thomas 

I have two different installation folders; one from the initial install on the new server, renamed to "_old" then I have the copied over installation folders from the old server on the new server

Moses Thomas
Community Champion
March 17, 2020

@Shannon_Parker  I  though so as it clear now,  look at  the server.xml   in old and new are they  the same, i think not. 

  • Have you change database host ?
  • Please share the old server.xml  file
  • Next  we may need to  copy this file to  replace server.xml  file  on the new server
Shannon_Parker March 17, 2020

@Moses Thomas 

Database host is the same, that server.xml is the old server's xml file.  Both xml files from the fresh install and the old server xml are the same.

Moses Thomas
Community Champion
March 17, 2020

@Shannon_Parker   OK   i get why it is  like this,  with all  i think Confluence should start.  May be you lack  space on your server to  load class 

org.apache.jasper.JasperException: java.lang.ClassNotFoundException: org.apache.jsp.errors_jsp

Try this resolution   Confluence starts up with error message Unable to load class for JSP 

 

Good luck!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
7.2.1
TAGS
AUG Leaders

Atlassian Community Events