Reading-eScience-Centre / ncwms

ncWMS - A Web Map Service for displaying environmental data over the web
Other
63 stars 30 forks source link

Crashing when trying to use contours (java.lang.InternalError) #90

Closed jbzambon closed 2 years ago

jbzambon commented 2 years ago

I'm having a problem where ncwms2 shuts down completely whenever a request for contours is made. I've attached the catalina.out logfile of the event. The top lines are

Exception in thread "http-nio-8080-exec-5" java.lang.InternalError: java.lang.reflect.InvocationTargetException
    at java.desktop/sun.font.FontManagerFactory$1.run(FontManagerFactory.java:87)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
    at java.desktop/sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:75)

I'm sorry to be spamming the issue board as I get spun up on this service!

-Joe

Versions I'm using... /ncwms2/jdk/bin/java --version openjdk 17.0.2 2022-01-18 OpenJDK Runtime Environment (build 17.0.2+8-86) OpenJDK 64-Bit Server VM (build 17.0.2+8-86, mixed mode, sharing) apache-tomcat-8.5.76 Running ncWMS v2.5.2

java_error.txt

guygriffiths commented 2 years ago

That seems to be an issue with missing fonts. We use a third-party library to handle contour rendering. From what I can find, it seems like you could be missing libfontconfig.so. How are you running this (e.g. Docker, just on a VM, etc)?

jbzambon commented 2 years ago

Yes, that was the issue, missing that lib. Fixed the issue with 2 commands and then restarted Tomcat. Feel free to close out, thanks again!

sudo apt-get update -y
sudo apt-get install -y libfontconfig