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

celery urlib error with rabbitmq/redis #5364

Open
PotapovG opened this issue Dec 13, 2024 · 1 comment
Open

celery urlib error with rabbitmq/redis #5364

PotapovG opened this issue Dec 13, 2024 · 1 comment

Comments

@PotapovG
Copy link

What went wrong?

What happened:
Here ho looks my env for celery:

Environment
AMIXR_DJANGO_ADMIN_PATH : admin
BASE_URL : http://grafana-oncall.company.com
BROKER_TYPE : rabbitmq
DATABASE_HOST : some-ip
DATABASE_NAME : oncall
DATABASE_PASSWORD : secret(slackauth)[dbpass] 
DATABASE_PORT : 5432
DATABASE_TYPE : postgresql
DATABASE_USER : gfoncall
DETACHED_INTEGRATIONS_SERVER : False
DJANGO_SETTINGS_MODULE : settings.helm
GRAFANA_API_URL : https://grafana.company.com/
MIRAGE_CIPHER_IV : --
MIRAGE_SECRET_KEY : secret(test-oncall)[MIRAGE_SECRET_KEY] 
OSS : True
RABBITMQ_HOST : test-oncall-rabbitmq
RABBITMQ_PASSWORD : secret(slackauth)[rabbitmq-password] 
RABBITMQ_PORT : 5672
RABBITMQ_PROTOCOL : amqp
RABBITMQ_USERNAME : user
RABBITMQ_VHOST :
REDIS_DATABASE : 0
REDIS_HOST : test-oncall-redis-master
REDIS_PASSWORD : secret(test-oncall-redis)[redis-password] 
REDIS_PORT : 6379
REDIS_PROTOCOL : redis
REDIS_USERNAME :
SECRET_KEY : secret(test-oncall)[SECRET_KEY] 
UWSGI_LISTEN : 1024

And celery pod failed with error and go to restart every time:

  File "/usr/local/lib/python3.12/site-packages/celery/bin/worker.py", line 348, in worker
    worker = app.Worker(
             ^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/celery/worker/worker.py", line 98, in __init__
    self.setup_instance(**self.prepare_args(**kwargs))
  File "/usr/local/lib/python3.12/site-packages/celery/worker/worker.py", line 119, in setup_instance
    self._conninfo = self.app.connection_for_read()
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/celery/app/base.py", line 818, in connection_for_read
    return self._connection(url or self.conf.broker_read_url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/celery/app/base.py", line 877, in _connection
    return self.amqp.Connection(
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/kombu/connection.py", line 200, in __init__
    transport = transport or urlparse(hostname).scheme
                             ^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/urllib/parse.py", line 395, in urlparse
    splitresult = urlsplit(url, scheme, allow_fragments)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/urllib/parse.py", line 497, in urlsplit
    raise ValueError("Invalid IPv6 URL")
ValueError: Invalid IPv6 URL

I deploy it from chart versions 1.13.9 and 1.13.10 thought ArgoCD.

oncall-engine with same env successfully connected to rabbit, redis and postgres

How do we reproduce it?

  1. try to install Chart version 1.13.9 or 1.13.10 with ArgoCD
  2. Use that values for rabbitmq and redis
rabbitmq:
  enabled: true
  auth:
    existingPasswordSecret: "slackauth"

broker:
  type: rabbitmq

redis:
  enabled: true
  auth:
    existingSecret:

Grafana OnCall Version

v1.13.9, v1.13.10

Product Area

Helm/Kubernetes/Docker

Grafana OnCall Platform?

Kubernetes

User's Browser?

No response

Anything else to add?

No response

@PotapovG
Copy link
Author

Also tried v1.13.3 - and it still same error.
I resolve it by removing value of key existingPasswordSecret:.
But now on every redeploy rabbitMQ lose itself credentials and key to resolve that problen - scale StatefulSet to zero, drop PVC and scale it back to one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant