On 04/13/2013 06:45 PM, Sebastian Reichel wrote:
> 
> I can't tell you either. For debugging you can replace line 25 in
> /usr/share/tt-rss/www/include/db.php with the following one:
> 
> die("PGSQL connection failed:" . $string);
> 
> This will output the connection settings used including the
> password. Connecting to the postgresql db using these parameters
> may give more information.
> 
> -- Sebastian

/var/log/tt-rss.log:
PHP Warning:  pg_last_error(): No PostgreSQL link opened yet in
/usr/share/tt-rss/www/include/db.php on line 25
Unable to connect to database (as ttrss to , database ttrss):PHP
Warning:  pg_connect(): Unable to connect to PostgreSQL server: FATAL:
Peer authentication failed for user "ttrss" in
/usr/share/tt-rss/www/include/db.php on line 22
PHP Warning:  pg_last_error(): No PostgreSQL link opened yet in
/usr/share/tt-rss/www/include/db.php on line 25
Unable to connect to database (as ttrss to , database ttrss):PHP
Warning:  pg_connect(): Unable to connect to PostgreSQL server: FATAL:
Peer authentication failed for user "ttrss" in
/usr/share/tt-rss/www/include/db.php on line 22
PGSQL connection failed:dbname=ttrss user=ttrss password=<snip>


The password <snip> is the password that I configured while installing
tt-rss where it ran dbconfig to set it up. It correctly installed the
database.


                                  List of databases
   Name    |  Owner   | Encoding |   Collate   |    Ctype    |   Access
privileges
-----------+----------+----------+-------------+-------------+-----------------------
 postgres  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 template0 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
=c/postgres          +
           |          |          |             |             |
postgres=CTc/postgres
 template1 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
=c/postgres          +
           |          |          |             |             |
postgres=CTc/postgres
 ttrss     | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
(4 rows)



So then I tried logging into the database as the database user ttrss.

Aya:/home/david# psql -d ttrss -U ttrss -W
Password for user ttrss:
psql: FATAL:  Peer authentication failed for user "ttrss"
Aya:/home/david#

postgres@Aya:~$ psql -d ttrss
psql (9.2.4)
Type "help" for help.

ttrss=# select * from pg_user;
 usename  | usesysid | usecreatedb | usesuper | usecatupd | userepl |
passwd  | valuntil | useconfig
----------+----------+-------------+----------+-----------+---------+----------+----------+-----------
 postgres |       10 | t           | t        | t         | t       |
******** |          |
 ttrss    |    17394 | f           | f        | f         | f       |
******** |          |
(2 rows)

ttrss=#


So then I tried changing the password myself...
ttrss=# alter user ttrss with password '<snip>'
;
ALTER ROLE



And it still doesn't work....

Aya:/home/david# psql -d ttrss -U ttrss -W
Password for user ttrsss:
psql: FATAL:  Peer authentication failed for user "ttrsss"


So then I tried this....

postgres=# GRANT ALL PRIVILEGES ON DATABASE ttrss to ttrss;
GRANT

Aya:/home/david# psql -d ttrss -U ttrss -W
Password for user ttrss:
psql: FATAL:  Peer authentication failed for user "ttrss"
Aya:/home/david#


Still doesn't work....

Tried restarting postgresql..

Still doesn't work....


/etc/postgresql/9.2/main/pg_hba.conf:

local   all             postgres                                peer

# TYPE  DATABASE        USER            ADDRESS                 METHOD

# "local" is for Unix domain socket connections only
local   all             all                                     peer
# IPv4 local connections:
host    all             all             127.0.0.1/32            md5
# IPv6 local connections:
host    all             all             ::1/128                 md5
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local   replication     postgres                                peer
#host    replication     postgres        127.0.0.1/32            md5
#host    replication     postgres        ::1/128                 md5
~



Any ideas?


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to