Sniffing Gremlin console traffic

53 vues
Accéder directement au premier message non lu

Ray Scott

non lue,
15 sept. 2017, 09:58:5315/09/2017
à Gremlin-users
Hi, 

Has anyone managed to successfully sniff traffic from Gremlin console to a (localhost) Gremlin Server? I realise this is a fairly networky question, but it may require reconfiguring Gremlin related settings. I'm on a Mac, using Charles, and while I can intercept web traffic to 8182, I'm not having much luck using tsocks or proxychains-ng from the command line when starting gremlin.sh

Anyone ever done this on a Mac? 

Thanks.

Robert Dale

non lue,
15 sept. 2017, 10:02:4415/09/2017
à gremli...@googlegroups.com
Haven't done it on a Mac but Wireshark is your friend.  Looks like Mac is supported.  https://www.wireshark.org/

You want to decode as WebSocket protocol.


Robert Dale

--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/e7590865-d9ee-43c9-a556-8aab4e1eae6e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ray Scott

non lue,
15 sept. 2017, 12:14:4815/09/2017
à Gremlin-users
Awesome thanks! Wireshark is pretty hectic, but if it works, that'll be brilliant. 


On Friday, 15 September 2017 15:02:44 UTC+1, Robert Dale wrote:
Haven't done it on a Mac but Wireshark is your friend.  Looks like Mac is supported.  https://www.wireshark.org/

You want to decode as WebSocket protocol.


Robert Dale

On Fri, Sep 15, 2017 at 9:58 AM, 'Ray Scott' via Gremlin-users <gremli...@googlegroups.com> wrote:
Hi, 

Has anyone managed to successfully sniff traffic from Gremlin console to a (localhost) Gremlin Server? I realise this is a fairly networky question, but it may require reconfiguring Gremlin related settings. I'm on a Mac, using Charles, and while I can intercept web traffic to 8182, I'm not having much luck using tsocks or proxychains-ng from the command line when starting gremlin.sh

Anyone ever done this on a Mac? 

Thanks.

--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.

Ray Scott

non lue,
15 sept. 2017, 12:20:0515/09/2017
à Gremlin-users
Can you recall if you needed to run the gremlin.sh command through anything first? Wrap it with tsock or similar? 


On Friday, 15 September 2017 15:02:44 UTC+1, Robert Dale wrote:
Haven't done it on a Mac but Wireshark is your friend.  Looks like Mac is supported.  https://www.wireshark.org/

You want to decode as WebSocket protocol.


Robert Dale

On Fri, Sep 15, 2017 at 9:58 AM, 'Ray Scott' via Gremlin-users <gremli...@googlegroups.com> wrote:
Hi, 

Has anyone managed to successfully sniff traffic from Gremlin console to a (localhost) Gremlin Server? I realise this is a fairly networky question, but it may require reconfiguring Gremlin related settings. I'm on a Mac, using Charles, and while I can intercept web traffic to 8182, I'm not having much luck using tsocks or proxychains-ng from the command line when starting gremlin.sh

Anyone ever done this on a Mac? 

Thanks.

--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.

Robert Dale

non lue,
15 sept. 2017, 12:27:3715/09/2017
à gremli...@googlegroups.com
Not sure on a mac.  On Linux you would just listen on 'lo' (loop back) or all interfaces.  Set the filter to localhost (or whatever the server is listening on) and port 8182.  

IIRC, if you have wireshark running before you connect from console then it should auto detect and decode WebSocket otherwise you have to set it manually. 



For more options, visit https://groups.google.com/d/optout.
--
Robert Dale

Ray Scott

non lue,
15 sept. 2017, 12:56:2615/09/2017
à Gremlin-users
OK Thanks, sounds like it's fairly trivial. 

Ray Scott

non lue,
19 sept. 2017, 10:10:2219/09/2017
à Gremlin-users
Wireshark seems happy enough to capture traffic if I try to connect to 8182 from a web browser, but it hasn't a clue about gremlin console connections. Am I missing something perhaps ? 


On Friday, 15 September 2017 17:27:37 UTC+1, Robert Dale wrote:

Robert Dale

non lue,
19 sept. 2017, 10:44:1619/09/2017
à Gremlin-users
Can you show us how you are connecting to gremlin server via console?

Ray Scott

non lue,
20 sept. 2017, 08:03:4520/09/2017
à Gremlin-users
All I do is issue the following command...

graph = JanusGraphFactory.open("conf/janusgraph-cassandra.properties")

Robert Dale

non lue,
20 sept. 2017, 08:30:2120/09/2017
à gremli...@googlegroups.com
That is not gremlin server.  That is an embedded graph only available within that console session.
If you do `./bin/janusgraph.sh start`, that will start a gremlin server.



Robert Dale

To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/cf0b3ad5-8942-4e12-bf2f-5106ce54dc9f%40googlegroups.com.

Ray Scott

non lue,
20 sept. 2017, 09:04:2320/09/2017
à Gremlin-users
OK this is weird to me. But mostly because I'm not that familiar with the product. Your question was how do I connect to Gremlin Server via the console, and that is the statement I use inside the console. I do have Gremlin Server running. I fire up Cassandra, and then I execute:

./bin/gremlin-server.sh "./conf/gremlin-server.yaml"

I don't use the janusgraph.sh method, because it was starting elastic search and that was killing my laptop. But you're correct, if I shutdown Gremlin Server, I can still interact with my JanusGraphFactory instance. So where does that data get persisted, because it's there between console sessions. 

Also if I have Gremlin Server running, then how do I connect to it inside the console, if I shouldn't be using JanusGraphFactory? 

Thanks for your help!




Robert Dale

Robert Dale

non lue,
20 sept. 2017, 09:31:1220/09/2017
à gremli...@googlegroups.com
For Gremlin Server and connecting to it, the two links I've provided answer your questions and more.  Beyond that you should really read the JanusGraph docs particularly on architecture and Cassandra.



Robert Dale

To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/39fb35dd-673a-4716-ad76-aa6e8480fc10%40googlegroups.com.

Ray Scott

non lue,
20 sept. 2017, 10:19:5720/09/2017
à Gremlin-users
Thanks. I have actually read through the docs. Shocker huh? I find reading through the code the most helpful thing to do. The only thing I was omitting was the :remote at the start of the session. I'm getting data in wireshark now and I'm still running my non- "janusgraph.sh start" setup. I'll probably write my own startup script at some stage. Have you heard of Scylla? I'm going to swap that out for the official Cassandra at some stage. 

Robert Dale

Répondre à tous
Répondre à l'auteur
Transférer
0 nouveau message