Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPv6 replication issues #4622

Open
nerijus opened this issue Feb 18, 2025 · 3 comments
Open

IPv6 replication issues #4622

nerijus opened this issue Feb 18, 2025 · 3 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@nerijus
Copy link

nerijus commented Feb 18, 2025

Environment:

  • OS: CentOS Stream 9
  • Dragonfly Version: 1.27.1

/etc/dragonfly/dragonfly.conf is:

--pidfile=/var/run/dragonfly/dragonfly.pid
--log_dir=/var/log/dragonfly
--dir=/var/lib/dragonfly
--max_log_size=20
--version_check=true
--bind=::
--tls
--tls_replication=true
--tls_cert_file=/etc/valkey/redis.server.pem
--tls_key_file=/etc/valkey/redis.server.key
--tls_ca_cert_file=/etc/valkey/redis.ca.pem

If I use ipv4, it works:

127.0.0.1:6379> replicaof 10.0.2.241 6379
OK
127.0.0.1:6379> role
1) "slave"
2) "10.0.2.241"
3) "6379"
4) "online"

ipv6 fails:

127.0.0.1:6379> replicaof [2a05:d018:3ad:6102:566c:b386:1647:xxxx] 6379
(error) ERR could not resolve master dnsNo route to host

Host is reachable, for example:

telnet 2a05:d018:3ad:6102:566c:b386:1647:xxxx 6379
Trying 2a05:d018:3ad:6102:566c:b386:1647:xxxx...
Connected to 2a05:d018:3ad:6102:566c:b386:1647:xxxx.
Escape character is '^]'.

-ERR Bad TLS header, double check if you enabled TLS for your client.

replicaof without [] gives:

127.0.0.1:6379> replicaof 2a05:d018:3ad:6102:566c:b386:1647:xxxx 6379
(error) ERR could not connect to master: Address family not supported by protocol
@nerijus nerijus added the bug Something isn't working label Feb 18, 2025
@nerijus
Copy link
Author

nerijus commented Feb 18, 2025

If I add line:

--replicaof=[2a05:d018:3ad:6102:566c:b386:1647:xxxx]:6379

to /etc/dragonfly/dragonfly.conf and restart dragonfly, I get:

127.0.0.1:6379> role
1) "slave"
2) "2a05:d018:3ad:6102:566c:b386:1647:xxxx"
3) "6379"
4) "connecting"

/var/log/dragonfly/dragonfly.INFO has lots of lines:

W20250218 22:21:42.415287 27166 replica.cc:213] Error connecting to 2a05:d018:3ad:6102:566c:b386:1647:xxxx:6379 system:97

@BorysTheDev
Copy link
Contributor

BorysTheDev commented Feb 24, 2025

@nerijus Thx for report we will check it

@nerijus
Copy link
Author

nerijus commented Feb 24, 2025

Just other digits or letters of IPV6 address, lets say, 1234.

@adiholden adiholden added the good first issue Good for newcomers label Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants