Skip to content
This repository was archived by the owner on Jul 12, 2025. It is now read-only.
This repository was archived by the owner on Jul 12, 2025. It is now read-only.

IPV4 error for dualstack cluster without IPV6 connectivity #139

Open

Description

@laskoviymishka

When we try to connect to Postgres inside dual-stack network (ipv4 and ipv6) we face confusing error:

failed to connect to `host=chinook.chiyepnb01it.eu-west-2.rds.amazonaws.com user=tutorial database=chinook`: dial error (timeout: dial tcp 10.0.102.63:5432: i/o timeout)

Given:

Cluster with ipv4 and ipv6 address:

host chinook.chiyepnb01it.eu-west-2.rds.amazonaws.com
chinook.chiyepnb01it.eu-west-2.rds.amazonaws.com has address 10.0.102.63
chinook.chiyepnb01it.eu-west-2.rds.amazonaws.com has IPv6 address 2a05:d01c:d05:6500:3318:e752:f216:3d9b

IPv4 connectivity exists:

telnet 10.0.102.63 5432
Trying 10.0.102.63...
Connected to 10.0.102.63.
Escape character is '^]'.

IPv6 connectivity not exists:

 telnet 2a05:d01c:d05:6500:3318:e752:f216:3d9b 5432
Trying 2a05:d01c:d05:6500:3318:e752:f216:3d9b...
^C

Connection failed (wich is expected), but error should be:

failed to connect to `host=chinook.chiyepnb01it.eu-west-2.rds.amazonaws.com user=tutorial database=chinook`: dial error (timeout: dial tcp [2a05:d01c:d05:6500:3318:e752:f216:3d9b]:5432: i/o timeout)

Activity

  1. laskoviymishka commented on Mar 13, 2024

    @laskoviymishka
    Author

    Side note:

    In pgx/v5 its not reproduceable:

    failed to connect to `host=chinook.chiyepnb01it.eu-west-2.rds.amazonaws.com user=tutorial database=chinook`: dial error (timeout: context deadline exceeded)
    

    Error is less verbose

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions