Skip to content

The server closes automatically after start #2933

Closed as not planned
Closed as not planned

Description

@MarcSerret51

When I open a new Spring Boot project (created with Spring Initializr extensions) in a freshly installed VSCode the Java Syntax Server just closes withouth any error. Crashes on startup, a few seconds after opening VSC.
I activated the verbose logging and everything seems to be working fine and then the server closes automatically.
I downgraded the VSCode and the extension version but I'm getting the same error.

In my work machine (with different Windows and JDK) the project (also Spring Boot but much bigger) that worked the last months is also crashing with the same error.

When the server crashes the autocompletion and navigation seems to work but a after a few seconds crashes.

Im also getting "conenction got disposed" if I open the developer tools and in the extension page-> runtime status

Environment
  • Operating System: Windows 10 and 11
  • JDK version: OpenJDK 17 OpenJDK 8
  • Visual Studio Code version: 1.75.1 and 1.73
  • Java extension version: 1.14 and 1,5 prerelease
Steps To Reproduce
  1. Open a Spring Boot project
  2. The server crashes
Current Result
[Trace - 10:22:51 AM] Sending request 'shutdown - (5)'.
[Error - 10:22:52 AM] Connection to server got closed. Server will not be restarted.
Expected Result

Working Java support

Additional Informations

Activity

  1. fbricon commented on Feb 14, 2023

    @fbricon
    Collaborator

    Can you attach the logs from the "Java: Open All Log Files" command?

    Also can you check if you see any additional log files under %USERPROFILE%\.vscode\extensions\redhat.java-<version>\server\config_win and/or %APPDATA%\Code\User\globalStorage\redhat.java\<version>\config_win

  2. MarcSerret51 commented on Feb 14, 2023

    @MarcSerret51
    Author

    Sure, these are the logs from my working machine:
    metadata_log.zip
    redhat.java.zip

    And these from mi personal PC, with a much smaller project:
    metadata_log.zip
    redhat.java.zip

    And this is the demo project that I'm using in my personal PC:
    demo.zip

  3. fbricon commented on Feb 14, 2023

    @fbricon
    Collaborator

    Can you try disabling all Java extensions but vscode-java, and execute the 'Java: Clean Java Language Server Workspace' command?

  4. MarcSerret51 commented on Feb 14, 2023

    @MarcSerret51
    Author

    It doesn't work, same behaviour

  5. snjeza commented on Feb 14, 2023

    @snjeza
    Collaborator

    When I open a new Spring Boot project (created with Spring Initializr extensions) in a freshly installed VSCode the Java Syntax Server just closes withouth any error.

    Could you check the Standard Java Server (Language Support for Java in the Output view)?

    When the server crashes the autocompletion and navigation seems to work but a after a few seconds crashes.

    When you open a Gradle/Maven/Eclipse project, Java LS closes the syntax server automatically and starts the Standard server.

    In my work machine (with different Windows and JDK) the project (also Spring Boot but much bigger) that worked the last months is also crashing with the same error.

    You can try to set

    "java.server.launchMode": "Standard",
    

    to your settings.json.

  6. MarcSerret51 commented on Feb 15, 2023

    @MarcSerret51
    Author

    Could you check the Standard Java Server (Language Support for Java in the Output view)?

    Seems to work fine, I'm getting what I think is a standard output.

    When you open a Gradle/Maven/Eclipse project, Java LS closes the syntax server automatically and starts the Standard server.

    I didn't know that.

    You can try to set
    "java.server.launchMode": "Standard",

    Worked for like an hour (with hybrid mode "crashed" practically a few seconds after start) and then suddenly stopped working. I losed the navigation, completion and other features. I had to restart VSC to make it work again.

  7. MarcSerret51 commented on Feb 15, 2023

    @MarcSerret51
    Author

    Seems to happen when I force autocompletion.

    For example:
    I start to write the name of a class and I hit ctrl+space to get the classes with similar names. Seems to fail when I do this, but the Java Server Output doesn't shows any error or leak.

  8. MarcSerret51 commented on Feb 15, 2023

    @MarcSerret51
    Author

    After a few minutes it seems to recover all the features and then stops working again.

  9. snjeza commented on Feb 15, 2023

    @snjeza
    Collaborator

    @MarcSerret51 Could you attach your logs - #2933 (comment)

  10. jdneo commented on Feb 22, 2023

    @jdneo
    Collaborator

    Seems to happen when I force autocompletion.

    For example: I start to write the name of a class and I hit ctrl+space to get the classes with similar names. Seems to fail when I do this, but the Java Server Output doesn't shows any error or leak.

    @MarcSerret51 Does the issue still exist in 1.15.0?

  11. MarcSerret51 commented on Feb 22, 2023

    @MarcSerret51
    Author

    Sorry for taking so long to reply, I've been out of programming for a few days and haven't been able to test it.
    It has happened again. I am attaching the logs in case they help. Sometimes a few minutes after blocking it works again and sometimes not.
    client.log.2023-02-22.2.zip
    log.zip

    Yes @jdneo, is happening on v1.16.2023022203 pre-release.

  12. snjeza commented on Feb 22, 2023

    @snjeza
    Collaborator
  13. MarcSerret51 commented on Feb 27, 2023

    @MarcSerret51
    Author

    Sorry, I attach 2 more logs.

    log.zip
    clientlog.txt

  14. jdneo commented on Feb 27, 2023

    @jdneo
    Collaborator

    Have you tried to only enable redhat.java extension?

  15. MarcSerret51 commented on Feb 27, 2023

    @MarcSerret51
    Author

    Yes, unfortunately doesn't work.

  16. MarcSerret51 commented on Mar 8, 2023

    @MarcSerret51
    Author

    This comment #2941 (comment) solved my problem!

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions