hibiken / asynqmon

Web UI for Asynq task queue
MIT License
644 stars 142 forks source link

WebUI: 500 (Internal Server Error): dial tcp 127.0.0.1:6379: connect: connection refused #326

Open noloman opened 5 months ago

noloman commented 5 months ago

Hi,

I'm trying to run the WebUI with Docker Compose like this:

  cache:
    platform: linux/amd64
    image: redis:7.2.4-alpine
    container_name: "remoti-backend-cache"
    restart: always
    ports:
      - '6379:6379'
    command: redis-server --save 20 1 --loglevel warning --requirepass manutest
    volumes:
      - cache:/data
    networks:
      - fullstack

  tasks-web-ui:
    platform: linux/amd64
    container_name: "remoti-tasks-web-ui"
    image: hibiken/asynqmon:latest
    command: ["docker run --rm \
      --name asynqmon \
      --network fullstack \
      -p 8080:8080 \
      hibiken/asynqmon \
      --redis-addr=cache:6379 \
      --redis-password=mytestpassword"]
    ports:
      - "8080:8080"
    networks:
      - fullstack

However when I go to localhost:8080 I'm seeing:

Could not retrieve queues live data — See the logs for details

Then when I open the browser developer tools:

XHRGET
http://localhost:8080/api/queues
[HTTP/1.1 500 Internal Server Error 78ms]

XHRGET
http://localhost:8080/api/queue_stats
[HTTP/1.1 500 Internal Server Error 113ms]

listQueuesAsync: 500 (Internal Server Error): dial tcp 127.0.0.1:6379: connect: connection refused
[queuesActions.ts:112:14](http://localhost:8080/static/js/actions/queuesActions.ts)
listQueueStatsAsync:  500 (Internal Server Error): dial tcp 127.0.0.1:6379: connect: connection refused

Thanks a lot in advance!

MadanaGopalD commented 3 months ago

I am facing the same issue, Did u get any fix?

RaidOuahioune commented 3 months ago

i have the same issue . u can see that the ip address you are trying to connect to is ur localhost address and not the ip address of the redis container inside the network . I solved this issue by using a static ip address for my redis container , instead of relying on docker host resolution . Something like this image