liferay 6.2-tomcat包关闭问题

ymdaylpp  于 2021-07-13  发布在  Java
关注(0)|答案(1)|浏览(279)

我遇到了一个问题,无法通过新linux服务器上的捆绑关闭脚本关闭服务器上的liferay 6.2 tomcat捆绑包。
我采取的步骤是:
通过解压来安装捆绑包。
在默认的liferay主文件夹中上载了自定义portal-ext.properties
按照tomcat home/bin/setenv.sh中的deployment best practices guide中的定义更改内存参数
在tomcat home/conf/context.xml中添加了oracle自定义数据源
jdk-jdk1.7.0\U 75
导航到tomcat home/bin文件夹->run./startup.sh
liferay和包裹出现了。
关闭-导航到tomcat home/bin文件夹->run./shutdown.sh
这将显示以下内容,但tomcat没有关闭:

$ ./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

我在tomcat日志中看到了以下内容。

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"]

tomcat进程在几分钟后仍然显示为活动进程,需要手动终止。关闭脚本运行一分钟左右后,liferay似乎已关闭。
我需要这个工作,所以所有的资源都被释放干净,我可以脚本启动和关闭需要。
有人看到这一点并解决了这一行为吗?如有任何见解,将不胜感激。
谢谢!

voase2hg

voase2hg1#

完成此问题并执行以下步骤后,tomcat进程将在一分钟左右的时间内使用shutdown脚本关闭,无需手动终止进程。
在setenv.sh中将maxpermsize catalina\u opts参数增加到512m(原来是200m)-这解决了关闭时日志中的2条内存泄漏消息,还导致tomcat进程正确关闭。
删除OpenSocialPortlet在maxpermsize更改之前删除了1个内存泄漏错误,但是进程仍然没有正确关闭。
关闭时日志中还有1个剩余内存泄漏错误,但目前这并不能阻止tomcat关闭,而且似乎是tomcat的一部分,不一定是由liferay引起的。根据下面的lps问题,现在可以安全地忽略此消息https://issues.liferay.com/browse/lps-34498
希望这对别人有帮助。

相关问题