Seems like Gremlin Console not working for Windows:
I downloaded the latest Gremlin console and run the bin\gremlin.bat file. seems like after connecting (as in the below commands) and running a simple remote command (g.V(123).count()) I'm getting an error:
The most significant bit should be set according to the format
This is the commands I run:
PS C:\Users\L836423\Downloads\apache-tinkerpop-gremlin-console-3.4.7-bin\apache-tinkerpop-gremlin-console-3.4.7\bin> .\gremlin.bat
\,,,/
(o o)
-----oOOo-(3)-oOOo-----
plugin activated: tinkerpop.server
plugin activated: tinkerpop.utilities
plugin activated: tinkerpop.tinkergraph
gremlin> :remote connect tinkerpop.server conf/remote.yaml
log4j:WARN No appenders could be found for logger (com.jcabi.manifests.Manifests).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
==>Configured my_gremlin_dns.com/55.222.88.111:8182
gremlin> :remote console
==>All scripts will now be sent to Gremlin Server - [my_gremlin_dns.com/55.222.88.111:8182] - type ':remote console' to return to local mode
gremlin> g.V(123).count()
The most significant bit should be set according to the format
Type ':help' or ':h' for help.
Display stack trace? [yN]
gremlin>
This happens when the server you are connecting to does not support the string serialization of Graph Binary used by newer versions of TinkerPop. You will need to use an older client. Find out what level the server supports and use the corresponding Gremlin Client version.
Specifically, the change went into the Gremlin Client as part of the 3.4.3 release. Your server needs to be at least at that version to use a Gremlin Client >= 3.4.3
With 3.4.3 the default serializer for the Gremlin Client was changed to be GraphBinary. It is possible you could also edit the settings in the YAML file read by the client to use a different serializer.
Related
I have configured New JanusGraph janusgraph-full-1.0.0-rc1 on centos 7 with janusgraph-cql-es.
But when i am connecting using apache-tinkerpop-gremlin-console-3.4.8/bin/gremlin.sh
it is throwing following exception :
after remote console
> g.V();
WARN org.apache.tinkerpop.gremlin.driver.MessageSerializer - Response [PooledUnsafeDirectByteBuf(ridx: 57, widx: 57, cap: 57)] could not be deserialized by org.apache.tinkerpop.gremlin.driver.ser.AbstractGryoMessageSerializerV3d0.
java.lang.IndexOutOfBoundsException: Index 127 out of bounds for length 0
at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248)
at java.base/java.util.Objects.checkIndex(Objects.java:372)
at java.base/java.util.ArrayList.get(ArrayList.java:459)
at org.apache.tinkerpop.shaded.kryo.util.MapReferenceResolver.getReadObject(MapReferenceResolver.java:60)
at org.apache.tinkerpop.shaded.kryo.Kryo.readReferenceOrNull(Kryo.java:834)
at org.apache.tinkerpop.shaded.kryo.Kryo.readObject(Kryo.java:684)
at org.apache.tinkerpop.gremlin.driver.ser.AbstractGryoMessageSerializerV3d0.deserializeResponse(AbstractGryoMessageSerializerV3d0.java:157)
And its also throwing error on server
08:40:45 WARN org.apache.tinkerpop.gremlin.server.handler.WsGremlinBinaryRequestDecoder.select - Gremlin Server is not configured with a serializer for the requested mime type [application/vnd.gremlin-v3.0+gryo-stringd] - using org.apache.tinkerpop.gremlin.driver.ser.GraphBinaryMessageSerializerV1 by default
08:40:45 WARN org.apache.tinkerpop.gremlin.server.handler.WsGremlinBinaryRequestDecoder.decode - Serialization error while decoding request
org.apache.tinkerpop.gremlin.driver.ser.SerializationException: The most significant bit should be set according to the format
at org.apache.tinkerpop.gremlin.driver.ser.binary.RequestMessageSerializer.readValue(RequestMessageSerializer.java:45) ~[gremlin-driver-3.6.1.jar:3.6.1]
at org.apache.tinkerpop.gremlin.driver.ser.GraphBinaryMessageSerializerV1.deserializeRequest(GraphBinaryMessageSerializerV1.java:175) ~[gremlin-driver-3.6.1.jar:3.6.1]
at org.apache.tinkerpop.gremlin.server.handler.WsGremlinBinaryRequestDecoder.decode(WsGremlinBinaryRequestDecoder.java:77) ~[gremlin-server-3.6.1.jar:3.6.1]
Need guidance on what is correct config that needs to be done, so that janusgraph works properly and i am able to access data using gremlin console.
Thanks.
Not every JanusGraph version is compatible with every TinkerPop version. The JanusGraph documentation contains a Version Compatibility Matrix which shows the versions of other project that are compatible with a given JanusGraph version. For JanusGraph 1.0, the compatible TinkerPop versions are 3.6.z. This already explains why you are having problems with Gremlin Console in version 3.4.8. Please use a 3.6.z version of Gremlin Console if you want to use JanusGraph 1.0.
Your concrete problem between these two versions is that the Gryo MessageSerializer that you are using with Gremlin Console 3.4.8 is not supported any more in JanusGraph 1.0. This problem should however go away when you use Gremlin Console 3.6 as that also does not use Gryo any more as a message serializer.
Also note that JanusGraph 1.0.0-rc1 is a release candidate for the upcoming 1.0.0 release. This means that this version is not meant to be used in production, but only to try out the upcoming release. You can of course still use it as you like, but you should expect some rough edges.
I am trying to run the example grakn migration "phone_calls" (using python and JSON files).
Before reaching there, I need to load the schema, but I am having trouble with getting the schema loaded, as shown here: https://dev.grakn.ai/docs/examples/phone-calls-schema
System:
-Mac OS 10.15
-grakn-core 1.8.3
-python 3.7.3
The grakn server is started. I checked and the 48555 TCP port is open, so I don't think there is any firewall issue. The schema file is in the same folder (phone_calls) as where the json data files is, for the next step. I am using a virtual environment. The error is below:
(project1_env) (base) tiffanytoor1#MacBook-Pro-2 onco % grakn server start
Storage is already running
Grakn Core Server is already running
(project1_env) (base) tiffanytoor1#MacBook-Pro-2 onco % grakn console --keyspace phone_calls --file phone_calls/schema.gql
Unable to create connection to Grakn instance at localhost:48555
Cause: io.grpc.StatusRuntimeException
UNKNOWN: Could not reach any contact point, make sure you've provided valid addresses (showing first 1, use getErrors() for more: Node(endPoint=/127.0.0.1:9042, hostId=null, hashCode=5f59fd46): com.datastax.oss.driver.api.core.connection.ConnectionInitException: [JanusGraph Session|control|connecting...] init query OPTIONS: error writing ). Please check server logs for the stack trace.
I would appreciate any help! Thanks!
Nevermind -- I found the solution, in case any one else runs into a similar problem. The server configuration file needs to be edited: point the data directory to your project data files (here: the phone_calls data files) & change the server IP address to your own.
I'm currently working through getting an old project up and running again - it uses both DSE Search and DSE Graph. I don't have too much experience with DSE, but right now I've created one keyspace for the regular cassandra db (searchable) and I've created a graph on the same server using the gremlin console.
The back-end is written in node.js and uses the dse-driver to get data from the DSE server.
When I run the cassandra server with the -g flag, the dse-driver runs fine, does exactly what I want it to do, but obviously, none of my search functionality works.
When I run the cassandra server with the -g and -s flags, my search functionality works, but then I receive errors whenever the backend tries to use the dse-driver to get data from the graph using the executeGraph function.
Is this something that can be fixed or do I need to create more nodes/clusters? I'm really new to DSE so your help is appreciated.
Error: com.google.common.util.concurrent.UncheckedExecutionException: com.google.inject.ProvisionException: Unable to provision, see the following errors:\n\n1) Error injecting constructor, com.datastax.bdp.gcore.datastore.DataStoreException: Failed to execute statement40f07a96-98bf-490c-a738-6c9d0021afba\n at com.datastax.bdp.graph.impl.DseGraphImpl.<init>(DseGraphImpl.java:192)\n at com.datastax.bdp.graph.impl.GraphModule.configure(Unknown Source) (via modules: com.datastax.bdp.graph.impl.DseGraphFactoryImpl$$Lambda$1580/1437671705 -> com.google.inject.util.Modules$OverrideModule -> com.datastax.bdp.graph.impl.GraphModule)\n while locating com.datastax.bdp.graph.impl.DseGraphImpl\n\n1 error\n
I am trying to connect to Oracle DB in Robot Frameowork, I am facing an issue.find the details.
Error info:
15:26:34.601 INFO Connecting using : cx_Oracle.connect(database=KIDS, user=St1_User, password=M...., host=st-kids..oss.abb.com, port=1581)
15:26:34.692 FAIL TypeError: 'database' is an invalid keyword argument for this function
If I remove the "Database" from Keyword then getting below error
"NoSectionError: No section: 'default'"
Below is the command used in the Test Case
Connect To Database cx_Oracle kIDS St1_User M.... st-kids.oss.abb.com 1581
Please help.
Use keyword Connect To Database Using Custom Params
Connect To Database Using Custom Params cx_Oracle ${connection string}
and as ${connection_string}:
user='${user}',password='${password}',dsn='${host}:${port}/${service_name}'
I'm using the RPostgreSQL 0.4 library (compiled on R 2.15.3) on R 2.15.2 under Windows 7 64-bit to interface to PostgreSQL. This works fine when connecting to my PostgreSQL databases on localhost. I'm trying to get my R code to run with a remote PostgreSQL database on Heroku. I can connect to Heroku's PostgreSQL database from the psql command shell on my machine, and it connects without a problem. I get the message:
psql (9.2.3, server 9.1.9)
WARNING: psql version 9.2, server version 9.1.
Some psql features might not work.
WARNING: Console code page (437) differs from Windows code page (1252)
8-bit characters might not work correctly. See psql reference
page "Notes for Windows users" for details.
SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256)
Clearly, psql uses SSL to connect. When I try to connect using the RPostgreSQL library routine dbConnect(), however, supplying exactly the same credentials using dname=, host=, port=, user=, password=, the connection fails with the complaint:
Error in postgresqlNewConnection(drv, ...) :
RS-DBI driver: (could not connect <user>#<hostname> on dbname <dbname>)
Calls: source ... .valueClassTest -> is -> is -> postgresqlNewConnection -> .Call
Execution halted
I know that Heroku insists on an SSL connection if you want to access their database remotely, so it seems likely that the R interface routine dbConnect() isn't trying SSL. Is there something else that I can do to get a remote connection from R to PostgreSQL on Heroku to work?
To get the JDBC URL for your heroku instance:
Get your hostname, username and password using [pg:credentials].
Your jdbc URL is going to be:
jdbc:postgresql://[hostname]/[database]?user=[user]&password=[password]&ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory
Proceed as you would normally with JDBC.
Apparently there is a way using RJDBC. See:
http://ryepup.unwashedmeme.com/blog/2010/11/17/working-with-r-postgresql-ssl-and-mssql/
Please note that in order to connect to Heroku database with JDBC externally, it is important to set the sslfactory parameter as well. Hope Heroku team goes through it and modifies their documentation.
String dbUri = "jdbc:postgresql://ec2-54-243-202-174.compute-1.amazonaws.com:5432/**xxxxxxx**";
Properties props = new Properties();
props.setProperty("user", "**xxxxx**");
props.setProperty("password", "**xxxxx**");
props.setProperty("ssl", "true");//ssl to be set true
props.setProperty("sslfactory", "org.postgresql.ssl.NonValidatingFactory");// sslfactory to be set as shown above
Connection c=DriverManager.getConnection(dbUri,props);
See answer to related Q at https://stackoverflow.com/a/38942581. The suggestion of using RPostgres (https://github.com/rstats-db/RPostgres) instead of RPostgreSQL resolved this same issue for me.