Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Errors on worker #387

Open
JuezFenix opened this issue Mar 30, 2022 · 1 comment
Open

Errors on worker #387

JuezFenix opened this issue Mar 30, 2022 · 1 comment

Comments

@JuezFenix
Copy link

JuezFenix commented Mar 30, 2022

Hi, im trying to deploy the tool. Afer some problems using local binds, i change the compose, like this:

version: '2'

volumes:
  prometheus:
  prom_data:
  alert_data:
  mysql_data:
  promgen_data:
  redis_data:

services:
  web:
    image: line/promgen
    command: web -b 0.0.0.0:8000
    environment:
     - ALLOWED_HOSTS=*
    ports:
      - "8080:8000"
    links:
      - mysql
      - redis
    volumes:
      - prometheus:/etc/prometheus
      - promgen_data:/etc/promgen
      
  worker:
    image: line/promgen
    command: worker -l info --queues localhost,celery
    links:
      - prometheus
      - mysql
      - redis
    volumes:
      - prometheus:/etc/prometheus
      - promgen_data:/etc/promgen

  prometheus:
    image: prom/prometheus
    links:
      - alertmanager
      - blackbox
    ports:
      - "9090:9090"
    volumes:
      - prometheus:/etc/prometheus
      - prom_data:/prometheus

  blackbox:
    image: prom/blackbox-exporter
    network_mode: bridge
    volumes:
      - prometheus:/etc/prometheus

  alertmanager:
    image: prom/alertmanager
    command: --config.file=/etc/prometheus/alertmanager.yml
    links:
      - web
    ports:
      - "9093:9093"
    volumes:
      - prometheus:/etc/prometheus
      - alert_data:/alertmanager

  mysql:
    image: mysql:5.7
    environment:
      MYSQL_ROOT_PASSWORD: demo
      MYSQL_DATABASE: promgen
      MYSQL_USER: promgen
      MYSQL_PASSWORD: promgen
    volumes:
      - mysql_data:/var/lib/mysql

  redis:
    image: redis
    volumes:
      - redis_data:/data

Copied alertmanager.yml and prometheus.yml thay work well.

The webui respond, but saying internal error and worker say like that:

[2022-03-30 19:17:10,565: ERROR/MainProcess] consumer: Cannot connect to amqp://guest:**@127.0.0.1:5672//: [Errno 111] Connection refused.

I cannot use volumes? Only local bind? (i have permision problems on it) Can i solve this problem?

Edit to fix yaml formatting

@kfdm
Copy link
Collaborator

kfdm commented Mar 31, 2022

Cannot connect to amqp://guest:**@127.0.0.1:5672//: suggests that the broker settings are incorrect. You need to add something similar to this to your environment for the web and worker nodes

    environment:
      CELERY_BROKER_URL: redis://redis:6379/0

In the example docker-compose I have them included in a base state

environment:
CELERY_BROKER_URL: redis://redis:6379/0
DATABASE_URL: mysql://promgen:promgen@mysql:3306/promgen
SECRET_KEY: docker-compose-demo

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants