Skip to content

Failed to refresh live data from process 12704 - com.xxxx.xx.xxx.BillingServiceApp after retries: 10 #748

Closed

Description

@Carson-yy

Failed to refresh live data from process 12704 - com.xxxx.xx.xxx.BillingServiceApp after retries: 10

visual studio code 1.65.2
windows 11
default JDK 17
runtime JDK 8

Activity

  1. changed the title [-]Failed to refresh live data from process 12704 - com.chinasoft.fuhsi.billing.BillingServiceApp after retries: 10[/-] [+]Failed to refresh live data from process 12704 - com.xxxx.xx.xxx.BillingServiceApp after retries: 10[/+] on Mar 29, 2022
  2. martinlippert commented on Mar 29, 2022

    @martinlippert
    Member

    This happens when the Spring Tools in VSCode try to fetch live information from the running app (in order to show live hovers): https://github.com/spring-projects/sts4/wiki/Live-Application-Information

    With the latest update to the Spring Tools for VSCode, this is triggered automatically after you launched a Spring Boot application, but it looks like this doesn't work somehow.

    In order to disable this automatic behavior, you can go to the preferences and disable Live Information -> Automatic Tracking.

    In order to solve the underlying issue, we need a few more details here:

    • does your project have Spring Boot Actuator on the dependency list?
    • how does the beginning on the log output looks like when you start the application (the command that is executed including the JVM options set)
  3. Carson-yy commented on Mar 30, 2022

    @Carson-yy
    Author
    1. Spring Boot Actuator exists.

    2. The beginning of the log is also normal.

  4. martinlippert commented on Mar 30, 2022

    @martinlippert
    Member

    @Yaegar Can you paste the beginning of the log when starting the app here (the section that contains the launch arguments)?

  5. martinlippert commented on Mar 30, 2022

    @martinlippert
    Member

    @Yaegar Maybe you can provide a small sample application that reproduces the behavior you are seeing?
    And is there maybe a security setting on the machine that prevents the started app from being accessed va JMX from the tooling?

  6. sbreakey commented on May 26, 2022

    @sbreakey

    I get this too.

    Versions:
    Vscode Version: 1.67.2 (Universal)
    Commit: c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5
    Date: 2022-05-17T18:20:57.384Z (1 wk ago)
    Electron: 17.4.1
    Chromium: 98.0.4758.141
    Node.js: 16.13.0
    V8: 9.8.177.13-electron.0
    OS: Darwin x64 21.3.0

    Launch args:
    cd /Users/me/my-proj ; /usr/bin/env 'SOME_VAR=someval' /usr/local/Cellar/openjdk/17.0.2/libexec/openjdk.jdk/Contents/Home/bin/java -agentlib:jdwp=transport=dt_socket,server=n,suspend=y,address=localhost:58218 -XX:+ShowCodeDetailsInExceptionMessages @/var/folders/d3/yzvcd0ws7nv56wfg9z_h7vtm0000gr/T/cp_15dsny3wqaz08lv5lggsbrp17.argfile com.example.myapp.MyAppServiceApplication --spring.profiles.active=local

  7. martinlippert commented on May 31, 2022

    @martinlippert
    Member

    @sbreakey From the launch args it looks like the necessary args to enable this feature as not set automatically. How do you launch the app? And can you provide a sample app and a few steps how to reproduce this?

    There is a preference to disable the automatic launch args settings and the automatic attempt to connect to the process to show live data in the preferences Boot-Java -> Live Information -> Automatic Connection - if you want to avoid this automatic connection and the error message from showing up.

    But it would be good to find the root cause here in order to fix the underlying problem, so more details would be very much appreciated here.

  8. sbreakey commented on May 31, 2022

    @sbreakey

    How do you launch the app?

    I use the vscode debugger (using the Microsoft "Debugger for Java" extension: vscjava.vscode-java-debug). My launch configuration is:

    {
      "version": "0.2.0",
      "configurations": [
        {
          "type": "java",
          "name": "Launch MyApplication",
          "request": "launch",
          "mainClass": "com.whatever.myapp.MyApplication",
          "projectName": "myapp",
          "args": "--spring.profiles.active=local",
          "env": {
            "somekey": "someval"
          },
          "preLaunchTask": "Copy build-info from Gradle"
        }
    }
    

    And can you provide a sample app and a few steps how to reproduce this?

    Sure here you go. It's literally an absolute bare bones gradle based, springboot 2.7.0 app generated by the initializer. Just open the "Run and Debug" screen in vscode and click "Run and Debug".

  9. 1 remaining item

  10. martinlippert commented on May 31, 2022

    @martinlippert
    Member

    @sbreakey Thanks for the additional details, we will take a closer look here. The project doesn't have spring-boot-actuators in the classpath, so live hovers won't show up anyway, but the tooling should be smart enough to not make any attempts in that direction in such a situation. But lets have a closer look first.

  11. BoykoAlex commented on May 31, 2022

    @BoykoAlex
    Contributor

    Fixed with 24117a4

  12. added this to the 4.15.0.RELEASE milestone on May 31, 2022
  13. negwu01 commented on Nov 10, 2022

    @negwu01

    Tried running a spring boot application on vscode and got Failed to refresh live data from process 12243 after retries: 10 - Source spring boot tools extension. Live hovers were not possible. I added actuator and also added
    -Dspring.liveBeansView.mbeanDomain and "vmArgs": "-Dspring.jmx.enabled=true" in the 'launch.json' file as described. But did not get any beans info or live hovers. It used to work on vscode 1.72 and spring boot 2.7.4.+ I now decided to migrate the code to spring boot 3.0.0 and vscode 1.73+ but I double if this issue is because of the versions.

  14. jarhuba commented on Nov 14, 2022

    @jarhuba

    Same problem here.
    Spring Boot 3.0.0-RC2, vscode 1.73.1
    Fedora 36, jdk 17
    Failed to refresh live data from process 55015 after retries: 10

    2022-11-14T11:00:39.055+01:00 INFO 55015 --- [ main] com.crud.tasks.TasksApplication : Starting TasksApplication using Java 17.0.5 with PID 55015 (/home/jarek/Dokumenty/markownie-webserwis/module_19.2/tasks/bin/main started by jarek in /home/jarek/Dokumenty/markownie-webserwis/module_19.2/tasks)
    2022-11-14T11:00:39.060+01:00 INFO 55015 --- [ main] com.crud.tasks.TasksApplication : No active profile set, falling back to 1 default profile: "default"
    2022-11-14T11:00:40.078+01:00 INFO 55015 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'management.metrics-org.springframework.boot.actuate.autoconfigure.metrics.MetricsProperties' of type [org.springframework.boot.actuate.autoconfigure.metrics.MetricsProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
    2022-11-14T11:00:40.396+01:00 INFO 55015 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
    2022-11-14T11:00:40.413+01:00 INFO 55015 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
    2022-11-14T11:00:40.414+01:00 INFO 55015 --- [ main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/10.1.1]
    2022-11-14T11:00:40.576+01:00 INFO 55015 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
    2022-11-14T11:00:40.576+01:00 INFO 55015 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1442 ms
    2022-11-14T11:00:41.252+01:00 INFO 55015 --- [ main] o.s.b.a.e.web.EndpointLinksResolver : Exposing 1 endpoint(s) beneath base path '/actuator'
    2022-11-14T11:00:41.328+01:00 INFO 55015 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
    2022-11-14T11:00:41.345+01:00 INFO 55015 --- [ main] com.crud.tasks.TasksApplication : Started TasksApplication in 2.684 seconds (process running for 3.239)

  15. martinlippert commented on Nov 14, 2022

    @martinlippert
    Member

    @jarhuba @negwu01 In case you are running a Spring Boot 3 application, you might run into this issue: https://twitter.com/springtools4/status/1589591973878714368. So can you add this additional config to your application.properties file?

    management.endpoints.jmx.exposure.include=*

    to see if that fixes the issue?

  16. jarhuba commented on Nov 15, 2022

    @jarhuba

    After adding this line vscode works correctly. Thank you.

  17. iwangbowen commented on Oct 15, 2024

    @iwangbowen

    I encountered the same issue

  18. martinlippert commented on Oct 21, 2024

    @martinlippert
    Member

    @iwangbowen We fixed this a while ago, the property is usually added automatically now when launching a Spring Boot app in VSCode (in case you have the Spring Boot Tools installed). Can you provide further details, maybe a sample app, and some steps how to reproduce this?

  19. BoykoAlex commented on Oct 21, 2024

    @BoykoAlex
    Contributor

    @iwangbowen it'd be great if you could share your Eclipse workspace folder zip in the case of Eclipse :-)

  20. phamtranxuantan commented on Jan 9, 2025

    @phamtranxuantan

    i got a similar error Failed to refresh live data from process service:jmx:rmi:///jndi/rmi://127.0.0.1:45557/jmxrmi after retries: 10 when i am running api gateway , here is my config file :

    4.0.0

    org.springframework.boot
    spring-boot-starter-parent
    2.1.5.RELEASE


    com.rainbowforest
    api-gateway
    0.0.1-SNAPSHOT
    api-gateway
    Demo project for Spring Boot

    12 Greenwich.SR2 org.springframework.boot spring-boot-starter-actuator org.springframework.boot spring-boot-starter-data-redis org.springframework.boot spring-boot-starter-security org.springframework.boot spring-boot-starter-web org.springframework.cloud spring-cloud-starter-netflix-eureka-client org.springframework.cloud spring-cloud-starter-netflix-hystrix org.springframework.cloud spring-cloud-starter-netflix-ribbon org.springframework.cloud spring-cloud-starter-netflix-zuul org.springframework.session spring-session-data-redis org.springframework.session spring-session-jdbc org.springframework.cloud spring-cloud-starter-gateway com.microsoft.sqlserver mssql-jdbc runtime org.projectlombok lombok true org.springframework.boot spring-boot-starter-test test org.springframework.security spring-security-test test redis.clients jedis org.springframework.cloud spring-cloud-dependencies ${spring-cloud.version} pom import org.springframework.boot spring-boot-maven-plugin Someone please save me this error
  21. martinlippert commented on Jan 10, 2025

    @martinlippert
    Member

    @phamtranxuantan This is related to the mechanism that automatically tries to connect the IDE to the running Spring Boot process to fetch live information from the running process. You can disable this mechanism. If you are using the Spring Tools in an Eclipse environment, you can uncheck the Auto connect to fetch live data option in the launch configuration of your Spring Boot app. If you are using Spring Tools in VSCode, there is a preference in the live-information category as well.

    In addition to that, we could also try to find out why the IDE seems to fail to connect to your app. For that, it would be awesome if you could share a sample project that reproduces this.

    Side note: the Spring Boot version that you are using (looks like you have 2.1.5 in use) is quite old and no longer maintained/supported, so I would recommend to upgrade to a more recent Spring Boot 3.4 version instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

for: vscodetheme: live-datatype: bug

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions