I am trying to create a janusgraph cluster with cassandra as backend and elastic for indexing. Getting a warning saying -
org.janusgraph.core.SchemaViolationException: Adding this property for key [~T$SchemaName] and value [rtusername] violates a uniqueness constraint [SystemIndex#~T$SchemaName]
followed by a error saying
ERROR org.apache.tinkerpop.gremlin.server.GremlinServer - Gremlin Server Error
java.lang.IllegalStateException: Could not create/configure Authenticator null
Can someone please help me understand what I am missing here? What does rtusername actually mean here
Things to check for the first error message:
is an old graph with the same value for the keyspace present (beware for the default value "janusgraph")?
was the property key added by a different gremlin client (check by printing the schema, before adding the property key)?
are you sure this happens during adding the property key to the schema (because this error can also happen while adding a property to a vertex of the graph)
The second error message is related to the communication between your gremlin client and the JanusGraph Server. Things to check:
do the TinkerPop versions of the gremlin client and the JanusGraph Server match (compatibility matrix)?
Related
I'm connecting to a remote JanusGraph server. There is no problem with the connection but I can't understand the Java API.
I'm running a Java Spring HTTP server. Inside the HTTP response method, I'm creating a graph traversal source like
GraphTraversalSource g = traversal().withRemote("conf/remote-graph.properties");
It seems fine. But When I want to get data about a Vertex I can not with the below code.
g.V(28712).next().keys()
IT GIVES AN EMPTY RESPONSE! WHY?
If I do the same with gremlin shell, I see it. See the below picture
If I do g.V(28712).valueMap(true).unfold().toList(); in Java, I see some results.
I just want to fetch data for a vertex or edge with Java. How should I do that?
thanks
By default, when you connect to a Gremlin Server using one of the Gremlin clients and you ask for a vertex, what you get back is a reference vertex. A reference vertex just contains the ID and the label. To get some properties you need to include them using valueMap, elementMap, project etc. Alternatively you can configure the Gremlin Server to return all properties. The default is set this way to reduce the amount of data that gets sent back to a client.
Please see the documentation for further details.
https://tinkerpop.apache.org/docs/current/reference/#gremlin-applications
https://tinkerpop.apache.org/docs/current/reference/#_properties_of_elements
There is a link in that documentation to a post about why the decisions were made. For convenience, I am including that link here as well.
https://lists.apache.org/thread.html/e959e85d4f8b3d46d281f2742a6e574c7d27c54bfc52f802f7c04af3%40%3Cdev.tinkerpop.apache.org%3E
I've sent a gremlin statement which fails with the following error:
{"code":"InternalFailureException","requestId":"d924c667-2c48-4a7e-a288-6f23bac6283a","detailedMessage":"null: .property(Cardinality, , String)"} (599)
I've enabled audit logs on the cluster side but there aren't any indications for any errors there although I see the request.
Are there any technics to debug such problems with AWS Neptune?
Since the gremlin is built dynamically and builds complicated graphs with thousands of operations, I'm looking for some way to understand better where the error is.
In one case it turned out the payload was too big and in another, the gremlin bytecode failed although it worked great on the local Tinkerpop Server.
But with the generic internal failure exception it is very hard to pinpoint the issues.
I'm using the Node.js gremlin package (3.5.0).
Thanks for the clarifications. As a side note, Neptune is not yet at the 3.5.0 TinkerPop level so there is always the possibility of mismatches between client and server. The audit log only shows the query received. It does not reflect the results of running the query. When I am debugging issues like this one, I often create a text version of the query (the node client has a translator that can do that for you) and use the Neptune REST API to first of all check the /explain plan - you can also generate that from the Neptune notebooks using %%gremlin explain. If nothing obvious shows up in the explain plan I usually try to run the text version of the query just to see if anything shows up - to rule out the client driver. I also sometimes run my query against a TinkerGraph just to see if the issue is as simple as Neptune not returning the best error message it could. If the text query should work, changing the Node.js Gremlin client driver to 3.4.11 is worth trying.
UPDATED to add a link to the documentation on Gremlin translators.
https://tinkerpop.apache.org/docs/current/reference/#translators
I am getting this error on cloudhub "org.mule.runtime.api.store.ObjectAlreadyExistsException: Object already exists for the key".
I am using object store in my application. Where I am checking if the value is available in object store and then store it only if it is not available. I have set the option to "Fail if present" as false, still seeing this error.
How to resolve this?
I observed that this issue is coming only when I am using two workers in cloudhub.
Thanks in advance.
Edited:
Using Object Store connector and mule 4.3.
I am checking in object store using Contains if value exists. If it does then Retrieving the value else Storing it to OS.
Error
Edit2:
ObjectStore in Cloudhub:
The error message indicates that the application is using the default persistent object store. For sharing to multiple workers you should instead use the _defaultUserObjectStore which is in memory. Details are in: https://docs.mulesoft.com/object-store/osv2-faq#how-are-object-store-entries-divided-among-workers
You can try this approach!
Use a retrieve connector and wrap it in Try block. And define it own error handling strategy, in which use store connector in On Error Continue block. What it will do is, first it will try to retrieve the values stored in Object Store. If the keys will be present, respective values will be fetched. If the key is not present, an error will occur which will be handled by the error handler and will store the key to object store.
Setup:
Asp.NET Web Api 2 (Running in Azure Cloud service, 3 instances), Entity Framework 6.1 and Sql Azure
Problem
My application started reporting a ton of weird errors all of a sudden.
When using EF to get entities from the database these types of errors are reported:
"The '{PropertyName}' property on '{TableName}' could not be set to a 'System.String' value. You must set this property to a non-null value of type 'System.Int64'"
And
"The '{PropertyName}' property on '{TableName}' could not be set to a 'System.Int64' value. You must set this property to a non-null value of type 'System.String'."
My interpretation is that the database is returning non-matching objects compared to what I'm trying to map against, but I can't see why that would start happening out of the blue, after running just fine for millions of requests.
While I was writing this I rebooted the api instances and now the errors are gone.
Any help in figuring this out will be highly appreciated.
Turned out the probable cause was a mistake in the setup of the unit of work pattern. Note to self: Do not create a new dbcontext to replace a dbcontext that is being used :)
I have Titan 0.3.2 running in embedded mode, and have been able to create and query ElasticSearch indexes via the Gremlin shell (see previous question). I am using the default configuration, which calls the ES index "search".
These searches return the correct nodes without error via the Gremlin shell:
g.query().has('my_label','abc').vertices()
g.query().has('my_label',CONTAINS,'abc').vertices()
However, if I attempt to run these same Gremlin queries via RexPro, Rexster sends back this error for the first query above:
java.util.concurrent.ExecutionException:
javax.script.ScriptException:
javax.script.ScriptException:
java.lang.IllegalArgumentException: Index is unknown or not configured: search
and this for the second:
java.util.concurrent.ExecutionException:
javax.script.ScriptException:
javax.script.ScriptException:
groovy.lang.MissingPropertyException: No such property: CONTAINS for class: Script3
Similarly, if I try to query on the indexed key via the REST API (GET):
http://localhost:8182/graphs/graph/vertices?key=my_key&value=abc
I receive the same error response:
{"message":"Index is unknown or not configured: search","error":"Index is unknown or not configured: search"}
Lastly, if I try to start with a clean database and run the index creation script through rexpro:
g.makeType().name("my_label").dataType(String.class).indexed("search", Vertex.class).unique(Direction.OUT).makePropertyKey();
I see the same unknown index error:
java.util.concurrent.ExecutionException:
javax.script.ScriptException:
javax.script.ScriptException:
java.lang.IllegalArgumentException: Index is unknown or not configured: search
So it seems that Rexster needs some additional information about the indexing backend, possibly in its configuration file (I am using the default one included with the installation). Anyone familiar with this issue? Happy to provide more information.
You might have a mix of things going on, but the main thing is that as of Titan 0.3.2, Rexster does not automatically import Titan classes, so you can't query with CONTAINS. You need to specify the full package name when doing so:
com.thinkaurelius.titan.core.attribute.Text.CONTAINS
I can't say for sure what else is wrong, but it looks like the elastic search index is not configured properly. That doesn't have much to do with the Rexster configuration file for Titan Server. It has more to do with the second argument you pass to titan.sh which contains Titan configuration information. Make sure that elastic search is properly configured as it is in this file shown here (default with the installation): https://github.com/thinkaurelius/titan/blob/master/config/titan-server-cassandra-es.properties