我試圖在我的tomcat上安裝Jolokia。Jolokia當響應太大時崩潰
http://myserver/jolokia/read/Catalina:type=ThreadPool,name=*/
我得到的是這種
{ 「ERROR_TYPE」: 「javax.management.RuntimeOperationsException」, 「錯誤」: 「javax.management.RuntimeOperationsException :異常調用方法 readBufSize」 「status」:500,「stacktrace」:「javax.management.RuntimeOperationsException: 異常調用方法readBufSize \ n \ tat org.apache.tomcat.util.modeler.BaseModelMBean.getAttribute(BaseModelMBean.java:197)\ n \ tat com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(De faultMBeanServerInterceptor.java:647)\n\tat com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(JmxMBeanServer.java:678)\ n \ tat org.jolokia.handler.ReadHandler.getAttribute(ReadHandler.java:208) \ n \ tat org.jolokia.handler.ReadHandler.fetchAttributes(ReadHandler.java:158)\ n \ tat org.jolokia.handler.ReadHandler.fetchAttributesForMBeanPattern(ReadHandler.java:97)\ n \ tat org.jolokia org.jolokia.handler.ReadHandler.doHandleRequest(ReadHandler.java:34)\ n \ tat org.jolokia.handler.JsonRequestHandler.handleRequest(JsonRequestHandler .java:150)\ n \ tat org.jolokia.backend.MBeanServerHandler.dispatchRequest(MBeanServerHandler.java:91)\ n \ tat org.jolokia.backend .LocalRequestDispatcher.dispatchRequest(LocalRequestDispatcher.java:81)\ n \ tat org.jolokia.backend.BackendManager.callRequestDispatcher(BackendManager.java:196)\ n \ tat org.jolokia.backend.BackendManager.handleRequest(BackendManager.java :175)\ n \ tat org.jolokia.http.HttpRequestHandler.executeRequest(HttpRequestHandler.java:150)\ n \ tat org.jolokia.http.HttpRequestHandler.handleGetRequest(HttpRequestHandler.java:79)\ n \ tat org.jolokia.http.AgentServlet $ 3.handleRequest(AgentServlet.java:239)\ n \ tat org.jolokia.http.AgentServlet.handle(AgentServlet.java:200)\ n \ tat org.jolokia.http.AgentServlet .doGet(AgentServlet.java:183)\ n \ tat javax.servlet.http.HttpServlet.service(HttpServlet.java:621)\ n \ tat javax.servlet.http.H ttpServlet.service(HttpServlet.java:728)\ n \ tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)\ n \ tat org.apache.catalina.core.ApplicationFilterChain.doFilter( ApplicationFilterChain.java:210)\n\tat org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)\ n \ tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain。 java:243)\ n \ tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)\ n \ tat org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) \ n \ tat org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)\ n \ tat org.apache.catalina.authenticator.Authen ticatorBase.invoke(AuthenticatorBase.java:502)\ n \ tat org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)\ n \ tat org.apache.catalina.valves.ErrorReportValve.invoke( ErrorReportValve.java:100)\n\tat org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)\ n \ tat org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java: 408)\ n \ tat org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)\ n \ tat org.apache.coyote.AbstractProtocol $ AbstractConnectionHandler.process(AbstractProtocol。\ n \ tat org.apache.tomcat.util.net.NioEndpoint $ SocketProcessor。運行(NioEndpoint.java:1679)\ n \ tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)\ n \ tat java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java: 615)\ n \ tat java.lang.Thread.run(Thread.java:744)\ n原因: java.lang.NullPointerException \ n \ tat org.apache.tomcat.util.net.SocketProperties.getRxBufSize( (Native Method)\ n \ t org.apache.tomcat.util.net.NioEndpoint.getReadBufSize(NioEndpoint.java:619)\ n \ tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)\ n \ tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\ n \ tat java.lang.reflect.Method.invoke(Method的.java:606)\ n \ TAT org.apache.tomcat.util.modeler.BaseModelMBean.getAttribute(BaseModelMBean.java:190)\ n \噸... 38等等\ n「}
看起來Jolokia無法處理大量回應。任何方式我可以解決這個問題?我只需要一些屬性,但我無法弄清楚如何在一個請求中獲得2個屬性。
這是我的椒版本
{ 「時間戳」:1405453600, 「狀態」:200, 「請求」:{ 「類型」: 「版本」}, 「值」:{ 「協議」 :「5.0」,「agent」:「0.95」,「info」:{「product」:「tomcat」,「vendor」:「Apache」,「version」:「7.0.47」}}}
謝謝,因爲我更新了我的Jolokia Agent,我可以獲得多個屬性,所以我不再遇到這個問題。 – pmartin8