Closed bitshiftnetau closed 1 year ago
I've tried to add the environment variables directly.
It appears as though either this project is not stable, there may be an issue with the postgres
docker image, or there may in fact be an issue with docker-compose
itself.
Either way I will need to leave this up to your investigation as I don't have the resources to commit any further. Do let me know if you need any more information and I look forward to using this project when it is ready.
Thanks for the report. This is repeated as well. We will try to get some investigation done it.
@bitshiftnetau a similar issue was covered in a separate conversation today on Slack that also drove some investigation here.
The issue that was seen there was a couple of Docker related issues. When I repeated the issue, I had a container image from Postgres that did not properly handle the change of systems. Trying a docker system prune
may help to get rid of some legacy containers.
Don't know if it's the same thing, but I'm having a similar problem. Environment: Ubuntu 22.04.1 LTS Docker 20.10.18 build b40c2f6 Docker Compose 2.10.2 Nautobot 1.4.5 with Python 3.9
I can only get the server to build properly with the default password "decinablesprewad." If I change it to anything else the nautbot conainers throw authentication failure errors.
I made sure my system was clean of all images to rule out issues with lingering images.
nautobot-docker-compose-celery_beat-1 | Traceback (most recent call last):
nautobot-docker-compose-celery_beat-1 | File "/usr/local/lib/python3.9/site-packages/django/db/backends/base/base.py", line 219, in ensure_connection
nautobot-docker-compose-celery_beat-1 | self.connect()
nautobot-docker-compose-celery_beat-1 | File "/usr/local/lib/python3.9/site-packages/django/utils/asyncio.py", line 33, in inner
nautobot-docker-compose-celery_beat-1 | return func(*args, **kwargs)
nautobot-docker-compose-celery_beat-1 | File "/usr/local/lib/python3.9/site-packages/django/db/backends/base/base.py", line 200, in connect
nautobot-docker-compose-celery_beat-1 | self.connection = self.get_new_connection(conn_params)
nautobot-docker-compose-celery_beat-1 | File "/usr/local/lib/python3.9/site-packages/django/utils/asyncio.py", line 33, in inner
nautobot-docker-compose-celery_beat-1 | return func(*args, **kwargs)
nautobot-docker-compose-celery_beat-1 | File "/usr/local/lib/python3.9/site-packages/django/db/backends/postgresql/base.py", line 187, in get_new_connection
nautobot-docker-compose-celery_beat-1 | connection = Database.connect(**conn_params)
nautobot-docker-compose-celery_beat-1 | File "/usr/local/lib/python3.9/site-packages/psycopg2/__init__.py", line 122, in connect
nautobot-docker-compose-celery_beat-1 | conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
nautobot-docker-compose-celery_beat-1 | psycopg2.OperationalError: connection to server at "db" (192.168.176.4), port 5432 failed: FATAL: password authentication failed for user "nautobot"
nautobot-docker-compose-celery_beat-1 |
nautobot-docker-compose-celery_beat-1 |
nautobot-docker-compose-celery_beat-1 | The above exception was the direct cause of the following exception:
nautobot-docker-compose-celery_beat-1 |
nautobot-docker-compose-celery_beat-1 | Traceback (most recent call last):
nautobot-docker-compose-celery_beat-1 | File "/usr/local/bin/nautobot-server", line 8, in <module>
nautobot-docker-compose-celery_beat-1 | sys.exit(main())
nautobot-docker-compose-celery_beat-1 | File "/usr/local/lib/python3.9/site-packages/nautobot/core/cli.py", line 54, in main
nautobot-docker-compose-celery_beat-1 | run_app(
nautobot-docker-compose-celery_beat-1 | File "/usr/local/lib/python3.9/site-packages/nautobot/core/runner/runner.py", line 263, in run_app
nautobot-docker-compose-celery_beat-1 | management.execute_from_command_line([runner_name, command] + command_args)
nautobot-docker-compose-celery_beat-1 | File "/usr/local/lib/python3.9/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
nautobot-docker-compose-celery_beat-1 | utility.execute()
nautobot-docker-compose-celery_beat-1 | File "/usr/local/lib/python3.9/site-packages/django/core/management/__init__.py", line 395, in execute
nautobot-docker-compose-celery_beat-1 | django.setup()
nautobot-docker-compose-celery_beat-1 | File "/usr/local/lib/python3.9/site-packages/django/__init__.py", line 24, in setup
nautobot-docker-compose-celery_beat-1 | apps.populate(settings.INSTALLED_APPS)
nautobot-docker-compose-celery_beat-1 | File "/usr/local/lib/python3.9/site-packages/django/apps/registry.py", line 122, in populate
nautobot-docker-compose-celery_beat-1 | app_config.ready()
nautobot-docker-compose-celery_beat-1 | File "/usr/local/lib/python3.9/site-packages/nautobot/extras/apps.py", line 39, in ready
nautobot-docker-compose-celery_beat-1 | wrap_model_clean_methods()
nautobot-docker-compose-celery_beat-1 | File "/usr/local/lib/python3.9/site-packages/nautobot/extras/plugins/validators.py", line 43, in wrap_model_clean_methods
nautobot-docker-compose-celery_beat-1 | for model in ContentType.objects.filter(FeatureQuery("custom_validators").get_query()):
nautobot-docker-compose-celery_beat-1 | File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 280, in __iter__
nautobot-docker-compose-celery_beat-1 | self._fetch_all()
nautobot-docker-compose-celery_beat-1 | File "/usr/local/lib/python3.9/site-packages/cacheops/query.py", line 271, in _fetch_all
nautobot-docker-compose-celery_beat-1 | return self._no_monkey._fetch_all(self)
nautobot-docker-compose-celery_beat-1 | File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 1324, in _fetch_all
nautobot-docker-compose-celery_beat-1 | self._result_cache = list(self._iterable_class(self))
nautobot-docker-compose-celery_beat-1 | File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 51, in __iter__
nautobot-docker-compose-celery_beat-1 | results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
nautobot-docker-compose-celery_beat-1 | File "/usr/local/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1173, in execute_sql
nautobot-docker-compose-celery_beat-1 | cursor = self.connection.cursor()
nautobot-docker-compose-celery_beat-1 | File "/usr/local/lib/python3.9/site-packages/django/utils/asyncio.py", line 33, in inner
nautobot-docker-compose-celery_beat-1 | return func(*args, **kwargs)
nautobot-docker-compose-celery_beat-1 | File "/usr/local/lib/python3.9/site-packages/django/db/backends/base/base.py", line 259, in cursor
nautobot-docker-compose-celery_beat-1 | return self._cursor()
nautobot-docker-compose-celery_beat-1 | File "/usr/local/lib/python3.9/site-packages/django/db/backends/base/base.py", line 235, in _cursor
nautobot-docker-compose-celery_beat-1 | self.ensure_connection()
nautobot-docker-compose-celery_beat-1 | File "/usr/local/lib/python3.9/site-packages/django/utils/asyncio.py", line 33, in inner
nautobot-docker-compose-celery_beat-1 | return func(*args, **kwargs)
nautobot-docker-compose-celery_beat-1 | File "/usr/local/lib/python3.9/site-packages/django/db/backends/base/base.py", line 219, in ensure_connection
nautobot-docker-compose-celery_beat-1 | self.connect()
nautobot-docker-compose-celery_beat-1 | File "/usr/local/lib/python3.9/site-packages/django/db/utils.py", line 90, in __exit__
nautobot-docker-compose-celery_beat-1 | raise dj_exc_value.with_traceback(traceback) from exc_value
nautobot-docker-compose-celery_beat-1 | File "/usr/local/lib/python3.9/site-packages/django/db/backends/base/base.py", line 219, in ensure_connection
nautobot-docker-compose-celery_beat-1 | self.connect()
nautobot-docker-compose-celery_beat-1 | File "/usr/local/lib/python3.9/site-packages/django/utils/asyncio.py", line 33, in inner
nautobot-docker-compose-celery_beat-1 | return func(*args, **kwargs)
nautobot-docker-compose-celery_beat-1 | File "/usr/local/lib/python3.9/site-packages/django/db/backends/base/base.py", line 200, in connect
nautobot-docker-compose-celery_beat-1 | self.connection = self.get_new_connection(conn_params)
nautobot-docker-compose-celery_beat-1 | File "/usr/local/lib/python3.9/site-packages/django/utils/asyncio.py", line 33, in inner
nautobot-docker-compose-celery_beat-1 | return func(*args, **kwargs)
nautobot-docker-compose-celery_beat-1 | File "/usr/local/lib/python3.9/site-packages/django/db/backends/postgresql/base.py", line 187, in get_new_connection
nautobot-docker-compose-celery_beat-1 | connection = Database.connect(**conn_params)
nautobot-docker-compose-celery_beat-1 | File "/usr/local/lib/python3.9/site-packages/psycopg2/__init__.py", line 122, in connect
nautobot-docker-compose-celery_beat-1 | conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
nautobot-docker-compose-celery_beat-1 | django.db.utils.OperationalError: connection to server at "db" (192.168.176.4), port 5432 failed: FATAL: password authentication failed for user "nautobot"
@aj-cruz where did we end this at on the slack conversation?
@jvanderaa After a bunch of testing, what I discovered is on a clean system it works no problem, but if do some dev work such as modifying the docker-compose file, local.env, etc. (not sure what exactly triggers it) and cycling through docker compose down / docker compose up a few times it eventually gets to a state where changing the password starts throwing the errors. Even if I do docker compose down, delete all the images, and docker system prune, it will not take a password change. I have to blow the server away and start with a fresh install. Which is no problem, I can work with that
I ran into this weirdness as well if anyone runs across this. My use case was with Rocky Linux. I did the following..
docker system prune docker stop $(docker ps -a -q) # This will stop all running containers. docker rm $(docker ps -a -q) # This will remove all running containers. docker rmi $(docker images -q) # This will delete all docker images. docker volume rm $(docker volume ls -q) # Completely option but will remove all volumes.
Environment: Docker in LXC on Proxmox 7.1-7
For some reason the default values are not working, nor any combination of altered values.
I followed everything laid out here:
Initially I adjusted the values to suit a more secure environment, but then after issues I worked back to simple defaults: