You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're heavily using jolokia in our environment for monitoring purposes. Occasionally jolokia dies and returns 500s with the exception pasted below. I'm guessing it is due to the re-use of SimpleDateFormat in JolokiaHttpHandler. From the Javadocs: "Date formats are not synchronized. It is recommended to create separate format instances for each thread. If multiple threads access a format concurrently, it must be synchronized externally."
Once jolokia gets into this state it does not recover without restarting the process. Here is the exception I get when doing a GET /jolokia/version on one of the broken instances:
java.lang.ArrayIndexOutOfBoundsException: -2147483648
at java.util.Calendar.getDisplayName(Calendar.java:2098)
at java.text.SimpleDateFormat.subFormat(SimpleDateFormat.java:1125)
at java.text.SimpleDateFormat.format(SimpleDateFormat.java:966)
at java.text.SimpleDateFormat.format(SimpleDateFormat.java:936)
at java.text.DateFormat.format(DateFormat.java:345)
at org.jolokia.jvmagent.JolokiaHttpHandler.setHeaders(JolokiaHttpHandler.java:225)
at org.jolokia.jvmagent.JolokiaHttpHandler.handle(JolokiaHttpHandler.java:139)
at com.sun.net.httpserver.Filter.doFilter(Filter.java:79)
at sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:83)
at com.sun.net.httpserver.Filter.doFilter(Filter.java:82)
at sun.net.httpserver.ServerImpl.handle(ServerImpl.java:675)
at com.sun.net.httpserver.Filter.doFilter(Filter.java:79)
at sun.net.httpserver.ServerImpl.run(ServerImpl.java:647)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
The text was updated successfully, but these errors were encountered:
We're heavily using jolokia in our environment for monitoring purposes. Occasionally jolokia dies and returns 500s with the exception pasted below. I'm guessing it is due to the re-use of SimpleDateFormat in JolokiaHttpHandler. From the Javadocs: "Date formats are not synchronized. It is recommended to create separate format instances for each thread. If multiple threads access a format concurrently, it must be synchronized externally."
Once jolokia gets into this state it does not recover without restarting the process. Here is the exception I get when doing a GET /jolokia/version on one of the broken instances:
The text was updated successfully, but these errors were encountered: