Unable to connect Neptune cluster and always timeout

0

I am getting connection timeout with either lambda function call within the same VPC and security group and the Notebook Jupyter EPL-Gremlin playground that is created via the Neptune console. The error message is too vague for me to know what issue I am having. Neptune was never hit during any of the requests from looking at the monitor and logs. If you have any suggestions on where to triage the issue, that would be very helpful. Thanks

{'error': ConnectionError(MaxRetryError("HTTPSConnectionPool(host='{myWriterEndpoint}.us-west-2.neptune.amazonaws.com', port=8182): Max retries exceeded with url: /status (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fcd87d375d0>: Failed to establish a new connection: [Errno 110] Connection timed out'))"))}

CDK code:

const vpc = new ec2.Vpc(this, "myVPC", {
      cidr: "10.0.0.0/16"
    });

    const clusterParams = new neptune.ClusterParameterGroup(
      this,
      "ClusterParams",
      {
        description: "Cluster parameter group",
        parameters: {
          neptune_enable_audit_log: "1",
          neptune_result_cache: "1",
        },
        family: ParameterGroupFamily.NEPTUNE_1_2,
      }
    );

    // Neptune
    const dbParams = new neptune.ParameterGroup(this, "DbParams", {
      description: "Db parameter group",
      parameters: {
        // 2 minute, 120,000 ms
        neptune_query_timeout: "120000",
      },
      family: ParameterGroupFamily.NEPTUNE_1_2,
    });

    const cluster = new neptune.DatabaseCluster(this, "DBName", {
      vpc,
      instanceType: neptune.InstanceType.T4G_MEDIUM,
      clusterParameterGroup: clusterParams,
      parameterGroup: dbParams,
      engineVersion: neptune.EngineVersion.V1_2_0_0,
    });
1 Answer
1
Accepted Answer

Solved it by adding inbound rules that match my vpc cidr.

answered a year ago
  • Yes, adding the vpc cidr is working. But I manage it only manually to add it to the security group of neptune in the console, I didn't find any solution to solve it also within the cdk stack.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions