Rexster is refusing connection

72 views
Skip to first unread message

Lauren Wolfe

unread,
Jun 22, 2015, 3:41:23 PM6/22/15
to aureliu...@googlegroups.com
I'm building a titandb image in docker, but I can't access rexster in my browser. 

Steps to build database/ run rexster currently, in terminal:
1) bin/titan.sh start 
2) bin/gremlin.sh
3) \. PWLoad.groovy (this builds my database)
4) exit gremlin
5) bin/rexster-console.sh -rh 192.168.59.103 (the ip of my virtual machine)

With these steps I am unable to connect to the Rexster console in my browser, the connection is refused. I am opening the ports properly when I run the docker image--I was able to get the default example db to work when I did a test build. 

I have the baseuri set to the vm's ip in my rexster.xml file. 

What am I missing?

Thanks,
Lauren

Daniel Kuppitz

unread,
Jun 22, 2015, 4:24:38 PM6/22/15
to aureliu...@googlegroups.com
Can you share the Dockerfile?

Cheers,
Daniel


--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/aureliusgraphs/2fc60888-6b41-4b07-8046-ace4b84c4e9b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Lauren Wolfe

unread,
Jun 22, 2015, 7:01:10 PM6/22/15
to aureliu...@googlegroups.com

Daniel Kuppitz

unread,
Jun 22, 2015, 9:56:17 PM6/22/15
to aureliu...@googlegroups.com

Lauren Wolfe

unread,
Jun 23, 2015, 2:03:14 PM6/23/15
to aureliu...@googlegroups.com
Thanks for this. So, I'm able to use rexster.sh to start the application and can connect to the doghouse in my browser, so I'm thinking this isn't a networking issue.

I think the problem is that my graph isn't being recognized. I'm building my graph via a groovy file in gremlin, but when I run rexster-console.sh and enter rexster.getGraphNames(), I only see a generic "graph." My rexster.xml file no longer contains that graph-name, and instead only contains one graph named "tumorgraph." 

My rexster.xml file is located in rexhome/config/, which is the default listed in the rexster configuration guide (https://github.com/tinkerpop/rexster/wiki/Rexster-Configuration). Is that, perhaps, the incorrect path?

--
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/ixoM3OuMA5I/unsubscribe.
To unsubscribe from this group and all its topics, send an email to aureliusgraph...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/aureliusgraphs/CAO7ueZL0F500udXrd%2BUCGfUa07kv2kNWMaa%3DL08tVGksDK6geQ%40mail.gmail.com.

Stephen Mallette

unread,
Jun 23, 2015, 2:18:42 PM6/23/15
to aureliu...@googlegroups.com
If you look at the log output for Rexster it should show you the path to the rexster.xml file it is using and should also say which graphs are configured and serving.

Lauren Wolfe

unread,
Jun 23, 2015, 9:28:01 PM6/23/15
to aureliu...@googlegroups.com
Great, thank you. That's one bit of confusion down.

So I'm using cassandra, seems like I don't actually need a storage directory? I think I'm missing something in my transition from berkeleydb and using GraphOfTheGods.

I know I'm hitting the right config now, rexster.getGraphNames() is listing tumorgraph, but my database still isn't populating in rexster. Is it that I can't really run my groovy db builder script in gremlin and expect it to be persistent after I exit gremlin.sh? Perhaps I should be loading the data a different way? 

Thanks. I know these are probably really simple questions to experienced folks, I appreciate your help. :)

Stephen Mallette

unread,
Jun 24, 2015, 7:18:34 AM6/24/15
to aureliu...@googlegroups.com
The pattern for loading sounds fine and I'd say that's the recommended approach (to just load with a groovy script).  

you don't need "storage.directory" if you are using cassandra and if for some reason you thought that this setting was controlling where your data was going then that is likely your problem.  if you are using titan.sh then cassandra should be starting as a forked process.  i assume that when you connect with gremlin.sh and run your script, your configuration points to that instance (wherever that is).  i think you need to confirm that.  in fact just do a simple test, start titan.sh and gremlin.sh. in the Gremlin Console, connect to what you think is the cassandra instance started by titan.sh and just add a vertex and commit the transaction.  then query it via rexster's REST API - it should appear immediately.  If it does, then you have everything setup right.



Daniel Kuppitz

unread,
Jun 24, 2015, 8:16:34 AM6/24/15
to aureliu...@googlegroups.com
Note that I provided a sample on how to populate your graph: https://gist.github.com/dkuppitz/8e6b0eb958ab63e19b8a#file-run-sh-L6-L10
I was able to confirm that the graph has been initialized as expected with the following command:

curl -s http://localhost:8182/graphs/graph/vertices | python -mjson.tool

Or by simply opening the URL in a browser or by looking into Doghouse or ....

If that still doesn't help, you should probably share your builder script and the command that you're using to run it.

Cheers,
Daniel


Lauren Wolfe

unread,
Jun 24, 2015, 1:08:16 PM6/24/15
to aureliu...@googlegroups.com
Thanks Daniel, I did see that! The docker build failed when I tried it (wanted to run apt-get update, I believe--I've had issues like that with docker in the past, it can be finicky), but I have already been able to successfully build GraphOfTheGods and access it via the Rexster GUI. 

It's my custom code that's giving me trouble. I think it might be the transition to Cassandra as a storage backend, or perhaps the way I'm connecting all the pieces. I'm gonna take Stephen's advice and see what I learn :)

Lauren Wolfe

unread,
Jun 24, 2015, 2:37:19 PM6/24/15
to aureliu...@googlegroups.com
So Stephen, looking at it, I'm honestly not sure what I'm supposed to be pointing where when it comes to the cassandra forked process. 

I'm guessing it has something to do with the cassandra.yaml file? I see that the sample cassandra.yaml specifies a "data_file_directory", is that something I should also be adding to the BaseConfiguration() of my groovy file, or specifying on the command line? If there's a guide to this, I'd love to be pointed at it, my google-fu is failing me. :)

Stephen Mallette

unread,
Jun 24, 2015, 2:49:47 PM6/24/15
to aureliu...@googlegroups.com
I believe you might be over-thinking the problem.  Assuming you've not edited the cassandra.yaml file packaged with titan, then titan.sh should start your cassandra instance with virtually all defaults on localhost.  That means that connecting with the console is pretty much just:

g = TitanFactory.build()
.set("storage.backend","cassandra")
.set("storage.hostname","127.0.0.1")
.open();

Rexster should be already configured to be aimed at that when titan.sh fires up.  Just open up Gremlin Console, paste that in and you should be connected to the same db as Rexster is.  Add a vertex, commit and then hit rexster's REST API to see if that verrtex is present.  If it is then you have the basic configuration working.

Lauren Wolfe

unread,
Jun 24, 2015, 3:37:33 PM6/24/15
to aureliu...@googlegroups.com
It's working now! I guess I didn't actually need to execute bin/rexster-console.sh, the Doghouse is already accessible. Thanks so much.

Reply all
Reply to author
Forward
0 new messages