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

No master server available for replication after upgrade to 2.1.6 #449

Closed
markitosgv opened this issue Aug 2, 2018 · 10 comments
Closed
Assignees
Labels
bug Not working as intended

Comments

@markitosgv
Copy link

Hi,

I'm getting this error "No master server available for replication" when I upgraded from 2.1.3 to 2.1.6, but the issue was introduced in 2.1.4 release.

My snc_redis configuration is:

snc_redis:
    clients:
        front:
            type: predis
            alias: front
            dsn:
                - "%env(REDIS_MASTER_URL)%?alias=master"
                - "%env(REDIS_SLAVE_URL)%"
            logging: "%kernel.debug%"
            options:
                replication: true
@curry684
Copy link
Collaborator

curry684 commented Aug 6, 2018

Please share the actual value of those environment variables.

@curry684 curry684 added the support Questions about usage and features label Aug 6, 2018
@markitosgv
Copy link
Author

markitosgv commented Aug 7, 2018

Hi,

The values are:

"REDIS_MASTER_URL": "redis://redis.mydomain.com",
"REDIS_SLAVE_URL": "redis://localhost",

I've a redis server on redis.mydomain.com, and a local redis. Before updating, redis master was replicated in local instances of my app

@kasperhendriks
Copy link

kasperhendriks commented Aug 16, 2018

We have the same issue after upgrading from 2.1.3 to 2.1.6. Our config is as follows:

snc_redis:
    clients:
        cache:
            type: predis
            logging: '%kernel.debug%'
            alias: cache
            dsn: '%redis.dsn%'
            options:
                profile: 2.8
                replication: true
                connection_timeout: 10
                read_write_timeout: 30
    doctrine:
        query_cache:
            client: cache
            entity_manager: default
            namespace: dqc
        result_cache:
            client: cache
            entity_manager: default
            namespace: drc
        second_level_cache:
            client: cache
            entity_manager: default
            namespace: l2c

parameters:
    doctrine.orm.cache.l2.enabled: true
    redis.dsn: redis://127.0.0.1

@vitrus
Copy link

vitrus commented Aug 16, 2018

In our scenario the issue (No master server available for replication) only occurs on a Symfony 4 installation. An almost identical implementation on the same environment using Symfony 3 did not throw any exceptions when updating to 2.1.6

@curry684
Copy link
Collaborator

@B-Galati I suppose this is yours to look into ;)

@curry684 curry684 added bug Not working as intended and removed support Questions about usage and features labels Aug 16, 2018
@B-Galati
Copy link
Collaborator

@curry684 yeap!

@wukchao
Copy link

wukchao commented Aug 23, 2018

Has this problem been resolved?

@B-Galati
Copy link
Collaborator

@wukchao Not yet sorry

@kasperhendriks
Copy link

@B-Galati any progress on this? let me know if you need more info.

@B-Galati
Copy link
Collaborator

@kasperhendriks I will let you know ;-) I will look into it in coming weeks/months.
Thank you!

B-Galati added a commit to B-Galati/SncRedisBundle that referenced this issue Feb 5, 2019
Connection alias was not set anymore by the parameters factory
B-Galati added a commit that referenced this issue Feb 5, 2019
Fix #449 - No master server available for replication
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Not working as intended
Projects
None yet
Development

No branches or pull requests

6 participants