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

Configuration behaviour on v6.0 #111

Open
elcheco opened this issue Oct 29, 2021 · 2 comments
Open

Configuration behaviour on v6.0 #111

elcheco opened this issue Oct 29, 2021 · 2 comments

Comments

@elcheco
Copy link

elcheco commented Oct 29, 2021

On the v6.0 I have found some config issues and reported in #106 which solved @PavelJurasek and merged by @Vboss

It looked it's working fine, but finally yesterday I was setting this new version from our local development to staging and production and I have found some other issues:

In some cases, when you specify a different database then it looks like it's creating another connection, but it does not take other values like auth and host:

redis:
    host: localhost
    port: 6379
    auth: hash_key
    database: 0
    journal: true
    storage: true
    session:
        database: 1
        auth: hash_key
    debugger: true

If I don't specify auth - it's dying on the exception Client of tcp://127.0.0.1:6379; ERR Client sent AUTH, but no password is set, but when I debug the Client, I saw that the normal client has all the credentials, but other with database1 has no hash, if I specified it, it works.

This is the behavior on our staging and local VM on Ubuntu, where we have all on one server. On the live infrastructure, where we have several web instances and one Redis server it works without the necessary auth under session, but we have no localhost, but internal DNS record to sey-www-prod-redis.

But interesting was that first I set the config the same way on staging and I got another exception: Nette\InvalidStateException: Failed to read session data: redis (path: tcp://127.0.0.1:6379?weight=1&timeout=10&database=1&prefix=Nette.Session%3A&auth=authhash. When I removed the auth from the session, it works. So here it looks like it does not take the host from the main configuration, but only when auth is set. The working config on the live server is:

redis:
    host: sey-www-prod-redis
    port: 6379
    auth: hash_key
    database: 2
    journal: true
    storage: true
    session:
        database: 1
    debugger: true

Until the v5.2 it worked all fine. The main idea is to have separate sessions and with deployment, we can clean the application cache.

@Spamercz
Copy link
Member

Could you try if https://github.com/Kdyby/Redis/releases/tag/v6.1.0 resolves this issue?

@goodexperience
Copy link

Issue is probably in this commit 4db9933?diff=split .
Having same issue with specifying native.
As left has higher priority, the settings in "session" doesn't overwrite the original settings.

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

3 participants