yiisoft / yii2-redis

Yii 2 Redis extension.
http://www.yiiframework.com
BSD 3-Clause "New" or "Revised" License
452 stars 183 forks source link

AWS ElastiCache Redis AUTH #175

Closed jdde closed 5 years ago

jdde commented 5 years ago

What steps will reproduce the problem?

Hi guys, I'm trying to configure our REDIS connection to use the AUTH option. We're using the yiisoft/yii2-redis extension in version 2.0.9 and the yii2 core also in version 2.0.0

I've successfully setup a connection without authentication, when the redis server is in the same VPC as the application server. But with the same configuration and adding the password property to the yii2-redis configuration the yii2 application can't connect to the redis server, and I'm getting at 504 gateway timeout error. The ElastiCache Cluster is configured with the in-transit configuration with the redis auth password.

I'm using the following configuration in my component configuration:

        [
'class' => 'yii\redis\Session',
            'redis' => [
                'hostname' => REDIS_ENDPOINT_URL,
                'port' => REDIS_ENDPOINT_PORT,
                'password' => REDIS_ENDPOINT_AUTH_TOKEN,
                'database' => 0,
            ]
        ]

It is working with the exact same configuration without password, but with password I'm not able to connect. Does anybody of you guys successfully configured the RedisAUTH in Amazon ElastiCache with yii2 and could share his configuration? Thanks in advance!

What's expected?

Successful connection

What do you get instead?

504 Gateway Timeout

Additional info

Q A
Yii vesion 2.0.9
PHP version 7.1
Operating system Amazon Linux
yii-bot commented 5 years ago

Thank you for your question. In order for this issue tracker to be effective, it should only contain bug reports and feature requests.

We advise you to use our community driven resources:

If you are confident that there is a bug in the framework, feel free to provide information on how to reproduce it. This issue will be closed for now.

This is an automated comment, triggered by adding the label question.