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

CLUSTER MEET doesn't allow hostname to be used #2410

Closed
simontabor opened this issue Feb 19, 2015 · 2 comments
Closed

CLUSTER MEET doesn't allow hostname to be used #2410

simontabor opened this issue Feb 19, 2015 · 2 comments

Comments

@simontabor
Copy link

The code at https://github.com/antirez/redis/blob/unstable/src/cluster.c#L1120 rejects everything that isn't a valid IPv4 or IPv6 address.

It'd be great if CLUSTER MEET redis-1 6379 would work (resolved via /etc/hosts).

Current response:

127.0.0.1:6379> cluster meet redis-1 6379
(error) ERR Invalid node address specified: redis-1:6379

There are cases where multiple redis-servers may be running on the same host, and therefore allowing /etc/hosts to resolve that hostname to 127.0.0.1 would be beneficial.

@mattsta
Copy link
Contributor

mattsta commented Feb 19, 2015

Correct. Redis doesn't currently accept hostnames.

Also see #2186 (and kinda #2075 and #2118 too).

@mattsta mattsta closed this as completed Feb 19, 2015
@simontabor
Copy link
Author

Ah, apologies for duplicate

luin added a commit to redis/ioredis that referenced this issue Oct 15, 2018
Since Redis cluster doesn't support hostname at all (redis/redis#2410),
it's reasonable to resolve the hostnames to IPs before connecting.
luin added a commit to redis/ioredis that referenced this issue Oct 17, 2018
Since Redis cluster doesn't support hostname at all (redis/redis#2410),
it's reasonable to resolve the hostnames to IPs before connecting.
ioredis-robot pushed a commit to redis/ioredis that referenced this issue Oct 17, 2018
# [4.2.0](v4.1.0...v4.2.0) (2018-10-17)

### Features

* support customize dns lookup function ([#723](#723)) ([b9c4793](b9c4793)), closes [redis/redis#2410](redis/redis#2410)
janus-dev87 added a commit to janus-dev87/ioredis-work that referenced this issue Mar 1, 2024
Since Redis cluster doesn't support hostname at all (redis/redis#2410),
it's reasonable to resolve the hostnames to IPs before connecting.
janus-dev87 added a commit to janus-dev87/ioredis-work that referenced this issue Mar 1, 2024
# [4.2.0](redis/ioredis@v4.1.0...v4.2.0) (2018-10-17)

### Features

* support customize dns lookup function ([#723](redis/ioredis#723)) ([b9c4793](redis/ioredis@b9c4793)), closes [redis/redis#2410](redis/redis#2410)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants