FATAL: password authentication failed for user "home-assistant"

Recently I got an error with some integrations setting up. The log tells me there is some issue with: FATAL: password authentication failed for user “home-assistant”

What is the issue there?

2022-03-18 08:53:27 ERROR (Recorder) [homeassistant.components.recorder] Error during connection setup: (psycopg2.OperationalError) FATAL: password authentication failed for user "home-assistant"
(Background on this error at: https://sqlalche.me/e/14/e3q8) (retrying in 3 seconds)
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 3243, in _wrap_pool_connect
return fn()
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 310, in connect
return _ConnectionFairy._checkout(self)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 868, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 476, in checkout
rec = pool._do_get()
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/impl.py", line 146, in _do_get
self._dec_overflow()
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/util/langhelpers.py", line 70, in __exit__
compat.raise_(
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/util/compat.py", line 207, in raise_
raise exception
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/impl.py", line 143, in _do_get
return self._create_connection()
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 256, in _create_connection
return _ConnectionRecord(self)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 371, in __init__
self.__connect()
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 666, in __connect
pool.logger.debug("Error on connect(): %s", e)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/util/langhelpers.py", line 70, in __exit__
compat.raise_(
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/util/compat.py", line 207, in raise_
raise exception
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 661, in __connect
self.dbapi_connection = connection = pool._invoke_creator(self)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/create.py", line 590, in connect
return dialect.connect(*cargs, **cparams)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 584, in connect
return self.dbapi.connect(*cargs, **cparams)
File "/usr/local/lib/python3.9/site-packages/psycopg2/__init__.py", line 122, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)

As the error is coming from recorder I’m going to go out on a limb and guess you’re using something like MySQL, MariaDB, or PostgreSQL for your database?

The problem is with the home-assistant account there - check the logs of your database server to see what’s going on.

Homeassistant is installed on Truenas Scale via Truecharts App. I did not do any custom database changes.

How do I access the database server to check the logs?

The message indicates postgresql specifically (psycopg2)
Just show your configuration.yaml

EDIT: Looks like there are a number of “Home Assistant” app on that Truenas appstore.
Which one are you using, exactly?

Likely some missing prerequisites for that app. You should look on the support of the app.

I ditched the truecharts version now for the standard docker (homeassistant/home-assistant) install.

Set the dataset (UNIX) rights to “Others - Full Control” to not again run into any rights related issues.

Also inside Homeassistant reconfigured everything.

For now it works …

I have hass installed by a Truechart on a Truenas Scale system and after an upgrade from 2022.12.something to 2023.4.6_19.0.15 i had the same issue. After reading the logs and the helm chart i came across this section charts/values.yaml at 14ea546f09b00c2a963113eee292f6aadd8bd974 · truecharts/charts · GitHub
It was worth a shot, so after backupping the configuration.yaml i deleted the recorder block from the original file and after a restart everything worked again.