question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Refreshing Live Data over HTTP is not working on VS Code

See original GitHub issue

Following https://github.com/spring-projects/sts4/wiki/Live-Application-Information , configure boot-java.remote-apps to get live data over http, it failed to refresh data.

Originally I wanted to connect my app running on Azure, which only expose actuator endpoints over HTTP (JMX port is internal, no public access). It failed to refresh the data. Then I tried locally, it also failed with same error message and same sts-log.

settings:

    "boot-java.remote-apps": [
        // {
        //     "host": "my-app-name.azuremicroservices.io",
        //     "jmxurl": "https://my-app-name.azuremicroservices.io/actuator"
        // },
        {
            "host": "localhost",
            "jmxurl": "http://localhost:8080/actuator"
        }
    ],

exception location: https://github.com/spring-projects/sts4/blob/e9c813279f15f5f48144d5d8eb13c232e62c4134/headless-services/spring-boot-language-server/src/main/java/org/springframework/ide/vscode/boot/java/livehover/v2/SpringProcessConnectorOverHttp.java#L135

sts log:

15:56:50.895 [pool-10-thread-1] INFO  o.s.i.v.b.j.l.v.SpringProcessConnectorRemote - Creating RemoteStringBootApp: RemoteBootAppData [jmxurl=http://localhost:8080/actuator, host=localhost, urlScheme=https, port=443, manualConnect=false, keepChecking=true, processId=null, processName=null]
15:56:50.895 [pool-10-thread-1] INFO  o.s.i.v.b.j.l.v.SpringProcessConnectorService - connect to process: remote process - http://localhost:8080/actuator
15:56:50.895 [pool-10-thread-1] INFO  o.s.i.v.b.j.l.v.SpringProcessConnectorService - Connecting to process: remote process - http://localhost:8080/actuator - retry no: 0
15:56:50.895 [pool-10-thread-1] INFO  o.s.i.v.b.j.l.v.SpringProcessConnectorRemote - updating settings for remote processses to track - done
15:56:50.900 [pool-6-thread-4] INFO  o.s.i.v.b.j.l.v.SpringProcessConnectorService - refresh process: remote process - http://localhost:8080/actuator
15:56:50.900 [pool-6-thread-4] INFO  o.s.i.v.b.j.l.v.SpringProcessConnectorService - Refreshing data from Spring process: remote process - http://localhost:8080/actuator - retry no: 0
15:56:50.900 [pool-6-thread-4] INFO  o.s.i.v.b.j.l.v.SpringProcessConnectorService - refresh process: remote process - http://localhost:8080/actuator
15:56:50.900 [pool-6-thread-4] INFO  o.s.i.v.b.j.l.v.SpringProcessConnectorService - Refreshing data from Spring process: remote process - http://localhost:8080/actuator - retry no: 0
15:56:50.900 [pool-6-thread-4] INFO  o.s.i.v.b.j.l.v.SpringProcessConnectorService - refresh process: remote process - http://localhost:8080/actuator
15:56:50.900 [pool-6-thread-4] INFO  o.s.i.v.b.j.l.v.SpringProcessConnectorService - Refreshing data from Spring process: remote process - http://localhost:8080/actuator - retry no: 0
...
15:57:18.055 [pool-6-thread-5] INFO  o.s.i.v.b.j.l.v.SpringProcessConnectorService - Refreshing data from Spring process: remote process - http://localhost:8080/actuator - retry no: 10
15:57:21.069 [pool-6-thread-5] 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:87)
	at org.springframework.ide.vscode.boot.java.livehover.v2.SpringProcessLiveDataExtractorOverHttp.getLiveMetrics(SpringProcessLiveDataExtractorOverHttp.java:388)
	at org.springframework.ide.vscode.boot.java.livehover.v2.SpringProcessLiveDataExtractorOverHttp.retrieveLiveGcPausesMetricsData(SpringProcessLiveDataExtractorOverHttp.java:201)
	at org.springframework.ide.vscode.boot.java.livehover.v2.SpringProcessConnectorOverHttp.refreshGcPausesMetrics(SpringProcessConnectorOverHttp.java:120)
	at org.springframework.ide.vscode.boot.java.livehover.v2.SpringProcessConnectorService.lambda$scheduleRefresh$4(SpringProcessConnectorService.java:247)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)
15:57:21.071 [pool-6-thread-5] INFO  o.s.i.v.b.j.l.v.SpringProcessConnectorService - problem occured during process live data refresh
java.lang.Exception: no live gc pauses metric data received, lets try again
	at org.springframework.ide.vscode.boot.java.livehover.v2.SpringProcessConnectorOverHttp.refreshGcPausesMetrics(SpringProcessConnectorOverHttp.java:135)
	at org.springframework.ide.vscode.boot.java.livehover.v2.SpringProcessConnectorService.lambda$scheduleRefresh$4(SpringProcessConnectorService.java:247)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)
15:57:21.071 [pool-6-thread-5] INFO  o.s.i.v.b.j.l.v.SpringProcessConnectorService - disconnect from process: remote process - http://localhost:8080/actuator
15:57:21.071 [pool-6-thread-5] INFO  o.s.i.v.b.j.l.v.SpringProcessConnectorService - Disconnect from process: remote process - http://localhost:8080/actuator - retry no: 0

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
Eskibearcommented, Nov 10, 2022

The remote process also shows up in the dashboards view for beans (not for request mappings though)

That’s fixed in https://github.com/microsoft/vscode-spring-boot-dashboard/commit/57ca22d7487cbfdd285f1661ace9a9531547a851 . It will be auto shipped in next pre-release version (probably 10 hours later from now).

0reactions
martinlippertcommented, Nov 10, 2022

@Eskibear I tried this with the latest Spring Tools extension CI build and the pre-release dashboard version.

It looks like the overall mechanism to fetch the data via HTTP seems to work, since I can see the live hovers showing up in the source code.

The remote process also shows up in the dashboards view for beans (not for request mappings though), but there are no beans showing up in the tree.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Visual Studio Code Live Server Not Working - freeCodeCamp
First, open the Command Pallete with F1, then type in Preferences: Open Settings (JSON) and select that option. This will open your VSCode ......
Read more >
live server not reloading automatically · Issue #452 - GitHub
Bro, I just fixed this issue. Go to vs-code settings and search autosave option then, select "AfterDelay" then your file automatic save and ......
Read more >
Live server not refreshing browser - Stack Overflow
First, open the Command Pallete with F1 , then type in Preferences: Open Settings (JSON) and select that option. This will open your...
Read more >
Troubleshoot Terminal launch failures - Visual Studio Code
Troubleshooting steps · Test your shell directly. Try running your designated integrated terminal shell outside VS Code from an external terminal or command ......
Read more >
Incremental refresh for datasets and real-time data in Power BI
For most datasets, this is one or more tables that contain transaction data that changes often and can grow exponentially, like a fact...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found