go-redis icon indicating copy to clipboard operation
go-redis copied to clipboard

[BUG] Redis: dial tcp: address rediss://<username>:<password>-@redis-3666656f-<cloudprovider>:<PORT>: too many colons in address

Open swarajkumarsingh opened this issue 1 year ago • 1 comments

Issue tracker is used for reporting bugs and discussing new features. Please use stackoverflow for supporting issues.

Expected Behavior

successful connection to redis client

Current Behavior

outputs an error: too many colons in address a

Possible Solution

Didn't find a proper solution

Steps to Reproduce

  1. login to avien cloud provider
  2. start free redis cluster
  3. copy the address, username, password from redis and try giving it a test connection

Context (Environment)

--

Detailed Description

Got this error while connecting to redis Redis: dial tcp: address rediss://:-@redis-3666656f-:<PORT>: too many colons in address

Possible Implementation

--

swarajkumarsingh avatar Jan 18 '24 16:01 swarajkumarsingh

I had a similar issue. This was my redis options:

redisOptions := redis.Options{
    Addr: "redis://localhost:6379",
    Password: "banana",
}

Removing the redis:// fixed it for me. Like so:

redisOptions := redis.Options{
    Addr: "localhost:6379",
    Password: "banana",
}

braaar avatar Sep 26 '24 06:09 braaar

you don't need to specify redis:// in the address.

ndyakov avatar Mar 20 '25 18:03 ndyakov