From: | Chris <dmagick(at)gmail(dot)com> |
---|---|
To: | binberati <binberati(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: FastCgi / PostgreSQL: FATAL: Ident authentication failed |
Date: | 2006-10-20 06:27:51 |
Message-ID: | 45386C67.9050308@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
binberati wrote:
> Hi,
>
> I have a strange problem running Django on a GrokThis.net shared
> hosting account:
>
> Environment:
> ------------------------------------------------------
> Apache/2.0.59 (Unix)
> mod_fastcgi/2.4.2
> PostgreSQL 8.1.3
> ------------------------------------------------------
>
>
> settings.py:
> ------------------------------------------------------
> DATABASE_ENGINE = 'postgresql'
> DATABASE_USER = 'user_name'
> DATABASE_PASSWORD = '***'
> ------------------------------------------------------
> or
> ------------------------------------------------------
> DATABASE_ENGINE = 'postgresql_psycopg2'
> DATABASE_USER = 'user_name'
> DATABASE_PASSWORD = '***'
> ------------------------------------------------------
>
>
> Django on FastCgi renders this error:
> ------------------------------------------------------
> Traceback (most recent call last):
> File "/home/shared/user_name/django_src/django/template/__init__.py" in
> render_node
> 706. result = node.render(context)
> File "/home/shared/user_name/django_src/django/template/__init__.py" in
> render
> 757. return self.encode_output(output) File
> "/home/shared/user_name/django_src/django/template/__init__.py" in
> encode_output
> 739. return str(output)
> File "/home/shared/user_name/django_src/django/db/models/query.py" in
> __repr__
> 97. return repr(self._get_data())
> File "/home/shared/user_name/django_src/django/db/models/query.py" in
> _get_data
> 430. self._result_cache = list(self.iterator()) File
> "/home/shared/user_name/django_src/django/db/models/query.py" in
> iterator
> 170. cursor = connection.cursor()
> File
> "/home/shared/user_name/django_src/django/db/backends/postgresql/base.py"
> in cursor
> 43. self.connection = Database.connect(conn_string)
>
> OperationalError at /
> FATAL: Ident authentication failed for user "user_name"
> ------------------------------------------------------
'ident' means the username the service is running as has to be the same
as the database username (read
http://www.postgresql.org/docs/8.1/static/auth-methods.html#AUTH-IDENT)
So service is running as user "X" - the database user has to be "X" as well.
That's the first thing to check.
Second - can you connect to postgres from a shell command line?
--
Postgresql & php tutorials
http://www.designmagick.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Gurjeet Singh | 2006-10-20 06:37:01 | Re: trigger postgresql 7.4 |
Previous Message | Ron Johnson | 2006-10-20 06:03:56 | Re: The HP MSA20 SATA-SCSI enclosure |