Skip to content

[BUG] Proxy configuration is not respected by Gremlin driver #399

@vcaraulean

Description

@vcaraulean

While configuring Gremlin driver using configuration magic it seems like the settings for proxy aren't used by the driver.

To Reproduce

Configuration:

%%graph_notebook_config
{
  "host": "my-host",
  "port": 3000,
  "ssl": true,
  "proxy_host": "http://my-proxy.com",
  "proxy_port": 4000
}

Executing following gremlin query:

%%gremlin

g.V().limit(10)

Displayed error:

{'error': ClientConnectorError(ConnectionKey(host='my-host', port=3000, is_ssl=True, ssl=None, proxy=None, proxy_auth=None, proxy_headers_hash=None), gaierror(11001, 'getaddrinfo failed'))}

Expected behavior

I would expect WebSockets connection to use the specified proxy.

Part of the error indicates proxy=None, so I assume it's not the case.

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Edge
  • Version: latest

I'm filling it as a bug, but it might be that passing of the proxy to WebSockets driver was simply not implemented. Happy to requalify as a "feature" then.

PS: I tried to use the Gremlin's driver in a new Jupiter notebook and initially hit same error/issue. After fiddling around, I found correct setting to make the driver connect to our endpoints and passing through the proxy. Relevant code:

connection = DriverRemoteConnection(endpoint,'g', transport_factory=lambda:AiohttpTransport(
        call_from_event_loop=True, 
        proxy = os.getenv('HTTP_PROXY')))

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Resolved

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions