NSight Eclipse won't launch, Ubuntu 18.04

I’ve successfully installed CUDA, and the installation guide says everything is included when using the

sudo apt-get install cuda

command. I’ve tested it on a sample and it works, also the version is correct, and the PATH is set.

When I try launching NSight this happens:

If I type ‘nsight’ into terminal:

OpenJDK 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0
CompileCommand: exclude java/lang/reflect/Array.newInstance
Gtk-Message: 17:22:30.981: Failed to load module "canberra-gtk-module"
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.eclipse.osgi.storage.FrameworkExtensionInstaller (file:/usr/local/cuda-10.1/libnsight/plugins/org.eclipse.osgi_3.10.1.v20140909-1633.jar) to method java.net.URLClassLoader.addURL(java.net.URL)
WARNING: Please consider reporting this to the maintainers of org.eclipse.osgi.storage.FrameworkExtensionInstaller
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Gtk-Message: 17:22:34.422: Failed to load module "canberra-gtk-module"

Once NSight starts (either from the terminal or using the OS GUI) it asks me for a workspace folder, I use the default one.
Shortly after I get a prompt saying there’s an error log inside the workspace folder, the .log file read:

!SESSION 2019-03-25 17:04:10.454 -----------------------------------------------
eclipse.buildId=unknown
java.version=10.0.2
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Command-line arguments:  -os linux -ws gtk -arch x86_64

!ENTRY com.nvidia.cuda.ide.build 4 0 2019-03-25 17:04:11.433
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: com.nvidia.cuda.ide.build [9]
  Unresolved requirement: Require-Bundle: org.eclipse.cdt.managedbuilder.core
    -> Bundle-SymbolicName: org.eclipse.cdt.managedbuilder.core; bundle-version="8.3.0.201409172108"; singleton:="true"
       org.eclipse.cdt.managedbuilder.core [108]
         Unresolved requirement: Require-Bundle: org.eclipse.cdt.core; bundle-version="[5.0.0,6.0.0)"
           -> Bundle-SymbolicName: org.eclipse.cdt.core; bundle-version="5.7.0.nvidia-qualifier"; singleton:="true"
              org.eclipse.cdt.core [88]
                Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=1.7))"

	at org.eclipse.osgi.container.Module.start(Module.java:434)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1561)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)

I’m new to Linux so forgive if I’m not seeing the obvious.
Cheers.

It is likely that you haven’t installed openjdk-8, try:
sudo apt install openjdk-8-jdk
And after the installation, you may use the command below to run your Nsight:
nsight -vm /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java

2 Likes

Wow - I stumbled upon this link via a duckduckgo.com searching text out of the ~/.metadata/.log file. I had nearly the exact same error messages. Your solution fixed my problem - Thank You! -

Thanks, Nsight finally launches after running the command

nsight -vm /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java

But how do I make this permanent for starting nsight each time?

To answer my own query, the following link helped me in solving the issue, thanks :)

https://devtalk.nvidia.com/default/topic/1041766/jetson-agx-xavier/nsight-not-working-with-me/

Same error on ubuntu 19.10 with cuda 10.2 (18.04).

nsight -vm /usr/lib/jvm/java-11-openjdk-amd64/bin/java

OpenJDK 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0
CompileCommand: exclude java/lang/reflect/Array.newInstance
Gtk-Message: 15:36:50.435: Failed to load module "canberra-gtk-module"
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.eclipse.osgi.storage.FrameworkExtensionInstaller (file:/usr/local/cuda-10.2/libnsight/plugins/org.eclipse.osgi_3.10.1.v20140909-1633.jar) to method java.net.URLClassLoader.addURL(java.net.URL)
WARNING: Please consider reporting this to the maintainers of org.eclipse.osgi.storage.FrameworkExtensionInstaller
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Gtk-Message: 15:36:54.477: Failed to load module "canberra-gtk-module"
!SESSION 2020-03-03 12:33:30.169 -----------------------------------------------
eclipse.buildId=unknown
java.version=11.0.6
java.vendor=Ubuntu
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Command-line arguments:  -os linux -ws gtk -arch x86_64

!ENTRY com.nvidia.cuda.ide.build 4 0 2020-03-03 12:33:31.441
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: com.nvidia.cuda.ide.build [9]
  Unresolved requirement: Require-Bundle: org.eclipse.cdt.managedbuilder.core
    -> Bundle-SymbolicName: org.eclipse.cdt.managedbuilder.core; bundle-version="8.3.0.201409172108"; singleton:="true"
       org.eclipse.cdt.managedbuilder.core [108]
         Unresolved requirement: Require-Bundle: org.eclipse.cdt.core; bundle-version="[5.0.0,6.0.0)"
           -> Bundle-SymbolicName: org.eclipse.cdt.core; bundle-version="5.7.0.nvidia-qualifier"; singleton:="true"
              org.eclipse.cdt.core [88]
...

Hi ggmartins,
I’ve noticed that your OpenJDK version maybe 11,
here:

java.version=11.0.6

I finally solved my problem by installing OpenJDK-8,which is

sudo apt install openjdk-8-jdk

And launch it with

nsight -vm /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java

To fix this problem, this link below will teach you how to set your JVM to version 8, and you don’t need to type the command each time.

https://devtalk.nvidia.com/default/topic/1041766/jetson-agx-xavier/nsight-not-working-with-me/

However I’m still not sure if Night will launch on OpenJDK-11.If you managed to do so, be sure to let me know. :)