zulip / docker-zulip

Container configurations, images, and examples for Zulip.
https://zulip.com/
Apache License 2.0
574 stars 238 forks source link

Redis Authentication error #417

Closed umershehzad1 closed 10 months ago

umershehzad1 commented 10 months ago

Hi, I'm having this error while creating an organization

raise error
redis.exceptions.AuthenticationError: invalid username-password pair or user is disabled

The setup is functioning well, and the site loads without any issues. However, when I generate a link, paste it into the URL, and fill out the form, after submitting, it redirects me to a 500 error page. Upon checking the error logs, it indicates...

image image

I've entered the correct password.

here is my docker compose

version: "2"
services:
  database:
    image: "zulip/zulip-postgresql:14"
    restart: unless-stopped
    environment:
      POSTGRES_DB: "zulip"
      POSTGRES_USER: "zulip"
      # Note that you need to do a manual `ALTER ROLE` query if you
      # change this on a system after booting the postgres container
      # the first time on a host.  Instructions are available in README.md.
      POSTGRES_PASSWORD: "REPLACE_WITH_SECURE_POSTGRES_PASSWORD"
    volumes:
      - "./postgresql-14:/var/lib/postgresql/data:rw"
    networks:
      - zulip
  memcached:
    image: "memcached:alpine"
    restart: unless-stopped
    command:
      - "sh"
      - "-euc"
      - |
        echo 'mech_list: plain' > "$$SASL_CONF_PATH"
        echo "zulip@$$HOSTNAME:$$MEMCACHED_PASSWORD" > "$$MEMCACHED_SASL_PWDB"
        echo "zulip@localhost:$$MEMCACHED_PASSWORD" >> "$$MEMCACHED_SASL_PWDB"
        exec memcached -S
    environment:
      SASL_CONF_PATH: "/home/memcache/memcached.conf"
      MEMCACHED_SASL_PWDB: "/home/memcache/memcached-sasl-db"
      MEMCACHED_PASSWORD: "REPLACE_WITH_SECURE_MEMCACHED_PASSWORD"
    networks:
      - zulip
  rabbitmq:
    image: "rabbitmq:3.7.7"
    restart: unless-stopped
    environment:
      RABBITMQ_DEFAULT_USER: "zulip"
      RABBITMQ_DEFAULT_PASS: "REPLACE_WITH_SECURE_RABBITMQ_PASSWORD"
    volumes:
      - "./rabbitmq:/var/lib/rabbitmq:rw"
    networks:
      - zulip
  redis:
    image: "redis:alpine"
    restart: unless-stopped
    command:
      - "sh"
      - "-euc"
      - |
        echo "requirepass '$$REDIS_PASSWORD'" > /etc/redis.conf
        exec redis-server /etc/redis.conf
    environment:
      REDIS_PASSWORD: "REPLACE_WITH_SECURE_REDIS_PASSWORD"
    volumes:
      - "./redis:/data:rw"
    networks:
      - zulip
  zulip:
    image: "zulip/docker-zulip:7.5-0"
    restart: unless-stopped
    build:
      context: .
      args:
        # Change these if you want to build zulip from a different repo/branch
        ZULIP_GIT_URL: https://github.com/zulip/zulip.git
        ZULIP_GIT_REF: "7.5"
        # Set this up if you plan to use your own CA certificate bundle for building
        # CUSTOM_CA_CERTIFICATES:
    ports:
      - "8081:80"
      - "4431:443"
    environment:
      DB_HOST: "database"
      DB_HOST_PORT: "5432"
      DB_USER: "zulip"
      DISABLE_HTTPS: "True"
      SSL_CERTIFICATE_GENERATION: "self-signed"
      SETTING_MEMCACHED_LOCATION: "memcached:11211"
      SETTING_RABBITMQ_HOST: "rabbitmq"
      SETTING_REDIS_HOST: "redis"
      SECRETS_email_password: "123456789"
      # These should match RABBITMQ_DEFAULT_PASS, POSTGRES_PASSWORD,
      # MEMCACHED_PASSWORD, and REDIS_PASSWORD above.
      SECRETS_rabbitmq_password: "REPLACE_WITH_SECURE_RABBITMQ_PASSWORD"
      SECRETS_postgres_password: "REPLACE_WITH_SECURE_POSTGRES_PASSWORD"
      SECRETS_memcached_password: "REPLACE_WITH_SECURE_MEMCACHED_PASSWORD"
      SECRETS_redis_password: "REPLACE_WITH_SECURE_REDIS_PASSWORD"
      SECRETS_secret_key: "REPLACE_WITH_SECURE_SECRET_KEY"
      SETTING_EXTERNAL_HOST: "chat.example.com"
      SETTING_ZULIP_ADMINISTRATOR: "admin@example.com"
      SETTING_EMAIL_HOST: "" # e.g. smtp.example.com
      SETTING_EMAIL_HOST_USER: "noreply@example.com"
      SETTING_EMAIL_PORT: "587"
      # It seems that the email server needs to use ssl or tls and can't be used without it
      SETTING_EMAIL_USE_SSL: "False"
      SETTING_EMAIL_USE_TLS: "True"
      ZULIP_AUTH_BACKENDS: "EmailAuthBackend"
      LOADBALANCER_IPS: "172.30.0.5"
      # Uncomment this when configuring the mobile push notifications service
      # SETTING_PUSH_NOTIFICATION_BOUNCER_URL: 'https://push.zulipchat.com'
    volumes:
      - "./zulip:/data:rw"
    ulimits:
      nofile:
        soft: 1000000
        hard: 1048576
    labels:
      - traefik.enable=true
      - traefik.http.routers.zulip-0-https.rule=Host(`chat.example.com`) && PathPrefix(`/`)
      - traefik.http.routers.zulip-0-https.entryPoints=https
      - traefik.http.routers.zulip-0-https.middlewares=gzip
      - traefik.http.routers.zulip-0-https.service=zulip-0-https
      - traefik.http.services.zulip-0-https.loadbalancer.server.port=80
      - traefik.http.routers.zulip-0-https.tls=true
      - traefik.http.routers.zulip-0-https.tls.certresolver=letsencrypt
    networks:
      - zulip
      - coolify

networks:
  coolify:
    external: true
  zulip:
    driver: bridge
umershehzad1 commented 10 months ago

I encountered this issue because my Zulip Redis container was conflicting with my Coolify Redis container since they both were sharing the same network. Thanks to Lumrenion who gave me a hint to figure it out. I resolved it by changing my Redis container name from "redis" to "zulip-redis".