It tries to use remote server instead of my local server
See original GitHub issueI use remote SSH regularly but there seems to be an issue where this extension is not able to differentiate between the extension installed in my local system and the one in the remote server.
It keeps trying to reach the remote /home/remoteserver/.vscode-server/
instead of my local Windows one when I am not in remote SSH mode.
Nothing works so I am forced to use a remote server even when it’s not needed.
I’ve never experienced this with any other extension (and I use LOTS 😆) where it mixes up like this.
Environment
- Operating System:
Edition Windows 10 Pro
Version 21H1
Installed on 12-12-2020
OS build 19043.1165
Experience Windows Feature Experience Pack 120.2212.3530.0
- JDK version:
PS C:\Users\shrin> javac -version
javac 11.0.9
PS C:\Users\shrin> java --version
java 11.0.9 2020-10-20 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.9+7-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.9+7-LTS, mixed mode)
- Visual Studio Code version:
Version: 1.59.0 (user setup)
Commit: 379476f0e13988d90fab105c5c19e7abc8b1dea8
Date: 2021-08-04T23:13:12.822Z
Electron: 13.1.7
Chrome: 91.0.4472.124
Node.js: 14.16.0
V8: 9.1.269.36-electron.0
OS: Windows_NT x64 10.0.19043
- Java extension version:
v0.81.0
(latest as of this writing when we search and install from Marketplace
Steps To Reproduce
- Use remote SSH and open remote Java projects (with this extension installed there too)
- Open another Window and open a local project.
[Please attach a sample project reproducing the error] Please attach logs
{
message: 'Starting Java server with: C:\\Program Files\\Java\\jdk-11.0.9\\bin\\java --add-modules=ALL-SYSTEM --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED -Declipse.application=org.eclipse.jdt.ls.core.id1 -Dosgi.bundles.defaultStartLevel=4 -Declipse.product=org.eclipse.jdt.ls.core.product -Dfile.encoding=utf8 -DwatchParentProcess=false -XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx1G -Xms100m -javaagent:/home/remoteserver/.vscode-server/extensions/gabrielbb.vscode-lombok-1.0.1/server/lombok.jar -noverify -jar c:\\Users\\shrin\\.vscode\\extensions\\redhat.java-0.81.0\\server\\plugins\\org.eclipse.equinox.launcher_1.6.200.v20210416-2027.jar -configuration c:\\Users\\shrin\\AppData\\Roaming\\Code\\User\\globalStorage\\redhat.java\\0.81.0\\config_ss_win -data c:\\Users\\shrin\\AppData\\Roaming\\Code\\User\\workspaceStorage\\2c81cc85b8987e4ff6354d50af89d344\\redhat.java\\ss_ws',
level: 'info',
timestamp: '2021-08-19 11:47:01.071'
}
{
message: 'Error opening zip file or JAR manifest missing : /home/remoteserver/.vscode-server/extensions/gabrielbb.vscode-lombok-1.0.1/server/lombok.jar\n',
level: 'info',
timestamp: '2021-08-19 11:47:01.176'
}
{
message: 'The Language Support for Java (Syntax Server) server crashed and will restart.',
level: 'error',
timestamp: '2021-08-19 11:47:01.179'
}
{
message: '[Info - 11:47:01 am] Connection to server got closed. Server will restart.',
level: 'info',
timestamp: '2021-08-19 11:47:01.186'
}
{
message: 'Starting Java server with: C:\\Program Files\\Java\\jdk-11.0.9\\bin\\java --add-modules=ALL-SYSTEM --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED -Declipse.application=org.eclipse.jdt.ls.core.id1 -Dosgi.bundles.defaultStartLevel=4 -Declipse.product=org.eclipse.jdt.ls.core.product -Dfile.encoding=utf8 -DwatchParentProcess=false -XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx1G -Xms100m -javaagent:/home/remoteserver/.vscode-server/extensions/gabrielbb.vscode-lombok-1.0.1/server/lombok.jar -noverify -jar c:\\Users\\shrin\\.vscode\\extensions\\redhat.java-0.81.0\\server\\plugins\\org.eclipse.equinox.launcher_1.6.200.v20210416-2027.jar -configuration c:\\Users\\shrin\\AppData\\Roaming\\Code\\User\\globalStorage\\redhat.java\\0.81.0\\config_win -data c:\\Users\\shrin\\AppData\\Roaming\\Code\\User\\workspaceStorage\\2c81cc85b8987e4ff6354d50af89d344\\redhat.java\\jdt_ws',
level: 'info',
timestamp: '2021-08-19 11:47:01.258'
}
{
message: 'Error opening zip file or JAR manifest missing : /home/remoteserver/.vscode-server/extensions/gabrielbb.vscode-lombok-1.0.1/server/lombok.jar\n',
level: 'info',
timestamp: '2021-08-19 11:47:01.278'
}
{
message: 'The Language Support for Java (Syntax Server) server crashed and will restart.',
level: 'error',
timestamp: '2021-08-19 11:47:01.281'
}
{
message: '[Info - 11:47:01 am] Connection to server got closed. Server will restart.',
level: 'info',
timestamp: '2021-08-19 11:47:01.282'
}
{
message: 'Error opening zip file or JAR manifest missing : /home/remoteserver/.vscode-server/extensions/gabrielbb.vscode-lombok-1.0.1/server/lombok.jar\n',
level: 'info',
timestamp: '2021-08-19 11:47:01.356'
}
{
message: 'The Language Support for Java server crashed and will restart.',
level: 'error',
timestamp: '2021-08-19 11:47:01.359'
}
{
message: '[Info - 11:47:01 am] Connection to server got closed. Server will restart.',
level: 'info',
timestamp: '2021-08-19 11:47:01.360'
}
{
message: 'Error opening zip file or JAR manifest missing : /home/remoteserver/.vscode-server/extensions/gabrielbb.vscode-lombok-1.0.1/server/lombok.jar\n',
level: 'info',
timestamp: '2021-08-19 11:47:01.366'
}
{
message: 'The Language Support for Java (Syntax Server) server crashed and will restart.',
level: 'error',
timestamp: '2021-08-19 11:47:01.367'
}
{
message: '[Info - 11:47:01 am] Connection to server got closed. Server will restart.',
level: 'info',
timestamp: '2021-08-19 11:47:01.367'
}
{
message: 'Error opening zip file or JAR manifest missing : /home/remoteserver/.vscode-server/extensions/gabrielbb.vscode-lombok-1.0.1/server/lombok.jar\n',
level: 'info',
timestamp: '2021-08-19 11:47:01.432'
}
{
message: 'The Language Support for Java server crashed and will restart.',
level: 'error',
timestamp: '2021-08-19 11:47:01.437'
}
{
message: '[Info - 11:47:01 am] Connection to server got closed. Server will restart.',
level: 'info',
timestamp: '2021-08-19 11:47:01.437'
}
{
message: 'Error opening zip file or JAR manifest missing : /home/remoteserver/.vscode-server/extensions/gabrielbb.vscode-lombok-1.0.1/server/lombok.jar\n',
level: 'info',
timestamp: '2021-08-19 11:47:01.449'
}
{
message: 'The Language Support for Java (Syntax Server) server crashed and will restart.',
level: 'error',
timestamp: '2021-08-19 11:47:01.451'
}
{
message: '[Info - 11:47:01 am] Connection to server got closed. Server will restart.',
level: 'info',
timestamp: '2021-08-19 11:47:01.452'
}
{
message: 'Error opening zip file or JAR manifest missing : /home/remoteserver/.vscode-server/extensions/gabrielbb.vscode-lombok-1.0.1/server/lombok.jar\n',
level: 'info',
timestamp: '2021-08-19 11:47:01.528'
}
{
message: 'The Language Support for Java server crashed and will restart.',
level: 'error',
timestamp: '2021-08-19 11:47:01.538'
}
{
message: '[Info - 11:47:01 am] Connection to server got closed. Server will restart.',
level: 'info',
timestamp: '2021-08-19 11:47:01.539'
}
{
message: 'Error opening zip file or JAR manifest missing : /home/remoteserver/.vscode-server/extensions/gabrielbb.vscode-lombok-1.0.1/server/lombok.jar\n',
level: 'info',
timestamp: '2021-08-19 11:47:01.540'
}
{
message: 'The Language Support for Java (Syntax Server) server crashed 5 times in the last 3 minutes. The server will not be restarted.',
level: 'error',
timestamp: '2021-08-19 11:47:01.558'
}
{
message: '[Error - 11:47:01 am] Connection to server got closed. Server will not be restarted.',
level: 'info',
timestamp: '2021-08-19 11:47:01.559'
}
{
message: 'Error opening zip file or JAR manifest missing : /home/remoteserver/.vscode-server/extensions/gabrielbb.vscode-lombok-1.0.1/server/lombok.jar\n',
level: 'info',
timestamp: '2021-08-19 11:47:01.633'
}
{
message: 'The Language Support for Java server crashed and will restart.',
level: 'error',
timestamp: '2021-08-19 11:47:01.635'
}
{
message: '[Info - 11:47:01 am] Connection to server got closed. Server will restart.',
level: 'info',
timestamp: '2021-08-19 11:47:01.635'
}
{
message: 'Error opening zip file or JAR manifest missing : /home/remoteserver/.vscode-server/extensions/gabrielbb.vscode-lombok-1.0.1/server/lombok.jar\n',
level: 'info',
timestamp: '2021-08-19 11:47:01.712'
}
{
message: 'The Language Support for Java server crashed 5 times in the last 3 minutes. The server will not be restarted.',
level: 'error',
timestamp: '2021-08-19 11:47:01.714'
}
{
message: '[Error - 11:47:01 am] Connection to server got closed. Server will not be restarted.',
level: 'info',
timestamp: '2021-08-19 11:47:01.716'
}
Current Result
Extension Works only in Remote SSH mode
Expected Result
- Should work in remote SSH mode
- Should work in local mode too.
Additional Informations
- I tried uninstalling ALL my extensions and started afresh. Issue still occurs.
- Issue occurs even when a remote session is currently not in progress.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7
Top Results From Across the Web
Accessing remote files on local server on windows server 2012
Hi! I am having issues accessing my remote files on my local server. Here's the scoop. So I have a server running windows...
Read more >Access to a site on localhost from remote - Stack Overflow
Host = machine with site on it; Client = machine you are trying to access the host from. If the host and client...
Read more >How to fix 8 common remote desktop connection problems
First, try to establish a session from a client that has been able to successfully connect in the past. The goal is to...
Read more >Terminal Server - RDP with local admin - Super User
I am trying to log in to it with RDP, using the local admin account. (Not the domain admin) I have placed the...
Read more >How to resolve common problems with Windows Remote ...
The Remote Desktop needs to allow connections from other computers for the feature to work. If your server was set to allow remote...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
In my experiment, if I explicitly override “java.jdt.ls.vmargs” setting in the remote machine’s settings.json, then vscode-lombok extension will update the agent path to the remote settings.json. If not, it will update the global user setting in the local machine. The second case should be same as the problem above.
The reason is vscode-lombok extension uses the VS Code API ConfigurationTarget.Global to specify where the modified setting “java.jdt.ls.vmargs” should be saved. The global setting defaults to your VS Code’s user setting unless the target setting item is overridden explicitly in your remote machine’s settings.json.
Also the API
ConfigurationTarget
just supports values such as “Global”, “Workspace” and “WorkspaceFolder”. No option for “Machine”. Looks like vscode-lombok extension cannot fix it.However, there is other way to prevent the setting from being shared across machines. In Java extension, we could change the scope of “java.jdt.ls.vmargs” setting from “window” to “machine” or “machine-overridable”. For the setting with “machine” scope, VS Code will force its global setting to be the settings.json on the runtime machine.
So far, to unblock you @shrinidhi111, you could explicitly specify the setting “java.jdt.ls.vmargs” in the remote machine, then the lombok extension in remote machine won’t touch your local settings.json.
check your vscode settings (open the json file)