简体   繁体   English

Jelastic GC代理不适用于Tomcat 8.5.x.

[英]Jelastic GC agent does not work with Tomcat 8.5.x

I use Jelastic platform from different providers: dogado.de (Jelastic version is 4.6.2) and mirhosting.com (Jelastic version is 4.6.1). 我使用来自不同提供商的Jelastic平台: dogado.de (Jelastic版本是4.6.2)和mirhosting.com (Jelastic版本是4.6.1)。 I have some environments on both platforms. 我在两个平台上都有一些环境。 These environments have next configuration: 这些环境有下一个配置:

  • Java 8 Java 8
  • Apache Tomcat 8.5.3 Apache Tomcat 8.5.3
  • MySQL 5.7.10 MySQL 5.7.10

The Tomcat prints next info to the log file: Tomcat将下一个信息打印到日志文件:

  • Server version: Apache Tomcat/8.5.3 服务器版本:Apache Tomcat / 8.5.3
  • Server number: 8.5.3.0 服务器号:8.5.3.0
  • OS Name: Linux 操作系统名称:Linux
  • OS Version: 2.6.32-042stab113.21 操作系统版本:2.6.32-042stab113.21
  • Architecture: amd64 架构:amd64
  • Java Home: /usr/java/jdk1.8.0_72/jre Java主页:/usr/java/jdk1.8.0_72/jre
  • JVM Version: 1.8.0_72-b15 JVM版本:1.8.0_72-b15
  • JVM Vendor: Oracle Corporation JVM供应商:Oracle Corporation
  • CATALINA_BASE: /opt/repo/versions/8.5.3 CATALINA_BASE:/opt/repo/versions/8.5.3
  • CATALINA_HOME: /opt/repo/versions/8.5.3 CATALINA_HOME:/opt/repo/versions/8.5.3

I'm trying to enable Jelastic GC agent . 我正在尝试启用Jelastic GC代理 So I changed the conf/variables.conf file, so now it contains next lines: 所以我更改了conf / variables.conf文件,所以它现在包含下一行:

-javaagent:/opt/repo/versions/8.5.3/lib/jelastic-gc-agent.jar=debug=true,period=60

It means that the debug mode should be enabled now and the agent must print every 60 seconds the info about memory releasing. 这意味着现在应该启用调试模式,并且代理必须每60秒打印一次有关释放内存的信息。 For previous Tomcat version (7.0.39; on the same platform, but another environment) it looks like this: 对于以前的Tomcat版本(7.0.39;在同一平台上,但在另一个环境中),它看起来像这样:

Jul 14, 2016 6:08:30 PM com.jelastic.java.gc.JelasticGCAgent$1 run
INFO: JelasticGCAgent - Start Full GC : [free memory] : 181834896 bytes
Jul 14, 2016 6:08:30 PM com.jelastic.java.gc.JelasticGCAgent$1 run
INFO: JelasticGCAgent - Finish Full GC : [free memory] : 74885120 bytes

But it does not work for Tomcat 8: memory usage is not changing at all time, there are no any new messages in the log file. 但它对Tomcat 8不起作用:内存使用率一直没有变化,日志文件中没有任何新消息。 I asked supports of these providers how to fix this issue, but the issue still there. 我问过这些提供商的支持如何解决这个问题,但问题仍然存在。 And even more it looks like a bug in Jelastic agent or in the whole platform. 甚至更多它看起来像是Jelastic代理或整个平台中的错误。

Did anybody face with the same issue already? 有没有人面对同样的问题? Any known ways to fix it? 任何已知的方法来解决它? Maybe I need to use another jar files? 也许我需要使用另一个jar文件?

Any ideas are welcome and of course I want to ask Jelastic team about this problem. 欢迎任何想法,当然我想问问Jelastic团队这个问题。

It seems to be a problem with configuration file for variables parsing. 对于变量解析,配置文件似乎有问题。

As a workaround: 作为解决方法:

  1. log into your Tomcat node via SSH 通过SSH登录到Tomcat节点
  2. navigate to /opt/repo/versions/8.5.3/bin/ 导航到/opt/repo/versions/8.5.3/bin/
  3. edit variablesparser.sh file and change the third line from 编辑variablesparser.sh文件并更改第三行

CONFFILE='/opt/repo/versions/${Version}/conf/variables.conf' CONFFILE = '/选择/回购/版本/ $ {}版本/conf/variables.conf'

to

CONFFILE="/opt/repo/versions/${Version}/conf/variables.conf" CONFFILE = “/选择/回购/版本/ $ {}版本/conf/variables.conf”

  1. restart Tomcat 重启Tomcat

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM