whenever i have trying to connect it with retool db i am gettting this error

whenever i have trying to connect it with retool db i am gettting this error

but in render it is working fine…

please tell me what is the problem and how to fix it…

both time i am connectiong with db url to connect to db

also retool db is working fine on local host but is is showing error on fly deploy

image size: 353 MB

Watch your deployment at https://fly.io/apps/djangoapp-v2-backend/monitoring

Running djangoapp-v2-backend release_command: python manage.py migrate --noinput

-------
 ✖ release_command failed
-------
Error release_command failed running on machine 080e092c6459e8 with exit code 1.
Check its logs: here's the last 100 lines below, or run 'fly logs -i 080e092c6459e8':
    File "/usr/local/lib/python3.12/site-packages/django/utils/asyncio.py", line 26, in inner
      return func(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py", line 277, in get_new_connection
      connection = self.Database.connect(**conn_params)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.12/site-packages/psycopg2/__init__.py", line 122, in connect
      conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  psycopg2.OperationalError: ERROR:  Endpoint ID is not specified. Either please upgrade the postgres client library (libpq) for SNI support or pass the endpoint ID (first part of the domain name) as a parameter: '?options=endpoint%3D<endpoint-id>'. See more at https://neon.tech/sni
  The above exception was the direct cause of the following exception:
  Traceback (most recent call last):
    File "/code/manage.py", line 22, in <module>
      main()
    File "/code/manage.py", line 18, in main
      execute_from_command_line(sys.argv)
    File "/usr/local/lib/python3.12/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
      utility.execute()
    File "/usr/local/lib/python3.12/site-packages/django/core/management/__init__.py", line 436, in execute
      self.fetch_command(subcommand).run_from_argv(self.argv)
    File "/usr/local/lib/python3.12/site-packages/django/core/management/base.py", line 413, in run_from_argv
      self.execute(*args, **cmd_options)
    File "/usr/local/lib/python3.12/site-packages/django/core/management/base.py", line 459, in execute
      output = self.handle(*args, **options)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.12/site-packages/django/core/management/base.py", line 107, in wrapper
      res = handle_func(*args, **kwargs)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.12/site-packages/django/core/management/commands/migrate.py", line 100, in handle
      self.check(databases=[database])
    File "/usr/local/lib/python3.12/site-packages/django/core/management/base.py", line 486, in check
      all_issues = checks.run_checks(
                   ^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.12/site-packages/django/core/checks/registry.py", line 88, in run_checks
      new_errors = check(app_configs=app_configs, databases=databases)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.12/site-packages/django/core/checks/model_checks.py", line 36, in check_all_models
      errors.extend(model.check(**kwargs))
                    ^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.12/site-packages/django/db/models/base.py", line 1610, in check
      *cls._check_constraints(databases),
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.12/site-packages/django/db/models/base.py", line 2460, in _check_constraints
      connection.features.supports_nulls_distinct_unique_constraints
    File "/usr/local/lib/python3.12/site-packages/django/utils/functional.py", line 47, in __get__
      res = instance.__dict__[self.name] = self.func(instance)
                                           ^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/features.py", line 141, in is_postgresql_15
      return self.connection.pg_version >= 150000
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.12/site-packages/django/utils/functional.py", line 47, in __get__
      res = instance.__dict__[self.name] = self.func(instance)
                                           ^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py", line 438, in pg_version
      with self.temporary_connection():
    File "/usr/local/lib/python3.12/contextlib.py", line 137, in __enter__
      return next(self.gen)
             ^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py", line 691, in temporary_connection
      with self.cursor() as cursor:
           ^^^^^^^^^^^^^
    File "/usr/local/lib/python3.12/site-packages/django/utils/asyncio.py", line 26, in inner
      return func(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py", line 316, in cursor
      return self._cursor()
             ^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py", line 292, in _cursor
      self.ensure_connection()
    File "/usr/local/lib/python3.12/site-packages/django/utils/asyncio.py", line 26, in inner
      return func(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py", line 274, in ensure_connection
      with self.wrap_database_errors:
    File "/usr/local/lib/python3.12/site-packages/django/db/utils.py", line 91, in __exit__
      raise dj_exc_value.with_traceback(traceback) from exc_value
    File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py", line 275, in ensure_connection
      self.connect()
    File "/usr/local/lib/python3.12/site-packages/django/utils/asyncio.py", line 26, in inner
      return func(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py", line 256, in connect
      self.connection = self.get_new_connection(conn_params)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.12/site-packages/django/utils/asyncio.py", line 26, in inner
      return func(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py", line 277, in get_new_connection
      connection = self.Database.connect(**conn_params)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.12/site-packages/psycopg2/__init__.py", line 122, in connect
      conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  django.db.utils.OperationalError: ERROR:  Endpoint ID is not specified. Either please upgrade the postgres client library (libpq) for SNI support or pass the endpoint ID (first part of the domain name) as a parameter: '?options=endpoint%3D<endpoint-id>'. See more at https://neon.tech/sni
   INFO Main child exited normally with code: 1
   INFO Starting clean up.
   WARN hallpass exited, pid: 306, status: signal: 15 (SIGTERM)
  2024/03/11 17:12:18 listening on [fdaa:8:465b:a7b:186:c475:5a37:2]:22 (DNS: [fdaa::3]:53)
  [    5.3454Preformatted text83] reboot: Restarting system
  machine restart policy set to 'no', not restarting
-------
Checking DNS configuration for djangoapp-v2-backend.fly.dev
Error: release command failed - aborting deployment. error release_command machine 080e092c6459e8 exited with non-zero status of 1

need ungent help

@alsnxx are you using Neon Postgres?

It looks like the endpoint id in the url is missing, here is the docs:

(post deleted by author)

thank you for the information… but it was a test db so dont worry about it…

1 Like