Skip to content
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

Warning when trying to open Java LS Log file #13428

Closed
l0rd opened this issue May 27, 2019 · 5 comments
Closed

Warning when trying to open Java LS Log file #13428

l0rd opened this issue May 27, 2019 · 5 comments
Labels
kind/bug Outline of a bug - must adhere to the bug report template.

Comments

@l0rd
Copy link
Contributor

l0rd commented May 27, 2019

Description

When trying to open the Java Language Server Log file from the command palette:

Screenshot 2019-05-28 at 00 49 29

the log file is not opened and the following warning is shown:

Screenshot 2019-05-28 at 00 49 35

Reproduction Steps

Start a workspace using this devfile:

chectl workspace:start --devfile=https://gist.githubusercontent.com/l0rd/52eda1d1b57878a218cba17c0c93a477/raw/5f7d556599f3e314a5065d705556fb2087710b61/devfile.yaml

Open the command palette and open the Java Log File

OS and version:

macOS / minikube / nightly che-server / chectl / helm / jtd ls 0.45.0

@l0rd l0rd added kind/bug Outline of a bug - must adhere to the bug report template. team/languages labels May 27, 2019
@l0rd
Copy link
Contributor Author

l0rd commented Jun 3, 2019

cc @tsmaeder @tolusha

@tsmaeder
Copy link
Contributor

@l0rd did the java language server actually start? If jdt.ls is not started, there won't be a log file and the message is to be expected.

@l0rd
Copy link
Contributor Author

l0rd commented Jun 11, 2019

@tsmaeder it looks like the language server is started:

$ k exec -ti workspace1bszgp7t1ogdm5xu.workspace-5b9c6df86-ksfnn -c ghs sh
$ /projects $ ps -ef | grep java
root        43    19  3 22:27 ?        00:00:33 /usr/lib/jvm/default-jvm/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=UTF-8 -noverify -Xmx1G -XX:+UseG1GC -XX:+UseStringDeduplication -jar /tmp/vscode-unpacked/redhat.java.latest.vjpvzgzlbh.java-0.45.0-1523.vsix/extension/server/plugins/org.eclipse.equinox.launcher_1.5.400.v20190514-1658.jar -configuration /tmp/vscode-unpacked/redhat.java.latest.vjpvzgzlbh.java-0.45.0-1523.vsix/extension/server/config_linux -data /home/theia/.theia/workspace-storage/be0a81bfde25dc291c35808bdaf5f836/redhat.java/jdt_ws

And I have eventually found the log as well:

$ cat /home/theia/.theia/workspace-storage/be0a81bfde25dc291c35808bdaf5f836/redhat.java/jdt_ws/.metadata/.log
!SESSION 2019-06-11 22:27:50.280 -----------------------------------------------
eclipse.buildId=unknown
java.version=11.0.4
java.vendor=Alpine
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Command-line arguments:  -data /home/theia/.theia/workspace-storage/be0a81bfde25dc291c35808bdaf5f836/redhat.java/jdt_ws

!ENTRY org.eclipse.jdt.ls.core 1 0 2019-06-11 22:27:53.969
!MESSAGE class org.eclipse.jdt.ls.core.internal.JavaLanguageServerPlugin is started

!ENTRY org.eclipse.jdt.ls.core 1 0 2019-06-11 22:27:54.138
!MESSAGE Main thread is waiting

!ENTRY org.eclipse.jdt.ls.core 1 0 2019-06-11 22:27:54.164
!MESSAGE >> initialize

!ENTRY org.eclipse.jdt.ls.core 1 0 2019-06-11 22:27:54.164
!MESSAGE Initializing Java Language Server 0.39.0.201905152234

!ENTRY org.eclipse.jdt.ls.core 1 0 2019-06-11 22:27:54.179
!MESSAGE Installed reference:file:/tmp/vscode-unpacked/redhat.java.latest.acyovsjggi.vscode-java-debug-0.19.0.vsix/extension/server/com.microsoft.java.debug.plugin-0.19.0.jar

!ENTRY org.eclipse.jdt.ls.core 1 0 2019-06-11 22:27:54.275
!MESSAGE Creating the Java project jdt.ls-java-project

!ENTRY org.eclipse.jdt.ls.core 1 0 2019-06-11 22:27:54.282
!MESSAGE Started reference:file:/tmp/vscode-unpacked/redhat.java.latest.acyovsjggi.vscode-java-debug-0.19.0.vsix/extension/server/com.microsoft.java.debug.plugin-0.19.0.jar

!ENTRY org.eclipse.jdt.ls.core 1 0 2019-06-11 22:27:54.330
!MESSAGE >> initialized

!ENTRY org.eclipse.jdt.ls.core 1 0 2019-06-11 22:27:54.509
!MESSAGE Finished creating the Java project jdt.ls-java-project

!ENTRY org.eclipse.jdt.ls.core 1 0 2019-06-11 22:27:55.701
!MESSAGE Workspace initialized in 1524ms

!ENTRY org.eclipse.jdt.ls.core 1 0 2019-06-11 22:27:55.784
!MESSAGE >> initialization job finished

!ENTRY org.eclipse.jdt.ls.core 1 0 2019-06-11 22:27:55.795
!MESSAGE >> workspace/didChangeConfiguration

!ENTRY org.eclipse.jdt.ls.core 1 0 2019-06-11 22:27:55.837
!MESSAGE >>New configuration: {java={debug={logLevel=warn, settings={showHex=false, showStaticVariables=false, showQualifiedNames=false, showLogicalStructure=true, showToString=true, maxStringLength=0.0, hotCodeReplace=manual, enableRunDebugCodeLens=true, forceBuildBeforeLaunch=true, console=internalConsole}}, home=null, jdt={ls={vmargs=-noverify -Xmx1G -XX:+UseG1GC -XX:+UseStringDeduplication}}, errors={incompleteClasspath={severity=warning}}, configuration={checkProjectSettingsExclusions=true, updateBuildConfiguration=interactive, maven={userSettings=null}}, trace={server=off}, import={maven={enabled=true}, gradle={enabled=true, wrapper={enabled=true}, version=null}, exclusions=[**/node_modules/**, **/.metadata/**, **/archetype-resources/**, **/META-INF/maven/**]}, maven={downloadSources=false}, referencesCodeLens={enabled=false}, signatureHelp={enabled=false}, implementationsCodeLens={enabled=false}, format={enabled=true, settings={url=null, profile=null}, comments={enabled=true}, onType={enabled=true}}, saveActions={organizeImports=false}, contentProvider={preferred=null}, autobuild={enabled=true}, maxConcurrentBuilds=1.0, completion={enabled=true, overwrite=true, guessMethodArguments=false, favoriteStaticMembers=[org.junit.Assert.*, org.junit.Assume.*, org.junit.jupiter.api.Assertions.*, org.junit.jupiter.api.Assumptions.*, org.junit.jupiter.api.DynamicContainer.*, org.junit.jupiter.api.DynamicTest.*, org.mockito.Mockito.*, org.mockito.ArgumentMatchers.*, org.mockito.Answers.*], importOrder=[java, javax, com, org]}, foldingRange={enabled=true}, progressReports={enabled=true}, codeGeneration={hashCodeEquals={useJava7Objects=false, useInstanceof=false}, useBlocks=false, generateComments=false}}}

!ENTRY org.eclipse.jdt.ls.core 1 0 2019-06-11 22:27:56.033
!MESSAGE >> build jobs finished

!ENTRY org.eclipse.jdt.ls.core 1 0 2019-06-11 22:27:56.038
!MESSAGE >> registerFeature 'workspace/didChangeWatchedFiles'

!ENTRY org.eclipse.jdt.ls.core 1 0 2019-06-11 22:27:56.039
!MESSAGE >> registerFeature 'workspace/didChangeWatchedFiles'

!ENTRY org.eclipse.jdt.ls.core 1 0 2019-06-11 22:27:56.040
!MESSAGE >> watchers registered

!ENTRY org.eclipse.jdt.ls.core 1 0 2019-06-11 22:28:00.632
!MESSAGE >> workspace/didChangeConfiguration

!ENTRY org.eclipse.jdt.ls.core 1 0 2019-06-11 22:28:00.660
!MESSAGE >>New configuration: {java={debug={logLevel=warn, settings={showHex=false, showStaticVariables=false, showQualifiedNames=false, showLogicalStructure=true, showToString=true, maxStringLength=0.0, hotCodeReplace=manual, enableRunDebugCodeLens=true, forceBuildBeforeLaunch=true, console=internalConsole}}, home=null, jdt={ls={vmargs=-noverify -Xmx1G -XX:+UseG1GC -XX:+UseStringDeduplication}}, errors={incompleteClasspath={severity=warning}}, configuration={checkProjectSettingsExclusions=false, updateBuildConfiguration=interactive, maven={userSettings=null}}, trace={server=off}, import={maven={enabled=true}, gradle={enabled=true, wrapper={enabled=true}, version=null}, exclusions=[**/node_modules/**, **/.metadata/**, **/archetype-resources/**, **/META-INF/maven/**]}, maven={downloadSources=false}, referencesCodeLens={enabled=false}, signatureHelp={enabled=false}, implementationsCodeLens={enabled=false}, format={enabled=true, settings={url=null, profile=null}, comments={enabled=true}, onType={enabled=true}}, saveActions={organizeImports=false}, contentProvider={preferred=null}, autobuild={enabled=true}, maxConcurrentBuilds=1.0, completion={enabled=true, overwrite=true, guessMethodArguments=false, favoriteStaticMembers=[org.junit.Assert.*, org.junit.Assume.*, org.junit.jupiter.api.Assertions.*, org.junit.jupiter.api.Assumptions.*, org.junit.jupiter.api.DynamicContainer.*, org.junit.jupiter.api.DynamicTest.*, org.mockito.Mockito.*, org.mockito.ArgumentMatchers.*, org.mockito.Answers.*], importOrder=[java, javax, com, org]}, foldingRange={enabled=true}, progressReports={enabled=true}, codeGeneration={hashCodeEquals={useJava7Objects=false, useInstanceof=false}, useBlocks=false, generateComments=false}}}

!ENTRY org.eclipse.jdt.ls.core 1 0 2019-06-11 22:28:01.643
!MESSAGE >> workspace/didChangeWatchedFiles

!ENTRY org.eclipse.jdt.ls.core 1 0 2019-06-11 22:28:18.219
!MESSAGE >> document/didOpen

!ENTRY org.eclipse.jdt.ls.core 1 0 2019-06-11 22:28:18.229
!MESSAGE Classpath is incomplete. Only syntax errors will be reported for file:///projects/petclinic/src/main/java/org/springframework/samples/petclinic/PetClinicApplication.java

!ENTRY org.eclipse.jdt.ls.core 1 0 2019-06-11 22:28:18.550
!MESSAGE >> document/codeAction

!ENTRY org.eclipse.jdt.ls.core 1 0 2019-06-11 22:28:18.555
!MESSAGE >> document/foldingRange

!ENTRY org.eclipse.jdt.ls.core 1 0 2019-06-11 22:28:18.556
!MESSAGE >> workspace/executeCommand vscode.java.resolveMainMethod

!ENTRY java-debug 1 0 2019-06-11 22:28:18.561
!MESSAGE Starting com.microsoft.java.debug.plugin

!ENTRY org.eclipse.jdt.ls.core 1 0 2019-06-11 22:28:18.737
!MESSAGE Reconciled 0. Took 44 ms

!ENTRY org.eclipse.jdt.ls.core 1 0 2019-06-11 22:28:19.207
!MESSAGE begin problem for /PetClinicApplication.java

!ENTRY org.eclipse.jdt.ls.core 1 0 2019-06-11 22:28:19.208
!MESSAGE 0 problems reported for /PetClinicApplication.java

!ENTRY org.eclipse.jdt.ls.core 1 0 2019-06-11 22:28:19.210
!MESSAGE Validated 1. Took 72 ms
~ $

@l0rd
Copy link
Contributor Author

l0rd commented Jun 11, 2019

The thing that I see that is not right with this workspace is a container that is OOMKilled (but that's not jdt-ls one):

UPDATE I have fixed the problem with the container OOMKilled (not enough memory for the yaml LS) but I still have the Java LS log file error.

$ k describe pod workspace1bszgp7t1ogdm5xu.workspace-5b9c6df86-ksfnn
(...)
  2au:
    Container ID:   docker://fd8d5eb50aa2bfa8330c5d32df6a334ce3c9c0267d69bb9c4988f72fcd19122d
    Image:          eclipse/che-theia-endpoint-runtime:next
    Image ID:       docker-pullable://eclipse/che-theia-endpoint-runtime@sha256:74885ed9f5ea6b6b11866ab2c3e834841a4e89d07d895cc7651e16b724c94f5f
    Port:           <none>
    Host Port:      <none>
    State:          Running
      Started:      Wed, 12 Jun 2019 00:28:04 +0200
    Last State:     Terminated
      Reason:       OOMKilled
      Exit Code:    137
      Started:      Wed, 12 Jun 2019 00:27:41 +0200
      Finished:     Wed, 12 Jun 2019 00:27:47 +0200
    Ready:          True
    Restart Count:  2
    Limits:
      memory:  134217728
    Requests:
      memory:  134217728
    Environment:
      THEIA_PLUGINS:                         local-dir:///plugins/sidecars/redhat_vscode_yaml_latest
      CHE_WSAGENT_CORS_ALLOW__CREDENTIALS:   true
      CHE_MACHINE_TOKEN:
      CHE_WORKSPACE_WSAGENT__JAVA__OPTIONS:  -XX:MaxRAM=600m -XX:MaxRAMFraction=1 -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xms50m -Dfile.encoding=UTF8 -Djava.security.egd=file:/dev/./urandom
      JAVA_OPTS:                             -XX:MaxRAM=150m -XX:MaxRAMFraction=2 -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xms20m -Djava.security.egd=file:/dev/./urandom
      CHE_PROJECTS_ROOT:                     /projects
      CHE_API:                               http://che-che.192.168.99.100.nip.io/api
      MAVEN_OPTS:                            -XX:MaxRAM=150m -XX:MaxRAMFraction=2 -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xms20m -Djava.security.egd=file:/dev/./urandom
      CHE_WORKSPACE_NAME:                    petclinic-dev-environment
      CHE_WORKSPACE_LOGS_ROOT__DIR:          /workspace_logs
      CHE_WSAGENT_CORS_ENABLED:              true
      CHE_WORKSPACE_NAMESPACE:               che
      CHE_MACHINE_NAME:                      2au
      CHE_API_INTERNAL:                      http://che-che.192.168.99.100.nip.io/api
      CHE_WORKSPACE_ID:                      workspace1bszgp7t1ogdm5xu
      CHE_API_EXTERNAL:                      http://che-che.192.168.99.100.nip.io/api
      CHE_AUTH_ENABLED:                      false
    Mounts:
      /plugins from claim-che-workspace (rw)
      /projects from claim-che-workspace (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from che-workspace-token-c6nck (ro)
      /workspace_logs from claim-che-workspace (rw)
(...)

And this is the container log

$ kubectl logs workspace1bszgp7t1ogdm5xu.workspace-5b9c6df86-ksfnn -c 2au
Starting the deployer with the list of resolvers [ LocalDirectoryPluginDeployerResolver {},
  GithubPluginDeployerResolver { unpackedFolder: '/tmp/github-remote' },
  HttpPluginDeployerResolver { unpackedFolder: '/tmp/http-remote' },
  VsCodePluginDeployerResolver { vscodeExtensionsFolder: '/tmp/vscode-extension-marketplace' } ]
Theia Endpoint 18/pid listening on port 2505
Found the list of default plugins ID on env: undefined
Found the list of plugins ID on env: local-dir:///plugins/sidecars/redhat_vscode_yaml_latest
Found the list of default plugins ID from CLI: undefined
unzipping the plugin ProxyPluginDeployerEntry {
  deployer:
   PluginVsCodeFileHandler { unpackedFolder: '/tmp/vscode-unpacked' },
  delegate:
   PluginDeployerEntryImpl {
     originId: 'local-dir:///plugins/sidecars/redhat_vscode_yaml_latest',
     pluginId:
      'redhat.vscode-yaml.latest.ezywmsemkz.redhat.vscode-yaml-0.4.0.vsix',
     map: Map {},
     changes: [],
     acceptedTypes: [],
     currentPath:
      '/plugins/sidecars/redhat_vscode_yaml_latest/redhat.vscode-yaml.latest.ezywmsemkz.redhat.vscode-yaml-0.4.0.vsix',
     initPath:
      '/plugins/sidecars/redhat_vscode_yaml_latest/redhat.vscode-yaml.latest.ezywmsemkz.redhat.vscode-yaml-0.4.0.vsix',
     resolved: true,
     resolvedByName: 'LocalDirectoryPluginDeployerResolver' },
  deployerName: 'PluginVsCodeFileHandler' }
(node:18) UnhandledPromiseRejectionWarning: Error: ENOMEM: not enough memory, write
(node:18) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:18) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

@tsmaeder
Copy link
Contributor

This works now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Outline of a bug - must adhere to the bug report template.
Projects
None yet
Development

No branches or pull requests

2 participants