SEVERE: Failed to initialize the database + Apply-Orbit-File failure

#snap #s2tbx #s1tbx
log.txt (9.7 KB)
Hello! I looked at the other posts with the “Failed to Initialize the Database” titles, and they weren’t quite like the one I’m getting. I use snap on the command line (I ssh into this system and do not have sudo permission). For context, I am trying to execute a graph (.xml): Apply-Orbit-File, Remove-GRD-Border-Noise, ThermalNoiseRemoval, Calibration, and Terrain Correction on S1 files. I tested the .xml on my local machine and it works fine. I’ve spent too much time trying to debug my issues, so I’m coming here for help.

First, here is some of my system info:

NAME="Red Hat Enterprise Linux Server"
VERSION="7.9 (Maipo)"
PRETTY_NAME="Red Hat Enterprise Linux"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"

Other Info:

Java: ~/jdk-21.0.1/bin/java which is added to path.
Conda: ~/anaconda3/bin/conda and version conda 4.9.2 also added to path
GDAL (I think??): ~/anaconda3/envs/gee/bin/gdalinfo

Finally, attached is the log. Some things that I noticed:

  • SEVERE: org.esa.snap.product.library.v2.activator.ProductLibraryActivator: Failed to initialize the database.
  • org.h2.jdbc.JdbcSQLException: Database may be already in use: “Locked by another process: /home/name/.snap/product-library/products.lock.db”. Possible solutions: close all other connection(s); use the server mode [90020-197]
  • INFO: org.esa.s2tbx.dataio.gdal.GDALVersion: Internal GDAL 3.2.1 set to be used by SNAP.
    Native library load failed.
  • java.lang.UnsatisfiedLinkError: /home/6ru/.snap/auxdata/gdal/gdal-3-2-1/lib/jni/ /lib64/ version `GLIBC_2.27’ not found (required by /home/6ru/.snap/auxdata/gdal/gdal-3-2-1/lib/jni/
  • SEVERE: org.esa.s2tbx.dataio.gdal.GDALLoader: Failed to initialize GDAL native drivers. GDAL readers and writers were
  • WARNING: org.esa.s1tbx.orbits.gpf.ApplyOrbitFileOp: No valid orbit file found for 01-JUN-2019 15:44:50.468925
  • P.S. Most of my images DO have orbit files that should be found, but the ApplyOrbitFile function fails here. I assume because of one of the previous errors.

What I’ve done so far:

  • I tried deleting the .snap folder
  • I tried deleting .snap/auxdata/gdal/
  • I added s2tbx.dataio.gdal.installed=false to and that didn’t help.
  • I installed Java to my home directory
  • I ran the bash script executing the snap graph while in my conda environment
  • And definitely other things I can’t think of

The UnsatisfiedLinkError for GDAL is likely due to a mismatch in the GLIBC version. Red Hat 7.9 typically comes with GLIBC 2.17, while SNAP’s bundled GDAL requires 2.27. This could be a trickier issue to resolve without access to system libraries or sudo permissions.
I’d suggest to try using a SNAP version bundled with a compatible GDAL version, or setting up a local installation of GDAL that matches the GLIBC on your system.

Thanks for the info. To preface, I’m not a computer scientist, so I’m not well versed in OS-related issues, building, etc. So to start, I did not know what GLIBC was. I’m erring toward your suggestion of the local installation of GDAL that matches GLIBC 2.17. Would you happen to know where I can find what I need to download to get the right GDAL install? Thx again.

#snap #s1tbx #s2tbx
New log:
log_01.txt (9.8 KB)

I created a new conda environment specifically for gdal version 2.3.3 which doesn’t throw me the GLIBC 2.17 issue anymore. But my graph execution still fails. Attached above is the new log. I think maybe the problem lies in this error message:

java.lang.UnsatisfiedLinkError: /home/name/.snap/auxdata/gdal/gdal-2-3-X-jni/ cannot open shared object file: No such file or directory

I’m thinking it’s to do with my java? I’m remembering that the python setup for SNAP failed. I was able to run snap --nosplash --python /home/6ru/anaconda3/envs/snap/bin/python without fail by following these steps: linux - ESA's snap-python (snappy) isn't working with python 3.5 and later - Stack Overflow

Still didn’t help me.

I solved this. I guess I didn’t fully complete the installation of snap. I had to port-forward the snap GUI to see that there was a red exclamation point on the bottom right saying I needed to update two drivers, and that I should restart snap. I did what it said, and now it works. So if you’re using the command line to install and use SNAP on an old OS, good luck out there…

1 Like