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

[bug] Oncall doesn't start when referencing Azure Postgres DB #1923

Closed
flockoftanks opened this issue May 11, 2023 · 0 comments · Fixed by #2036
Closed

[bug] Oncall doesn't start when referencing Azure Postgres DB #1923

flockoftanks opened this issue May 11, 2023 · 0 comments · Fixed by #2036

Comments

@flockoftanks
Copy link

Hey All,
Open Source
v1.2.21 (but was also happening in 1.1)
I submitted another ticket that postgres and mariadb weren't working while using the chart, so I created a postgresql db in Azure and referenced those instead:

Here's my original ticket: #1727

This is the closest I've gotten to working but there seems to be something wrong still. I'm getting the following error:

Warning: inverse host lookup failed for 20.185.0.143: Unknown host
--
Thu, May 11 2023 3:40:38 pm | grafana-oncall-sbx-pgdb-srv.postgres.database.azure.com [20.185.0.143] 5432 (postgresql) open
Thu, May 11 2023 3:40:40 pm | Traceback (most recent call last):
Thu, May 11 2023 3:40:40 pm | File "/etc/app/manage.py", line 15, in <module>
Thu, May 11 2023 3:40:40 pm | execute_from_command_line(sys.argv)
Thu, May 11 2023 3:40:40 pm | File "/usr/local/lib/python3.11/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
Thu, May 11 2023 3:40:40 pm | utility.execute()
Thu, May 11 2023 3:40:40 pm | File "/usr/local/lib/python3.11/site-packages/django/core/management/__init__.py", line 413, in execute
Thu, May 11 2023 3:40:40 pm | self.fetch_command(subcommand).run_from_argv(self.argv)
Thu, May 11 2023 3:40:40 pm | File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 354, in run_from_argv
Thu, May 11 2023 3:40:40 pm | self.execute(*args, **cmd_options)
Thu, May 11 2023 3:40:40 pm | File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 398, in execute
Thu, May 11 2023 3:40:40 pm | output = self.handle(*args, **options)
Thu, May 11 2023 3:40:40 pm | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Thu, May 11 2023 3:40:40 pm | File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 89, in wrapped
Thu, May 11 2023 3:40:40 pm | res = handle_func(*args, **kwargs)
Thu, May 11 2023 3:40:40 pm | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Thu, May 11 2023 3:40:40 pm | File "/usr/local/lib/python3.11/site-packages/django/core/management/commands/migrate.py", line 75, in handle
Thu, May 11 2023 3:40:40 pm | self.check(databases=[database])
Thu, May 11 2023 3:40:40 pm | File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 419, in check
Thu, May 11 2023 3:40:40 pm | all_issues = checks.run_checks(
Thu, May 11 2023 3:40:40 pm | ^^^^^^^^^^^^^^^^^^
Thu, May 11 2023 3:40:40 pm | File "/usr/local/lib/python3.11/site-packages/django/core/checks/registry.py", line 76, in run_checks
Thu, May 11 2023 3:40:40 pm | new_errors = check(app_configs=app_configs, databases=databases)
Thu, May 11 2023 3:40:40 pm | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Thu, May 11 2023 3:40:40 pm | File "/usr/local/lib/python3.11/site-packages/django/core/checks/urls.py", line 13, in check_url_config
Thu, May 11 2023 3:40:40 pm | return check_resolver(resolver)
Thu, May 11 2023 3:40:40 pm | ^^^^^^^^^^^^^^^^^^^^^^^^
Thu, May 11 2023 3:40:40 pm | File "/usr/local/lib/python3.11/site-packages/django/core/checks/urls.py", line 23, in check_resolver
Thu, May 11 2023 3:40:40 pm | return check_method()
Thu, May 11 2023 3:40:40 pm | ^^^^^^^^^^^^^^
Thu, May 11 2023 3:40:40 pm | File "/usr/local/lib/python3.11/site-packages/django/urls/resolvers.py", line 416, in check
Thu, May 11 2023 3:40:40 pm | for pattern in self.url_patterns:
Thu, May 11 2023 3:40:40 pm | ^^^^^^^^^^^^^^^^^
Thu, May 11 2023 3:40:40 pm | File "/usr/local/lib/python3.11/site-packages/django/utils/functional.py", line 48, in __get__
Thu, May 11 2023 3:40:40 pm | res = instance.__dict__[self.name] = self.func(instance)
Thu, May 11 2023 3:40:40 pm | ^^^^^^^^^^^^^^^^^^^
Thu, May 11 2023 3:40:40 pm | File "/usr/local/lib/python3.11/site-packages/django/urls/resolvers.py", line 602, in url_patterns
Thu, May 11 2023 3:40:40 pm | patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
Thu, May 11 2023 3:40:40 pm | ^^^^^^^^^^^^^^^^^^^
Thu, May 11 2023 3:40:40 pm | File "/usr/local/lib/python3.11/site-packages/django/utils/functional.py", line 48, in __get__
Thu, May 11 2023 3:40:40 pm | res = instance.__dict__[self.name] = self.func(instance)
Thu, May 11 2023 3:40:40 pm | ^^^^^^^^^^^^^^^^^^^
Thu, May 11 2023 3:40:40 pm | File "/usr/local/lib/python3.11/site-packages/django/urls/resolvers.py", line 595, in urlconf_module
Thu, May 11 2023 3:40:40 pm | return import_module(self.urlconf_name)
Thu, May 11 2023 3:40:40 pm | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Thu, May 11 2023 3:40:40 pm | File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module
Thu, May 11 2023 3:40:40 pm | return _bootstrap._gcd_import(name[level:], package, level)
Thu, May 11 2023 3:40:40 pm | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Thu, May 11 2023 3:40:40 pm | File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
Thu, May 11 2023 3:40:40 pm | File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
Thu, May 11 2023 3:40:40 pm | File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
Thu, May 11 2023 3:40:40 pm | File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
Thu, May 11 2023 3:40:40 pm | File "<frozen importlib._bootstrap_external>", line 940, in exec_module
Thu, May 11 2023 3:40:40 pm | File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
Thu, May 11 2023 3:40:40 pm | File "/etc/app/engine/urls.py", line 48, in <module>
Thu, May 11 2023 3:40:40 pm | urlpatterns += [path("telegram/", include("apps.telegram.urls"))]
Thu, May 11 2023 3:40:40 pm | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Thu, May 11 2023 3:40:40 pm | File "/usr/local/lib/python3.11/site-packages/django/urls/conf.py", line 34, in include
Thu, May 11 2023 3:40:40 pm | urlconf_module = import_module(urlconf_module)
Thu, May 11 2023 3:40:40 pm | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Thu, May 11 2023 3:40:40 pm | File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module
Thu, May 11 2023 3:40:40 pm | return _bootstrap._gcd_import(name[level:], package, level)
Thu, May 11 2023 3:40:40 pm | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Thu, May 11 2023 3:40:40 pm | File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
Thu, May 11 2023 3:40:40 pm | File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
Thu, May 11 2023 3:40:40 pm | File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
Thu, May 11 2023 3:40:40 pm | File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
Thu, May 11 2023 3:40:40 pm | File "<frozen importlib._bootstrap_external>", line 940, in exec_module
Thu, May 11 2023 3:40:40 pm | File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
Thu, May 11 2023 3:40:40 pm | File "/etc/app/apps/telegram/urls.py", line 3, in <module>
Thu, May 11 2023 3:40:40 pm | from .views import WebHookView
Thu, May 11 2023 3:40:40 pm | File "/etc/app/apps/telegram/views.py", line 7, in <module>
Thu, May 11 2023 3:40:40 pm | register_telegram_webhook.delay()
Thu, May 11 2023 3:40:40 pm | File "/usr/local/lib/python3.11/site-packages/celery/app/task.py", line 425, in delay
Thu, May 11 2023 3:40:40 pm | return self.apply_async(args, kwargs)
Thu, May 11 2023 3:40:40 pm | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Thu, May 11 2023 3:40:40 pm | File "/usr/local/lib/python3.11/site-packages/celery/app/task.py", line 575, in apply_async
Thu, May 11 2023 3:40:40 pm | return app.send_task(
Thu, May 11 2023 3:40:40 pm | ^^^^^^^^^^^^^^
Thu, May 11 2023 3:40:40 pm | File "/usr/local/lib/python3.11/site-packages/celery/app/base.py", line 784, in send_task
Thu, May 11 2023 3:40:40 pm | with self.producer_or_acquire(producer) as P:
Thu, May 11 2023 3:40:40 pm | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Thu, May 11 2023 3:40:40 pm | File "/usr/local/lib/python3.11/site-packages/celery/app/base.py", line 919, in producer_or_acquire
Thu, May 11 2023 3:40:40 pm | producer, self.producer_pool.acquire, block=True,
Thu, May 11 2023 3:40:40 pm | ^^^^^^^^^^^^^^^^^^
Thu, May 11 2023 3:40:40 pm | File "/usr/local/lib/python3.11/site-packages/celery/app/base.py", line 1303, in producer_pool
Thu, May 11 2023 3:40:40 pm | return self.amqp.producer_pool
Thu, May 11 2023 3:40:40 pm | ^^^^^^^^^^^^^^^^^^^^^^^
Thu, May 11 2023 3:40:40 pm | File "/usr/local/lib/python3.11/site-packages/celery/app/amqp.py", line 583, in producer_pool
Thu, May 11 2023 3:40:40 pm | self.app.connection_for_write()]
Thu, May 11 2023 3:40:40 pm | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Thu, May 11 2023 3:40:40 pm | File "/usr/local/lib/python3.11/site-packages/celery/app/base.py", line 816, in connection_for_write
Thu, May 11 2023 3:40:40 pm | return self._connection(url or self.conf.broker_write_url, **kwargs)
Thu, May 11 2023 3:40:40 pm | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Thu, May 11 2023 3:40:40 pm | File "/usr/local/lib/python3.11/site-packages/celery/app/base.py", line 867, in _connection
Thu, May 11 2023 3:40:40 pm | return self.amqp.Connection(
Thu, May 11 2023 3:40:40 pm | ^^^^^^^^^^^^^^^^^^^^^
Thu, May 11 2023 3:40:40 pm | File "/usr/local/lib/python3.11/site-packages/kombu/connection.py", line 183, in __init__
Thu, May 11 2023 3:40:40 pm | url_params = parse_url(hostname)
Thu, May 11 2023 3:40:40 pm | ^^^^^^^^^^^^^^^^^^^
Thu, May 11 2023 3:40:40 pm | File "/usr/local/lib/python3.11/site-packages/kombu/utils/url.py", line 36, in parse_url
Thu, May 11 2023 3:40:40 pm | scheme, host, port, user, password, path, query = _parse_url(url)
Thu, May 11 2023 3:40:40 pm | ^^^^^^^^^^^^^^^
Thu, May 11 2023 3:40:40 pm | File "/usr/local/lib/python3.11/site-packages/kombu/utils/url.py", line 68, in url_to_parts
Thu, May 11 2023 3:40:40 pm | parts.port,
Thu, May 11 2023 3:40:40 pm | ^^^^^^^^^^
Thu, May 11 2023 3:40:40 pm | File "/usr/local/lib/python3.11/urllib/parse.py", line 173, in port
Thu, May 11 2023 3:40:40 pm | raise ValueError(f"Port could not be cast to integer value as {port!r}")
Thu, May 11 2023 3:40:40 pm | ValueError: Port could not be cast to integer value as 'ApR'

Anyone run into this? Here's my config:

externalPostgresql:
      host: censored.postgres.database.azure.com
      db_name: grafana-oncall-sbx
      port: 5432
      user: admin
      existingSecret: grafana-oncall-postgres
      passwordKey: grafana_oncall_postgres_password
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant