Ident authentication failed for user "netbox"Ident authentication failed for user "netbox" #12260
Unanswered
thaubein
asked this question in
Help Wanted!
Replies: 2 comments 3 replies
-
File "/opt/netbox/venv/lib64/python3.9/site-packages/psycopg2/init.py", line 122, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: FATAL: Ident authentication failed for user "netbox"
This is the relevant line, cannot authenticate to PostgreSQL on IPv6 localhost address ::1, presumably your pg_hba.conf has a line "host all all ::1/128 ident" where "ident" means it trusts the userid for local connections, instead of "md5" which checks the username/password for remote connections, IIUC. I'm personally using an external PostgreSQL instance and am not sure offhand what the issue is but things I'd check
* Is upgrade.sh running as local userid "netbox" or root and does that affect your ability to connect over local TCP
* Is your testing with pgsql using TCP or the local Unix domain socket to connect (/var/run/posgresql/.s.PGSQL.5432), maybe they have different behavior/auth (\conninfo in pgsql)
* Unlikely but is there any chance SELinux rule or IPtables rule is blocking traffic (sudo grep AVC /var/log/audit/audit.log, sudo iptables -L -n -v)
HTH
—
Mark Tinberg ***@***.***>
Division of Information Technology-Network Services
University of Wisconsin-Madison
…________________________________
From: thaubein ***@***.***>
Sent: Friday, April 14, 2023 9:24 AM
To: netbox-community/netbox ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [netbox-community/netbox] Ident authentication failed for user "netbox"Ident authentication failed for user "netbox" (Discussion #12260)
I'm working on getting NetBox up and running on RHEL 9.0, and I'm running into an issue with the upgrade.sh script. I've double checked the configuration.py with regards to netbox user and password, and everything appears be good. I'm able to login the database with netbox +password no issue.
Red Hat Enterprise Linux release 9.0 (Plow)
Python 3.9.14
###################################### upgrade.sh Output #####################################
Traceback (most recent call last):
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/db/backends/base/base.py", line 282, in ensure_connection
self.connect()
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/db/backends/base/base.py", line 263, in connect
self.connection = self.get_new_connection(conn_params)
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/db/backends/postgresql/base.py", line 215, in get_new_connection
connection = Database.connect(**conn_params)
File "/opt/netbox/venv/lib64/python3.9/site-packages/psycopg2/init.py", line 122, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: FATAL: Ident authentication failed for user "netbox"
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/netbox/netbox/manage.py", line 10, in
execute_from_command_line(sys.argv)
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/core/management/init.py", line 446, in execute_from_command_line
utility.execute()
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/core/management/init.py", line 440, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/core/management/base.py", line 402, in run_from_argv
self.execute(*args, **cmd_options)
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/core/management/base.py", line 448, in execute
output = self.handle(*args, **options)
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/core/management/base.py", line 96, in wrapped
res = handle_func(*args, **kwargs)
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/core/management/commands/migrate.py", line 114, in handle
executor = MigrationExecutor(connection, self.migration_progress_callback)
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/db/migrations/executor.py", line 18, in init
self.loader = MigrationLoader(self.connection)
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/db/migrations/loader.py", line 58, in init
self.build_graph()
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/db/migrations/loader.py", line 235, in build_graph
self.applied_migrations = recorder.applied_migrations()
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/db/migrations/recorder.py", line 81, in applied_migrations
if self.has_table():
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/db/migrations/recorder.py", line 57, in has_table
with self.connection.cursor() as cursor:
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/db/backends/base/base.py", line 323, in cursor
return self._cursor()
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/db/backends/base/base.py", line 299, in _cursor
self.ensure_connection()
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/db/backends/base/base.py", line 282, in ensure_connection
self.connect()
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/db/utils.py", line 91, in exit
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/db/backends/base/base.py", line 282, in ensure_connection
self.connect()
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/db/backends/base/base.py", line 263, in connect
self.connection = self.get_new_connection(conn_params)
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/db/backends/postgresql/base.py", line 215, in get_new_connection
connection = Database.connect(**conn_params)
File "/opt/netbox/venv/lib64/python3.9/site-packages/psycopg2/init.py", line 122, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
django.db.utils.OperationalError: connection to server at "localhost" (::1), port 5432 failed: FATAL: Ident authentication failed for user "netbox"
—
Reply to this email directly, view it on GitHub<#12260>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAS7UM22K2Q3W4BIOQLMQ4DXBFM3VANCNFSM6AAAAAAW6PZE2Q>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
3 replies
-
Googled this same error, first result was this issue and changing Thank you |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm working on getting NetBox up and running on RHEL 9.0, and I'm running into an issue with the upgrade.sh script. I've double checked the configuration.py with regards to netbox user and password, and everything appears be good. I'm able to login the database with netbox +password no issue.
Red Hat Enterprise Linux release 9.0 (Plow)
Python 3.9.14
###################################### upgrade.sh Output #####################################
Traceback (most recent call last):
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/db/backends/base/base.py", line 282, in ensure_connection
self.connect()
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/db/backends/base/base.py", line 263, in connect
self.connection = self.get_new_connection(conn_params)
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/db/backends/postgresql/base.py", line 215, in get_new_connection
connection = Database.connect(**conn_params)
File "/opt/netbox/venv/lib64/python3.9/site-packages/psycopg2/init.py", line 122, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: FATAL: Ident authentication failed for user "netbox"
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/netbox/netbox/manage.py", line 10, in
execute_from_command_line(sys.argv)
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/core/management/init.py", line 446, in execute_from_command_line
utility.execute()
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/core/management/init.py", line 440, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/core/management/base.py", line 402, in run_from_argv
self.execute(*args, **cmd_options)
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/core/management/base.py", line 448, in execute
output = self.handle(*args, **options)
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/core/management/base.py", line 96, in wrapped
res = handle_func(*args, **kwargs)
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/core/management/commands/migrate.py", line 114, in handle
executor = MigrationExecutor(connection, self.migration_progress_callback)
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/db/migrations/executor.py", line 18, in init
self.loader = MigrationLoader(self.connection)
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/db/migrations/loader.py", line 58, in init
self.build_graph()
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/db/migrations/loader.py", line 235, in build_graph
self.applied_migrations = recorder.applied_migrations()
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/db/migrations/recorder.py", line 81, in applied_migrations
if self.has_table():
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/db/migrations/recorder.py", line 57, in has_table
with self.connection.cursor() as cursor:
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/db/backends/base/base.py", line 323, in cursor
return self._cursor()
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/db/backends/base/base.py", line 299, in _cursor
self.ensure_connection()
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/db/backends/base/base.py", line 282, in ensure_connection
self.connect()
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/db/utils.py", line 91, in exit
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/db/backends/base/base.py", line 282, in ensure_connection
self.connect()
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/db/backends/base/base.py", line 263, in connect
self.connection = self.get_new_connection(conn_params)
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/db/backends/postgresql/base.py", line 215, in get_new_connection
connection = Database.connect(**conn_params)
File "/opt/netbox/venv/lib64/python3.9/site-packages/psycopg2/init.py", line 122, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
django.db.utils.OperationalError: connection to server at "localhost" (::1), port 5432 failed: FATAL: Ident authentication failed for user "netbox"
Beta Was this translation helpful? Give feedback.
All reactions