heapdump file must have .hprof extention
javax.management.RuntimeMBeanException: java.lang.IllegalArgumentException: heapdump file must have .hprof extention
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrow(DefaultMBeanServerInterceptor.java:839)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrowMaybeMBeanException(DefaultMBeanServerInterceptor.java:852)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:821)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
at com.tongweb.server.monitor.snapshot.Generater.generateJmap(Generater.java:440)
at com.tongweb.server.monitor.snapshot.Generater.generateJmaporJstack(Generater.java:476)
at com.tongweb.server.monitor.snapshot.Generater.access$300(Generater.java:27)
at com.tongweb.server.monitor.snapshot.Generater$4.run(Generater.java:172)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalArgumentException: heapdump file must have .hprof extention
at sun.management.HotSpotDiagnostic.dumpHeap(HotSpotDiagnostic.java:51)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71)
at sun.reflect.GeneratedMethodAccessor58.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275)
at com.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(ConvertingMethod.java:193)
at com.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(ConvertingMethod.java:175)
at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(MXBeanIntrospector.java:117)
at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(MXBeanIntrospector.java:54)
at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237)
at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138)
at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252)
at javax.management.StandardMBean.invoke(StandardMBean.java:405)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
... 6 more
1、具体原因:
TongWeb快照功能通过jmap生成内存镜像文件名为heap.bin, 而某些JDK要求以.hprof为后缀。
解决方式一:
1、在TongWeb/bin/external.vmoptions添加-XX:+HeapDumpOnOutOfMemoryError
2、或者在tongweb的控制界面(9060/console)启动参数配置去添加
解决方式二:
1、在TongWeb/bin/external.vmoptions修改启动参数Xmx、-XX:MaxPermSize调大一点重启TongWeb
2、也可以在tongweb控制台->启动参数设置去修改
解决方式三:最优解推荐使用
1、 将TongWeb的快照关闭
2、 只关闭jmap生成功能。