[Davical-general] PDO connection error

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Davical-general] PDO connection error

Ted To
Hi,

I just migrated to a new VPS and the one hiccup I'm getting is with
Davical.

I installed davical and awl from the gitlab source and I installed
postgres from the EPEL repo.  I added

local   davical    davical_app   trust
local   davical    davical_dba   trust

to pg_hba.conf which for the EPEL version of postgres is located in
/var/lib/pgsql/data.

I created the davical database, the davical_dba user:

postgres=# \list
                                    List of databases
    Name    |    Owner    | Encoding |   Collate   |    Ctype    |
Access privileges
-----------+-------------+----------+-------------+-------------+-----------------------
  davical   | davical_dba | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
  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
(4 rows)

Next I imported the dumped database:

psql davical < davical.pgsqldump

which created the davical_app user:

postgres=# select * from pg_user;
    usename   | usesysid | usecreatedb | usesuper | usecatupd | userepl |
  passwd  | valuntil | useconfig
-------------+----------+-------------+----------+-----------+---------+----------+----------+-----------
  postgres    |       10 | t           | t        | t         | t       |
******** |          |
  davical_dba |    16384 | f           | f        | f         | f       |
******** |          |
  davical_app |    17195 | f           | f        | f         | f       |
******** |          |
(3 rows)

The only thing I can think is that the pg_hba.conf file is, for some
reason, not being read when postgres starts.

Note that for the EPEL version of postgresql, /etc/postgresql is not
being created and populated with a default configuration but since the
pg_hba.conf file is created in /var/lib/pgsql/data, I assumed, perhaps
incorrectly, that configuration files in that directory would be read on
start.

Thanks,
Ted To


------------------------------------------------------------------------------
Presto, an open source distributed SQL query engine for big data, initially
developed by Facebook, enables you to easily query your data on Hadoop in a
more interactive manner. Teradata is also now providing full enterprise
support for Presto. Download a free open source copy now.
http://pubads.g.doubleclick.net/gampad/clk?id=250295911&iu=/4140
_______________________________________________
Davical-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/davical-general
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: PDO connection error

Vincent Van Houtte
Ted To schreef op 2015-11-09 19:47:

> Hi,
>
> I just migrated to a new VPS and the one hiccup I'm getting is with
> Davical.
>
> I installed davical and awl from the gitlab source and I installed
> postgres from the EPEL repo.  I added
>
> local   davical    davical_app   trust
> local   davical    davical_dba   trust
>
> to pg_hba.conf which for the EPEL version of postgres is located in
> /var/lib/pgsql/data.

The above lines should not be 'added' (as in 'at the bottom'), but
should be put in the correct location of the pg_hba.conf-file (the order
matters here).

HTH,
Vincent



> I created the davical database, the davical_dba user:
>
> postgres=# \list
>                                     List of databases
>     Name    |    Owner    | Encoding |   Collate   |    Ctype    |
> Access privileges
> -----------+-------------+----------+-------------+-------------+-----------------------
>   davical   | davical_dba | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
>   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
> (4 rows)
>
> Next I imported the dumped database:
>
> psql davical < davical.pgsqldump
>
> which created the davical_app user:
>
> postgres=# select * from pg_user;
>     usename   | usesysid | usecreatedb | usesuper | usecatupd | userepl
> |
>   passwd  | valuntil | useconfig
> -------------+----------+-------------+----------+-----------+---------+----------+----------+-----------
>   postgres    |       10 | t           | t        | t         | t      
> |
> ******** |          |
>   davical_dba |    16384 | f           | f        | f         | f      
> |
> ******** |          |
>   davical_app |    17195 | f           | f        | f         | f      
> |
> ******** |          |
> (3 rows)
>
> The only thing I can think is that the pg_hba.conf file is, for some
> reason, not being read when postgres starts.
>
> Note that for the EPEL version of postgresql, /etc/postgresql is not
> being created and populated with a default configuration but since the
> pg_hba.conf file is created in /var/lib/pgsql/data, I assumed, perhaps
> incorrectly, that configuration files in that directory would be read
> on
> start.
>
> Thanks,
> Ted To
>
>
> ------------------------------------------------------------------------------
> Presto, an open source distributed SQL query engine for big data,
> initially
> developed by Facebook, enables you to easily query your data on Hadoop
> in a
> more interactive manner. Teradata is also now providing full enterprise
> support for Presto. Download a free open source copy now.
> http://pubads.g.doubleclick.net/gampad/clk?id=250295911&iu=/4140
> _______________________________________________
> Davical-general mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/davical-general

--
Vincent Van Houtte
Advocaat
Advocatenkantoor Suy, Van Baeveghem & Van Houtte
Brusselsestraat 108
9200 Dendermonde
T 052 52 06 05
T 052 77 90 05
F 052 52 06 46
W http://synergylaw.be

------------------------------------------------------------------------------
_______________________________________________
Davical-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/davical-general
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: PDO connection error

Ted To
Many thanks!  Moving these lines above the line:

local   all          all                  peer

did the trick!  All appears to be well now.

On 2015-11-10 9:51 am, Vincent Van Houtte wrote:

> Ted To schreef op 2015-11-09 19:47:
>> Hi,
>>
>> I just migrated to a new VPS and the one hiccup I'm getting is with
>> Davical.
>>
>> I installed davical and awl from the gitlab source and I installed
>> postgres from the EPEL repo.  I added
>>
>> local   davical    davical_app   trust
>> local   davical    davical_dba   trust
>>
>> to pg_hba.conf which for the EPEL version of postgres is located in
>> /var/lib/pgsql/data.
>
> The above lines should not be 'added' (as in 'at the bottom'), but
> should be put in the correct location of the pg_hba.conf-file (the
> order matters here).
>
> HTH,
> Vincent
>
>
>
>> I created the davical database, the davical_dba user:
>>
>> postgres=# \list
>>                                     List of databases
>>     Name    |    Owner    | Encoding |   Collate   |    Ctype    |
>> Access privileges
>> -----------+-------------+----------+-------------+-------------+-----------------------
>>   davical   | davical_dba | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
>>   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
>> (4 rows)
>>
>> Next I imported the dumped database:
>>
>> psql davical < davical.pgsqldump
>>
>> which created the davical_app user:
>>
>> postgres=# select * from pg_user;
>>     usename   | usesysid | usecreatedb | usesuper | usecatupd |
>> userepl |
>>   passwd  | valuntil | useconfig
>> -------------+----------+-------------+----------+-----------+---------+----------+----------+-----------
>>   postgres    |       10 | t           | t        | t         | t      
>>  |
>> ******** |          |
>>   davical_dba |    16384 | f           | f        | f         | f      
>>  |
>> ******** |          |
>>   davical_app |    17195 | f           | f        | f         | f      
>>  |
>> ******** |          |
>> (3 rows)
>>
>> The only thing I can think is that the pg_hba.conf file is, for some
>> reason, not being read when postgres starts.
>>
>> Note that for the EPEL version of postgresql, /etc/postgresql is not
>> being created and populated with a default configuration but since the
>> pg_hba.conf file is created in /var/lib/pgsql/data, I assumed, perhaps
>> incorrectly, that configuration files in that directory would be read
>> on
>> start.
>>
>> Thanks,
>> Ted To
>>
>>
>> ------------------------------------------------------------------------------
>> Presto, an open source distributed SQL query engine for big data,
>> initially
>> developed by Facebook, enables you to easily query your data on Hadoop
>> in a
>> more interactive manner. Teradata is also now providing full
>> enterprise
>> support for Presto. Download a free open source copy now.
>> http://pubads.g.doubleclick.net/gampad/clk?id=250295911&iu=/4140
>> _______________________________________________
>> Davical-general mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/davical-general

------------------------------------------------------------------------------
_______________________________________________
Davical-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/davical-general
Loading...