Comments (7)
The url format for the remote host should be something like: ws://username:password@hostname:8182/gremlin
Try:
conn = await driver.Connection.open('ws://username:password@hostname:8182/gremlin', loop)
If that doesn't work let me know.
Btw, I would recommend using secure sockets (wss
) for a remote host.
from goblin.
Hmm, that server is not username or password protected.
I tried username:password@
as a placeholder with no luck.
Maybe the error I received would be helpful.
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/aiohttp/connector.py", line 308, in connect
yield from self._create_connection(req)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/aiohttp/connector.py", line 597, in _create_connection
transport, proto = yield from self._create_direct_connection(req)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/aiohttp/connector.py", line 608, in _create_direct_connection
hosts = yield from self._resolve_host(req.host, req.port)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/aiohttp/connector.py", line 580, in _resolve_host
self._resolver.resolve(host, port, family=self._family)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/aiohttp/resolver.py", line 30, in resolve
host, port, type=socket.SOCK_STREAM, family=family)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/concurrent/futures/thread.py", line 55, in run
result = self.fn(*self.args, **self.kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/socket.py", line 743, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 8] nodename nor servname provided, or not known
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "test-remote.py", line 22, in <module>
loop.run_until_complete(go(loop))
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/base_events.py", line 466, in run_until_complete
return future.result()
File "test-remote.py", line 13, in go
conn = await driver.Connection.open('wss://username:password@remotehost_name:8182/gremlin', loop)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/goblin/driver/connection.py", line 182, in open
ws = await client_session.ws_connect(url)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/aiohttp/client.py", line 535, in __await__
resp = yield from self._coro
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/aiohttp/client.py", line 306, in _ws_connect
proxy_auth=proxy_auth)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/aiohttp/client.py", line 530, in __iter__
resp = yield from self._coro
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/aiohttp/client.py", line 176, in _request
conn = yield from self._connector.connect(req)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/aiohttp/connector.py", line 318, in connect
.format(key, exc.strerror)) from exc
aiohttp.errors.ClientOSError: [Errno 8] Cannot connect to host remotehost_name:8182 ssl:True [nodename nor servname provided, or not known]
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x103decfd0>
It seems either the nodename or servername is nor provided or simply unknown.
I've provided the remotehost name, is that not the same thing as the nodename or servername?
from goblin.
Hmmm, looks like the address lookup is failing. I'm travelling right now, so I'm not really set up to test with a remote host. Have you tried changing the hostname to a straight IP address? Also, it would appear that the server you are connecting to uses secure sockets, so you will need to pass your ssl info (notice in the second error that aiohttp tells you that ssl:True
.
from goblin.
What's the format for passing SSL info to driver? I don't see it in the documentation
from goblin.
http://goblin.readthedocs.io/en/latest/driver.html#configuring-cluster
from goblin.
Did you get this figured out?
from goblin.
We found that the connection was successfully established but when the script was sent a response never returned. So gathered that the script simply wasn't reaching the target server. Instead we used gremlin-python directly and everything worked.
from goblin.
Related Issues (20)
- Reference instance to test goblin against HOT 3
- How to change version of Goblin OGM Serializer for Janusgraph (TinkerPop 3.2.6) HOT 3
- TypeError: unhashable type: 'dict' when creating an Edge HOT 10
- goblin does not work with aiohttp>=3.0.0 HOT 5
- Question about using a multi-value/set VertexProperty HOT 6
- Vertex property gets changed from Gremlin Console but not from Python/Goblin script HOT 2
- goblin not working with aiohttp (server) HOT 2
- Mocking JanusGraph Connection for unit tests
- Add method to easily remove Vertex HOT 1
- The project appears idle, can I take over? HOT 10
- Problem with Edge data type HOT 5
- App/Cluster configuration using URL HOT 3
- Schema generator HOT 3
- Belated License change HOT 5
- Question: Extent to which OO modeling is supported in Goblin HOT 7
- How to use mixed index in goblin? HOT 4
- AttributeError: AsyncGraphTraversal.last_traverser HOT 1
- [Proposal] - OGM distinct from driver HOT 7
- Ability to set vertex or edge ID HOT 5
- Unexpected results when updating property HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from goblin.