Problem with setting up JanusGraph with Solr on k8s

Hi All, I am trying to connect my JanusGraph instance to Solr. Both are hosted on K8s cluster. I am using JanusGraph docker image version:1.0.0-rc2 (Looks like it is using solrJ 8.11.2) For Solr I am using following helm charts from: https://solr.apache.org/operator/resources.html The chart version is 0.7.0 and as per release notes it is deploying Solr 8.11.0 and I am deploying Solr as SolrCloud. I am getting following exceptions: ERROR org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor.<init> - Could not invoke constructor on class org.janusgraph.graphdb.management.JanusGraphManager (defined by the 'graphManager' setting) with one argument of class Settings Caused by: java.lang.IllegalArgumentException: Could not instantiate implementation: org.janusgraph.diskstorage.solr.SolrIndex Caused by: java.lang.reflect.InvocationTargetException Caused by: java.lang.NoSuchMethodError: 'java.lang.Object org.noggit.ObjectBuilder.getValStrict()' at org.apache.solr.common.util.Utils.fromJSON(Utils.java:319) ~[solr-solrj-8.11.2.jar:8.11.2 17dee71932c683e345508113523e764c3e4c80fa - mdrob - 2022-06-13 11:27:56] at org.apache.solr.common.util.Utils.fromJSON(Utils.java:305) ~[solr-solrj-8.11.2.jar:8.11.2 17dee71932c683e345508113523e764c3e4c80fa - mdrob - 2022-06-13 11:27:56] at org.apache.solr.common.cloud.ClusterState.load(ClusterState.java:245) ~[solr-solrj-8.11.2.jar:8.11.2 17dee71932c683e345508113523e764c3e4c80fa - mdrob - 2022-06-13 11:27:56] at org.apache.solr.common.cloud.ZkStateReader.refreshLegacyClusterState(ZkStateReader.java:639) ~[solr-solrj-8.11.2.jar:8.11.2 17dee71932c683e345508113523e764c3e4c80fa - mdrob - 2022-06-13 11:27:56] Logs indicate that is was able to connect to ZooKeeper. Based on search, the error indicates a mismatch in noggit version. Looks like Solr code uses a forked version of noggit. As per janusGraph release notes, it is tested against Solr 8.11.1 Any suggestions around how to debug or mitigate this issue? Thanks in advance.
Resources
All resources are currently found in the Solr Operator repository, but will eventually be moved to the website. Tutorials Solr...
7 Replies
Florian Hockmann
Florian Hockmann13mo ago
This was originally asked by @vc03 in our previous questions chat: ⁠https://discord.com/channels/981533699378135051/982256175196295180/1110468972324847677
vc03
vc0313mo ago
Can someone please help with this? I am suspecting this is happening because noggit version used by JanusGraph 1.0.0-rc2 docker image is 0.6.0 but the one used by Solr 8.11.x is 0.9.0. If that is true, how can I make JanusGraph docker image use newer version of noggit?
Florian Hockmann
Florian Hockmann13mo ago
Could you try whether this works with the 0.6 image of JanusGraph? Would be good to know whether this is a new problem or whether it was already present in older versions. JanusGraph 0.6 should also work with Solr 8 according to the version compatibility matrix: https://docs.janusgraph.org/master/changelog/#currently-supported
Florian Hockmann
Florian Hockmann13mo ago
For the noggit versions: I only found one direct dependency on noggit in JanusGraph which currently uses version 0.8: https://github.com/JanusGraph/janusgraph/blob/master/janusgraph-driver/pom.xml#L52 but we could of course get an older version through some other dependency
GitHub
janusgraph/pom.xml at master · JanusGraph/janusgraph
JanusGraph: an open-source, distributed graph database - janusgraph/pom.xml at master · JanusGraph/janusgraph
vc03
vc0313mo ago
This is the error I get when I try JanusGraph DockerImage 0.6.3
vc03
vc0313mo ago
I was able to overcome the problem I was facing. The root cause was the presence of a "noggit-0.8.0.jar" file in the "lib" folder. After examining the source code of noggit, it became apparent that the version 0.8.0 does not include the required method definition. The Solr client already includes its own version of noggit. The problem arises when JanusGraph invokes the Solr client (solrj), which attempts to locate the noggit binary with the "java.lang.Object org.noggit.ObjectBuilder.getValStrict()" method. However, it ends up loading the noggit 0.8.0 version from the "lib" folder. By removing the jar file from the lib folder in the container image, the issue was resolved, and I was able to proceed. The only concern is that I am uncertain about the potential side effects of removing the jar file. Also, May I know the proper procedure for requesting a bug fix for this issue.
Bo
Bo13mo ago
The only concern is that I am uncertain about the potential side effects of removing the jar file.
To my best knowledge, it's used by JanusGraph for Geoshape parsing. So as long as you don't have Geoshape type, it should be fine.
May I know the proper procedure for requesting a bug fix for this issue
You could just create a new issue on GitHub
Want results from more Discord servers?
Add your server