gremlin hangs while connecting to remote cassandra

160 views
Skip to first unread message

Pavan Kumar

unread,
Mar 26, 2013, 2:28:54 PM3/26/13
to aureliu...@googlegroups.com
Hi 

  I am just trying a config where i am trying to connect to cassandra instance running remotely in another machine.  I am able to connect to the cassandra instance via cassandra-cli to a "LIST system_properties;" which all works fine.

but when do 

g = TitanFactory.open(conf); via gremlin shell it hangs. Here is stack trace . Any clue ?


 com.netflix.astyanax.retry.SleepingRetryPolicy.allowRetry()Z+23
com.netflix.astyanax.connectionpool.impl.AbstractHostPartitionConnectionPool.executeWithFailover(Lcom/netflix/astyanax/connectionpool/Operation;Lcom/netflix/astyanax/retry/RetryPolicy;)Lcom/netflix/astyanax/connectionpool/OperationResult;+49
j  com.netflix.astyanax.thrift.ThriftColumnFamilyQueryImpl$1$1.execute()Lcom/netflix/astyanax/connectionpool/OperationResult;+81
j  com.thinkaurelius.titan.diskstorage.cassandra.astyanax.AstyanaxStoreManager.getConfigurationProperty(Ljava/lang/String;)Ljava/lang/String;+61
j  com.thinkaurelius.titan.diskstorage.Backend.initialize(Lorg/apache/commons/configuration/Configuration;)V+139
j  com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration.getBackend()Lcom/thinkaurelius/titan/diskstorage/Backend;+23
j  com.thinkaurelius.titan.graphdb.database.StandardTitanGraph.<init>(Lcom/thinkaurelius/titan/graphdb/configuration/GraphDatabaseConfiguration;)V+11
j  com.thinkaurelius.titan.core.TitanFactory.open(Lorg/apache/commons/configuration/Configuration;)Lcom/thinkaurelius/titan/core/TitanGraph;+12


regards,
Pavan

Matthias Broecheler

unread,
Mar 26, 2013, 10:40:06 PM3/26/13
to aureliu...@googlegroups.com
Hey Pavan,

can you try changing storage.backend=cassandrathrift and see if that helps?

Thanks,
Matthias

--
You received this message because you are subscribed to the Google Groups "Aurelius" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aureliusgraph...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Matthias Broecheler
http://www.matthiasb.com

Pavan Kumar

unread,
Mar 26, 2013, 11:14:21 PM3/26/13
to aureliu...@googlegroups.com
Hi Mattias,

  Thanks It works. 

 Interesting to observe is that when using astyanax it's making 2 tcp connections the second one with 127.0.0.1, even though we give IP like 7.7.7.7,  I am guessing some thing is failing when done via remote. May be we can update the wiki as well, conf.setProperty("storage.hostname","77.77.77.77"); was misleading as well with "cassandra" storage backend.

regards,
pavan 
You received this message because you are subscribed to a topic in the Google Groups "Aurelius" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/aureliusgraphs/pyOgRLFradw/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to aureliusgraph...@googlegroups.com.

Matthias Broecheler

unread,
Mar 27, 2013, 11:29:04 PM3/27/13
to aureliu...@googlegroups.com
Hey Pavan,

is it possible that you have 127.0.0.1 somewhere in your configuration file or when setting those options programmatically. Are you opening the config file from some baseline configuration file and modifying it further? Just trying to figure out where that 127.0.0.1 is coming from.

Cheers,
Matthias

bhuvanrk

unread,
Aug 24, 2016, 3:14:26 PM8/24/16
to Aurelius
I encountered the same issue. I tried starting a gremlin-server with settings for a remote Cassandra backend. That did not work. Then I tried doing a connect using the gremlin console shell and the :remote plugin. It just hangs. I dont have localhost or 127.0.0.1 anywhere in the configs. Titan itself provides only a start, stop, status and clean but not a connect command. 

Appreciate if you can share some pointers on how to do this. 

$ bin/gremlin-server.sh /home/appsec/gremlin-server-3.0.0.M6/conf/remote-gremlin-server.yaml 


[INFO] GremlinServer - Initialized Gremlin thread pool.  Threads in pool named with pattern gremlin-*

[INFO] ScriptEngines - Loaded nashorn ScriptEngine

[INFO] ScriptEngines - Loaded gremlin-groovy ScriptEngine

[INFO] GremlinServer - Initialized GremlinExecutor and configured ScriptEngines.

[INFO] AbstractChannelizer - Configured application/vnd.gremlin-v1.0+kryo with com.tinkerpop.gremlin.driver.ser.KryoMessageSerializerV1d0

[INFO] AbstractChannelizer - Configured application/vnd.gremlin-v1.0+kryo-stringd with com.tinkerpop.gremlin.driver.ser.KryoMessageSerializerV1d0

[INFO] AbstractChannelizer - Configured application/vnd.gremlin-v1.0+json with com.tinkerpop.gremlin.driver.ser.JsonMessageSerializerGremlinV1d0

[INFO] AbstractChannelizer - Configured application/json with com.tinkerpop.gremlin.driver.ser.JsonMessageSerializerV1d0

:

:

:


[ERROR] GremlinServer - Gremlin Server Error

java.net.BindException: Cannot assign requested address

at sun.nio.ch.Net.bind0(Native Method)

at sun.nio.ch.Net.bind(Net.java:433)

at sun.nio.ch.Net.bind(Net.java:425)

at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)

at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)

at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:125)

at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:475)

at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1021)

at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:455)

at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:440)

at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:844)

at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:194)

at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:340)

at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:380)

at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357)

at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)

at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)

at java.lang.Thread.run(Thread.java:745)

[INFO] GremlinServer - Shutting down thread pools

[INFO] GremlinServer - Gremlin Server - shutdown complete




gremlin> :remote connect tinkerpop.server conf/remote-gremlin-server.yaml (hangs here)



Titan is trying to create the Cassandra cluster rather than connect to it :


bin/titan.sh start -v


Forking Cassandra...

Running `nodetool statusthrift`.SLF4J: Class path contains multiple SLF4J bindings.

SLF4J: Found binding in [jar:file:/home/appsec/titan-1.0.0-hadoop1/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]

SLF4J: Found binding in [jar:file:/home/appsec/titan-1.0.0-hadoop1/lib/logback-classic-1.1.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]

SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.

SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]

 INFO 00:23:12,152 Could not resolve local host

 INFO 00:23:12,239 Loading settings from file:/home/appsec/titan-1.0.0-hadoop1/conf/cassandra/cassandra.yaml

:

:

ERROR 00:23:17,097 Fatal configuration error

org.apache.cassandra.exceptions.ConfigurationException: Unable to bind to address /Remote_IP:Remote_Port. Set listen_address in cassandra.yaml to an interface you can bind to, e.g., your private IP address on EC2

at org.apache.cassandra.net.MessagingService.getServerSockets(MessagingService.java:498)

at org.apache.cassandra.net.MessagingService.listen(MessagingService.java:442)

at org.apache.cassandra.service.StorageService.prepareToJoin(StorageService.java:805)

at org.apache.cassandra.service.StorageService.initServer(StorageService.java:720)

at org.apache.cassandra.service.StorageService.initServer(StorageService.java:611)

at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:378)

at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:537)

at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:626)

Unable to bind to address /Remote_IP:Remote_Port. Set listen_address in cassandra.yaml to an interface you can bind to, e.g., your private IP address on EC2

Matthias

Hi Mattias,
Matthias

To unsubscribe from this group and stop receiving emails from it, send an email to aureliusgraphs+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Matthias Broecheler
http://www.matthiasb.com

--
You received this message because you are subscribed to a topic in the Google Groups "Aurelius" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/aureliusgraphs/pyOgRLFradw/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to aureliusgraphs+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "Aurelius" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aureliusgraph...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply all
Reply to author
Forward
0 new messages