-
Notifications
You must be signed in to change notification settings - Fork 448
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: The Language Support for Java server crashed 5 times in the last 3 minutes. The server will not be restarted. #112
Comments
Can you set |
Hi @gorkem , I found the log file finally, you can check this:
Thanks |
This log indicates that the plugins are not successfully started. I am not sure what can be causing this. Do you still see this behaviour? |
This is happening to me as well. |
I tried uninstalling and reinstalling the extension and I still get the issue. I also tried restarting my computer and that didn't do anything. The only thing I can think of is that it was working until I did a Cmd+Shift+W to close code. The next time I started, I got the issue. Here is the console log output I get in the developer tools. [Extension Host] Executing /Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/bin/java -Declipse.application=org.jboss.tools.vscode.java.id1 -Dosgi.bundles.defaultStartLevel=4 -Declipse.product=org.jboss.tools.vscode.java.product -noverify -Xmx1G -jar /my/username/.vscode/extensions/redhat.java-0.0.10/server/plugins/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar -configuration /my/username/.vscode/extensions/redhat.java-0.0.10/server/config_mac -data /my/username/Library/Application Support/Code/User/workspaceStorage/9fa792d955d2020374db01e716195cb2/redhat.java/jdt_ws //Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/electron-browser/workbench.main.js:100 The Language Support for Java server crashed 5 times in the last 3 minutes. The server will not be restarted. I also get this in the Output window: [Info - 12:44:19 PM] Connection to server got closed. Server will restart. |
I got this to work again by wiping out my repository and forcing it to regenerate all of the eclipse .prefs files. Not sure how any of it got messed up, but it's a workaround at least. |
Me too.. I've tried most of the things listed on the Internet and none of them seems to solve this problem. |
@TechMky Can you find the logs and post them here? they should be in a directory |
It looks like the exception thrown while calling JavaLanguageServerPlugin.logInfo is caused by having a null context, which would be caused by the plugin being stopped at that point. So I doubt the exception causes the problem, but is rather a symptom of the server being stopped prematurely. I have no clue why. Best I can think of right now, is to add some more logging to try to determine what causes the server to stop. |
Alright. I'll give it some time and try to generate more log data. I tried making sense of log files but wasn't able to. I hope that the RedHat team can provide me some solution regarding this issue. |
Please delete ~/${APP_DATA}/workspaceStorage/, so you get clean logs |
Alright. Will do that and let you know. |
Is there any update regarding this issue ? I am experiencing exactly the same thing. |
@ofir-popowski can you attach the vscode-java and server logs? |
I couldn't see anything else in the console in the developer tools part (except some warning regarding keyboard shortcuts on windows. If it's important I'll put it here) |
I have no antivirus at all (except windows defender thing), and system path properly configured to JDK. I also have several other IDEs that use java and I don't have any other issues. Let me know if there's anything I can do to help figure this out. Is it possible that having another IDE active while trying to launch vscode is the problem ? (different maven java projects) |
@ofir-popowski no, other IDEs should not interfere. Do you think you could try to debug vscode-java yourself? (since we can't reproduce, it's hard to guess what's happening). If you're up to the task, you could follow the instructions to launch vscode-java from vscode, and put a breakpoint in https://github.com/redhat-developer/vscode-java/blob/master/src/javaServerStarter.ts#L55, see what happens |
@fbricon Ok I cloned the repo, opened it with vscode, launched in debug and it stopped. It launched and I opened a java project. When it stopped, err was null, I stepped over several times. It got to I don't know much javascript, so I'm not sure I can help more than that but I'll do my best. If there's anything specific I should be looking for, please let me know. I'd like to point out that the project I'm trying to open is not an eclipse project (no eclipse files anywhere), just a java maven project. Edit: I just tried removing and completely purging all vscode stuff from my machine, and reinstalled. Problem persists on my work machine, but sadly I cannot reproduce on my PC at home with same versions of OS, JDK, project, and extensions. |
To anyone seeing this issue, please report the logs you find in your extensions folder: |
My win7 PC installed jdk with (jdk1.8.0 and jdk1.8.0_121 ) |
Update: I tried installing vscode-lombok, but I found out we never use Lombok at all, so there's no point in installing it. However, I did notice there's this error log here mentioning about a BundleContext no longer being valid for the redhat-vscode-java plugin:
And a few more entries about very similar things:
|
But it is working fine after installing vs-lambok, I don't know why, but yes it is working fine. Please help to understand why lambok is resolving the error ? |
No, it didn't actually work for me, even with "vscode-lombok" extension installed. |
Same problem here, new PC installation. I tried to install "vscode-lombok" but it doesn't work for me.
|
Has the Java RE version requirements been increased to require at least OpenJDK 12.0 or up? I'm starting to think Java 8 is no longer compatible with the latest VS Code. |
I am using OpenJDK 11 BTW. Now I just uninstall the lombok extension and created one java file and boom again
!ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:52.111 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:52.398 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:52.463 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:52.482 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:52.615 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:52.617 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:52.619 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:52.620 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:52.635 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:52.638 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:52.639 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:52.640 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:52.641 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:52.645 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:52.648 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:52.650 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:52.651 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:52.652 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:52.653 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:52.655 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:52.656 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:52.656 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:52.658 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:52.658 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:52.659 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:52.661 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:52.663 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:52.664 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:52.665 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:52.668 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:52.670 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:52.673 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:52.708 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:52.793 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:53.042 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:55.296 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:55.299 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:55.486 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:55.553 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:55.556 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:55.605 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:55.657 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:55.788 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:55.791 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:55.881 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:56.127 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:56.137 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:56.150 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:56.153 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:56.193 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:56.195 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:56.209 !ENTRY java-debug 1 0 2020-07-08 14:19:56.289 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:57.404 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:57.405 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:57.425 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:57.477 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:57.508 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:57.583 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:57.587 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:19:57.590 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:20:01.691 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:20:01.694 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:20:02.113 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:20:02.256 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:20:02.387 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:20:02.514 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:20:02.594 !ENTRY org.eclipse.jdt.ls.core 4 2 2020-07-08 14:20:02.673 !ENTRY org.eclipse.jdt.ls.core 4 0 2020-07-08 14:20:02.679 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:20:02.757 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:20:02.758 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:20:02.799 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:20:02.800 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:20:03.024 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:20:03.026 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:20:03.132 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:20:05.981 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:20:05.983 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:20:08.236 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:20:08.768 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:20:08.786 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:20:10.705 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:20:10.716 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:20:10.904 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:20:10.915 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:20:12.197 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:20:12.213 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:20:15.669 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:20:21.074 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:20:24.931 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:20:24.933 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:20:25.226 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:20:25.229 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:20:25.381 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:20:25.848 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:20:25.849 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:20:28.867 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:20:29.382 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:20:29.397 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:20:31.080 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:20:31.088 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:20:32.302 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:20:33.216 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:20:33.220 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:20:33.468 !ENTRY org.eclipse.jdt.ls.core 1 0 2020-07-08 14:20:33.491 |
I fixed the problem (openjdk 8):
|
Got any instructions for Ubuntu (Linux)? |
Just clarify the requirement about vscode-lombok extension.
|
@testforstephen Where can I find the "jvmArgs" on both Windows and Ubuntu, so I can remove them or restore them to the default "jvmArgs" in the user settings? Thank you so much for the clarifications. Maybe it's a good idea to include a way to inspect our current "jvmArgs" via the vscode-java extension. Just viewing it is fine, no need to do something fancy about it. Maybe it's suitable to put this in a separate feature enhancement ticket? EDIT: Oh, it's a VS Code User Settings... nevermind. I thought it's a setting that was permanently modified somewhere on my Windows and Ubuntu user profiles. |
Same problem About the fix with uninstalling VSCode - is there other option, not requiring VSCode uninstall? |
It seems there was an update of some sort to the Java JDT Core. This is my latest error log message.
From my previous log that I posted earlier, I noticed these JDT versions are different, yet they continue to throw Previous:
Current:
Where should I start looking into this BundleContext not being valid due to the version differences? |
try the "Java: clean the Java Language server workspace" command |
@fbricon That solved my issue with the Language Support for Java server crashing each time I restarted VS Code. Thanks for this. I'll continue to monitor the log files, and if I see any messages that is not related to BundleContext, I'll post here again. |
Clean the workspace, either by command prompt or by deleting the "C:\Users\Dhruv\AppData\Roaming\Code\User" Folder. You can find the exact link for the folder in the debug log text. |
@fbricon @akaroml it seems this error is constant now. Just tried to open a Java project on WSL and got the same issue. The logs indicate this is the root cause: {
message: 'Error opening zip file or JAR manifest missing : /home/codespace/.vscode-remote/extensions/gabrielbb.vscode-lombok-1.0.1/server/lombok.jar\n',
level: 'info',
timestamp: '2021-08-31 12:41:43.946'
} |
@brunoborges the gabrielbb.vscode-lombok-1.0.1 changes the java.jdt.ls.vmargs value and sets the path to the lombok agent. Either remove it and disable the extension, or install the same extension both locally and on your remote instance |
Confirming this was the.issue. thanks! I think this issue and other similar can be closed. |
It is still happening when I coding in remote container. But it worked fine when I use local vscode.
|
Getting the same error intermittently when working on a remote ubuntu vm from macOS. It works for some time ok and randomly it just stops working and the language server crashes constantly or can't start at all. Tried cleaning the workspace, removing/reinstalling extensions, reinstalling vscode, killing vscode-server running on the remote end, rebooting the vm, every possible cure I have seen in various issues here, all to no avail. It just starts working by itself after some random time, probably 1-2 days. The weird thing is that if I create another ubuntu user and connect with vscode through that user, it works fine -for some time, until that breaks too. The only meaningful log that seems to appear is on the developer tool, which shows the following, just before printing that the language server crashed:
Also you can find the server logs here after enabling trace logs, but don't think there is much to be seen there. Really could use some help, since this has been torturing me for some days now and can't seem to find anything. |
@mmarakas does /home/makis/.vscode-server/extensions/gabrielbb.vscode-lombok-1.0.1/server/lombok.jar actually exist? if not, you should remove the lombok javaagent from java.jdt.ls.vmargs |
Yes it exists, but even after removing the .vscode-server folder for both root and makis users, the language server still doesn't come up. I even tried clearing the local vscode storage on macOS at ~/Library/Application Support/Code but nothing changed. |
@mmarakas check if VS Code isn't syncing the settings with your account in the cloud somewhere. I kept getting Lombok agent in the vmargs because it was syncing. |
For me the fix was removing the javaagent argument which was added to the vmargs in the settings.json . Where to find the settings.json. Goto Preferences -> Settings |
I had a very similar error on macOS. It might have started happening after I upgraded VS Code. What worked for me was to delete this directory:
Warning: you will have to set up your workspaces after doing this. |
This extension cannot start successfully and popup this error message. I found some logs in the output, hope it can help:
[Info - 11:24:22 AM] Connection to server got closed. Server will restart.
[Info - 11:24:23 AM] Connection to server got closed. Server will restart.
[Warn - 11:24:24 AM] Dec 6, 2016 11:24:24 AM The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.
[Info - 11:24:25 AM] Connection to server got closed. Server will restart.
[Warn - 11:24:26 AM] Dec 6, 2016 11:24:26 AM The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.
[Info - 11:24:26 AM] Connection to server got closed. Server will restart.
[Warn - 11:24:27 AM] Dec 6, 2016 11:24:27 AM The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.
[Error - 11:24:27 AM] Connection to server got closed. Server will not be restarted.
Environment
Steps To Reproduce
Additional Informations
I installed the same-version vscode and extension to another machine whose system is Windows 10, and the extension can work as expected.
The text was updated successfully, but these errors were encountered: