|[ioredis]未处理的错误事件:错误:getaddrinfo enotfound redisredis:6379 collector

xqkwcwgp  于 2021-06-07  发布在  Redis
关注(0)|答案(0)|浏览(331)

我对redis还比较陌生,不了解其中的错误和原因。我正在docker-compose.yml环境中运行以下服务

redis:
    image: redis:5.0.3

    restart: always
    deploy:
      resources:
        limits:
          memory: "100M"

  collector:
    container_name: collector
    image: registry.gitlab.com/collector
    networks:
      - traefik-public
    restart: always
    environment:
      NODE_ENV: production
      NODE_CONFIG: '{"redis":"redis://redis:6379"}'
      GRPC_LISTEN_ADDRESS: "0.0.0.0:10000"
    extra_hosts:
      - "telegraf.company.internal:127.0.0.1"
    deploy:
      resources:
        limits:
          memory: "900M"

networks:
  traefik-public:
      external: true

这是错误消息:

| [ioredis] Unhandled error event: Error: getaddrinfo ENOTFOUND redis redis:6379
  |     at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:56:26)

有什么建议吗?谢谢!

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题