Repository navigation
Closed
Milestone
Description
When the query contains space, it throws exception. E.g. below endpoint should work.
https://hostname/actuator/metrics/jvm.memory.used?tag=area:heap,id:Eden%20Space
query is tag=area:heap,id:Eden Space, in L86, encode() will encode whitespace as %20. And in L87, impl of restTemplate.getForObject, it encodes the url again, making it %2520, causing the 404.
callstack
20:51:24.396 [pool-6-thread-3] ERROR o.s.i.v.b.j.l.v.SpringProcessLiveDataExtractorOverJMX - Error parsing beans
org.springframework.web.client.HttpClientErrorException$NotFound: 404 : [no body]
at org.springframework.web.client.HttpClientErrorException.create(HttpClientErrorException.java:113)
at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:168)
at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:122)
at org.springframework.web.client.ResponseErrorHandler.handleError(ResponseErrorHandler.java:63)
at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:819)
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:777)
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:711)
at org.springframework.web.client.RestTemplate.getForObject(RestTemplate.java:334)
at org.springframework.ide.vscode.boot.java.livehover.v2.HttpActuatorConnection.getLiveMetrics(HttpActuatorConnection.java:94)
at org.springframework.ide.vscode.boot.java.livehover.v2.SpringProcessLiveDataExtractorOverHttp.getLiveMetrics(SpringProcessLiveDataExtractorOverHttp.java:388)
at org.springframework.ide.vscode.boot.java.livehover.v2.SpringProcessLiveDataExtractorOverHttp.retrieveLiveMemoryMetricsData(SpringProcessLiveDataExtractorOverHttp.java:145)
at org.springframework.ide.vscode.boot.java.livehover.v2.SpringProcessConnectorOverHttp.refreshMemoryMetrics(SpringProcessConnectorOverHttp.java:142)
at org.springframework.ide.vscode.boot.java.livehover.v2.SpringProcessConnectorService.lambda$4(SpringProcessConnectorService.java:240)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
BTW, the error message is misleading:
20:51:24.396 [pool-6-thread-3] ERROR o.s.i.v.b.j.l.v.SpringProcessLiveDataExtractorOverJMX - Error parsing beans
Activity
BoykoAlex commentedon Nov 9, 2022
@Eskibear Can you please re-try this? I suspect that this a411663 might have fixed it...
Eskibear commentedon Nov 10, 2022
I verified with latest CI build vscode-spring-boot-1.41.0-202211080047.vsix, the error is gone. (because you removed the
encode()part.But I the memory plot is not correctly rendered. I suspect maybe we need microsoft/vscode-spring-boot-dashboard#239 to get it right, as in latest CI internal build, you already include 4864c95 to fetch heap/non-heap mem data together.
I'm closing this.
BoykoAlex commentedon Nov 10, 2022
I think what @Eskibear states above is correct. @vudayani-vmw please let us know if it is not.
vudayani commentedon Nov 10, 2022
@Eskibear @BoykoAlex
Yes, the #239 PR includes the necessary changes to fetch heap/non-heap metrics together to render the memory graph (with 4864c95 commit)