Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-2488

Using ws:// when Neptune requires wss:// doesn't throw exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Cannot Reproduce
    • 3.4.8
    • None
    • javascript
    • None

    Description

      When using the JavaScript driver, attempting to connect to Neptune via ws:// when Neptune requires wss:// does not throw an exception. The process simply exits silently.

      #!/usr/bin/env node
      
      import pkg from 'gremlin';
      const { structure, process, driver } = pkg;
      const Graph = structure.Graph;
      const __ = process.statics;
      const { t, order, cardinality, column, scope, pop, operator, P, traversal } = process;
      const hostname = 'neptunecluster.cluster-xxxxxxxxx.us-east-1.neptune.amazonaws.com'
      const port = 8182
      const wspath = `ws://${hostname}:${port}/gremlin`; // doesn't throw exception if wss:// is required
      const DriverRemoteConnection = driver.DriverRemoteConnection;
      const connection = new DriverRemoteConnection(wspath, {});
      const g = traversal().withRemote(connection);
      
      const result = await g.V().hasLabel("person").toList()
      console.log(result)
      

       
      Note: using Node.js as a shell script like this requires "type": "module" in package.json

      Attachments

        Activity

          People

            Unassigned Unassigned
            mrkrchm Mark Richman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: