0
votes

I am running into an issue where I am unable to shutdown the Liferay 6.2 tomcat bundle on the server via the bundled shutdown script on the new linux server.

The steps I took are:

  • Installed the bundle by unziping it.
  • Uploaded the custom portal-ext.properties in the default liferay home folder
  • Change the memory args as defined in the deployment best practices guide in the tomcat home/bin/setenv.sh
  • Added Oracle custom data source in the tomcat home/conf/context.xml
  • JDK - jdk1.7.0_75
  • Navigate to the tomcat home/bin folder -> run ./startup.sh
  • Liferay and the bundle comes up.
  • To shutdown - Navigate to the tomcat home/bin folder -> run ./shutdown.sh
  • This displays the following but the tomcat is not shutdown:
$ ./shutdown.sh
Using CATALINA_BASE:   /.../liferay-portal-6.2-ee-sp2/tomcat-7.0.42
Using CATALINA_HOME:   /.../liferay-portal-6.2-ee-sp2/tomcat-7.0.42
Using CATALINA_TMPDIR: /.../liferay-portal-6.2-ee-sp2/tomcat-7.0.42/temp
Using JRE_HOME:        /.../java/jdk1.7.0_75
Using CLASSPATH:       /.../liferay-portal-6.2-ee-sp2/tomcat-7.0.42/bin/bootstrap.jar:/.../liferay-portal-6.2-ee-sp2/tomcat-7.0.42/bin/tomcat-juli.jar

I see the following in the Tomcat logs.

apr 27, 2015 1:18:23 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [org.python.google.common.base.internal.Finalizer] but has failed to stop it. This is very likely to create a memory leak.
Apr 27, 2015 1:18:23 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [MulticastListener-239.255.0.523305] but has failed to stop it. This is very likely to create a memory leak.
Apr 27, 2015 1:18:23 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [pool-3-thread-1] but has failed to stop it. This is very likely to create a memory leak.
Apr 27, 2015 1:18:29 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/opensocial-portlet] appears to have started a thread named [com.google.inject.internal.Finalizer] but has failed to stop it. This is very likely to create a memory leak.
Apr 27, 2015 1:18:45 PM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["http-bio-8080"]
Apr 27, 2015 1:18:45 PM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["ajp-bio-8009"]
Apr 27, 2015 1:18:45 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-bio-8080"]
Apr 27, 2015 1:18:45 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["ajp-bio-8009"]
  • The tomcat process is still showing after a few minutes as an active process and needs to be killed manually. Liferay seems to be down after the shutdown script is run within a minute or so.

I need this to work so all the resources are released cleanly and I can script the startup and shutdown as needed.

Has anyone seen this and resolved this behavior? Any insight would be much appreciated.

Thanks!

1
Does it shutdowns properly if you uninstall all the webapps? By simply removing everything in the webapps folder (webapps is the default, it may be named otherwise. Anyways, it's the directory that contains your opensocial-portlet app). Also, you can try to start tomcat in debug mode and keep it in the front with the jpda run start arguments to catalina.sh.Johnride
I can't uninstall all webapps as its part of liferay tomcat bundle. I did uninstall the opensocial-portlet. This gets rid of the portlet specific issue in the logs on shutdown but not the other 3. I will try your other suggestion and let you know. ThanksVC1

1 Answers

0
votes

After working through this issue and following the steps below, the tomcat process shuts down within a minute or so with the shutdown script and there is no need to kill the process manually.

  • increased maxpermsize catalina_opts argument to 512m (was 200m) in the setenv.sh - this resolved 2 of the memory leak messages in the logs at shutdown and also resulted in the tomcat process shutdown properly.
  • removing the opensocial-portlet removed 1 memory leak error prior to the maxpermsize change but the process was still not shutdown properly.
  • there is 1 remaining memory leak error in the logs on shutdown but that for now is not preventing the tomcat from shutting down and seems to be part of tomcat not necessarily caused by liferay. This message for now seems safe to ignore per this LPS issue below https://issues.liferay.com/browse/LPS-34498

Hope this helps someone.