How to change GLOBAL_OFFLINE configuration when graph can't be instantiated
toom@...
Hi,
I am in a case where the index backend has been incorrectly configured to Elasticsearch. Now, when I try to instantiate my graph database, I get a "ConnectException: Connection refused", even if I set('index.search.backend', 'lucene') in JanusGraphFactory. The setting index.backend is global offline, I should update it when the graph is instantiated but how can I change it if the instantiation fails ? Thanks |
|
hadoopmarc@...
Hi,
JanusGraph keeps a record of open instances that sometimes is not updated properly. You can clean it with the methods here: https://docs.janusgraph.org/advanced-topics/recovery/#janusgraph-instance-failure Maybe it is no problem if your graph is dropped entirely, so you can also check: https://docs.janusgraph.org/basics/common-questions/#dropping-a-database After dropping, the graph can be recreated with the right configs. Best wishes, Marc |
|
toom@...
Thank you for your reply. In my case I can remove the database and create a new one. But what should I do if I want to retrieve data from a JanusGraph database in which the configured index backend is not available ? Is there any way to disable index backend without instantiating the database ? Or to make the index errors not fatal during the instantiation (in order to change configuration) ? Toom. |
|
hadoopmarc@...
Hi Toom, |
|
toom@...
Hi Marc,
Your solution works if the configuration hasn't been changed yet. If you change the index backend and set a wrong hostname, you cannot access your data anymore: mgmt = graph.openManagement() mgmt.set("index.search.backend", "elasticsearch") mgmt.set("index.search.hostname", "non-existant.hostname") mgmt.commit() Then the database cannot be open. Regards, Toom. |
|