Native library cannot be found when starting Ray

How severe does this issue affect your experience of using Ray?

  • High: It blocks me to complete my task.

I’m using Ray 1.9.2. When I run my code, that uses Ray, it works fine on Mac (12.5), but not linux (Red Hat Enterprise Linux 8.4). I get an error with the attached callstack. Any help would be appreciated.

 INFO RunManager [main]: Ray runtime started @ 172.17.0.2.
 ERROR DefaultRayRuntimeFactory [main]: Failed to initialize ray runtime, with config {"ray":{"address":"172.17.0.2:6318","head-args":[],"job":{"code-search-path":"","id":"","jvm-options":[],"namespace":"","num-java-workers-per-process":1,"worker-env":{}},"logging":{"dir":"","level":"INFO","loggers":[],"max-backup-files":10,"max-file-size":"500MB","pattern":"%d{yyyy-MM-dd HH:mm:ss,SSS} %p %c{1} [%t]: %m%n"},"object-store":{"socket-name":null},"raylet":{"node-manager-port":0,"socket-name":null,"startup-token":0},"redis":{"password":"12398176"},"run-mode":"CLUSTER","session-dir":null}}
       java.lang.NullPointerException: {} doesnt exist. [native/linux/libcore_worker_library_java.so]
           at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:994) ~[tester.jar:?]
           at io.ray.runtime.util.BinaryFileUtil.getNativeFile(BinaryFileUtil.java:63) ~[tester.jar:?]
           at io.ray.runtime.util.JniUtils.loadLibrary(JniUtils.java:67) ~[tester.jar:?]
           at io.ray.runtime.RayNativeRuntime.start(RayNativeRuntime.java:77) ~[tester.jar:?]
           at io.ray.runtime.DefaultRayRuntimeFactory.createRayRuntime(DefaultRayRuntimeFactory.java:39) ~[tester.jar:?]

Can you explain how you installed Ray on your Linux machine? Looks to me that your ray installation is incomplete.

Sorry for the late response. You were right about this being an installation issue. I created a new conda environment and resolved the packages and this issue got fixed.