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

redis 'ready' event is not triggered #122

Closed
MaestroJurko opened this issue Apr 21, 2021 · 3 comments
Closed

redis 'ready' event is not triggered #122

MaestroJurko opened this issue Apr 21, 2021 · 3 comments

Comments

@MaestroJurko
Copy link

MaestroJurko commented Apr 21, 2021

Not getting ready event to be triggered. The connected event is triggered but ready is not.

Using ioredis library:

      const client = new Cluster(
        [
          {
            host: redisHost,
            port: 7000,
          },
        ],
        {
          dnsLookup: (address, callback) => callback(null, address),
          redisOptions: {
          },
        },
      );

    client.on('ready', () => {
        log.info('Ready to use Redis');
      });

      client.on('connect', () => {
        log.info('Connected to Redis');
      });

      client.on('error', (x) => {
        log.error(`Disconnected from Redis`);
      });

Docker compose:

  redis-cluster:
    image: grokzen/redis-cluster
    environment:
      MASTERS: 1
      SLAVES_PER_MASTER: 1
    ports:
      - "7000:7000"

@Grokzen
Copy link
Owner

Grokzen commented Apr 21, 2021

I dont know about any ready event that should be emited out from the redis-server itself. To my knowledge that is not a feature by redis but something from the lib you are using and i dont know your lib you are using or know your language that it is coded in so i can't really help you in any way shape or form with this issue. Use stackoverflow or google to find answers to your question or ask it in the rep for ioredis instead. Issues here is only regarding the docker image itself, not a loss of functionality or other issues regarding the redis-server itself that runs on the inside.

@Grokzen Grokzen closed this as completed Apr 21, 2021
@MaestroJurko
Copy link
Author

Already searching for the last 4 hours with no solution in sight :(.

@danilofuchs
Copy link

You probably forgot to setup IP=0.0.0.0 in the environment config

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