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개 답변
1
수락된 답변

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

답변함 일 년 전
  • 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.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠