Hello,
I've installing Drupal 7 on a server with the database running on a remote server. When I try and go through the installation script I get the following message:
Failed to connect to your database server. The server reports the following message: SQLSTATE[08006] [7] could not connect to server: Permission denied Is the server running on host "hubdb-dev" and accepting TCP/IP connections on port 5432?.
interestingly, I can connect to the database server from the command-line on the same system:
[root@hubweb-dev corp-site]# psql -U corp-site -h hubdb-dev corpsitedb Password for user corp-site: Welcome to psql 8.1.23, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms \h for help with SQL commands ? for help with psql commands \g or terminate with semicolon to execute query \q to quit
corpsitedb=>
Any ideas would be welcomed ...
Thanks, Mark
Hi again,
I've upgraded to PostgreSQL 8.4 now (yeah, I read the docs again :) ) but I'm still getting the same error.
When I tcpdump at the database server (a different host), I don't see any traffic (however when I use psql from the command like I do see the traffic).
Is there a log file generated during the install process that I could check?
Thanks, Mark
On Fri, May 20, 2011 at 2:03 PM, mark bradley gopearls42@gmail.com wrote:
Hello,
I've installing Drupal 7 on a server with the database running on a remote server. When I try and go through the installation script I get the following message:
Failed to connect to your database server. The server reports the following message: SQLSTATE[08006] [7] could not connect to server: Permission denied Is the server running on host "hubdb-dev" and accepting TCP/IP connections on port 5432?.
interestingly, I can connect to the database server from the command-line on the same system:
[root@hubweb-dev corp-site]# psql -U corp-site -h hubdb-dev corpsitedb Password for user corp-site: Welcome to psql 8.1.23, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms \h for help with SQL commands ? for help with psql commands \g or terminate with semicolon to execute query \q to quit
corpsitedb=>
Any ideas would be welcomed ...
Thanks, Mark
On Fri, 20 May 2011 21:10:32 -0400 mark bradley gopearls42@gmail.com wrote:
Hi again,
I've upgraded to PostgreSQL 8.4 now (yeah, I read the docs again :) ) but I'm still getting the same error.
When I tcpdump at the database server (a different host), I don't see any traffic (however when I use psql from the command like I do see the traffic).
Is there a log file generated during the install process that I could check?
psql connects through sockets, Drupal (was used to?) connect through tcp. Give a look to pg_hba.conf for connection permission. PHP had (has?) a problem and if you really want to have a socket connection you had to skip "host=localhost" in the connection string. Drupal is using a completely new DB abstraction layer and this may not be needed anymore.
On Sat, May 21, 2011 at 5:53 AM, Ivan Sergio Borgonovo <mail@webthatworks.it
wrote:
On Fri, 20 May 2011 21:10:32 -0400 mark bradley gopearls42@gmail.com wrote:
Hi again,
I've upgraded to PostgreSQL 8.4 now (yeah, I read the docs again :) ) but I'm still getting the same error.
When I tcpdump at the database server (a different host), I don't see any traffic (however when I use psql from the command like I do see the traffic).
Is there a log file generated during the install process that I could check?
psql connects through sockets, Drupal (was used to?) connect through tcp. Give a look to pg_hba.conf for connection permission. PHP had (has?) a problem and if you really want to have a socket connection you had to skip "host=localhost" in the connection string. Drupal is using a completely new DB abstraction layer and this may not be needed anymore.
-- Ivan Sergio Borgonovo http://www.webthatworks.it
-- [ Drupal support list | http://lists.drupal.org/ ]
Hi Ivan,
In my psql command-line test I'm actually connecting over TCP since it's between two hosts.
Just to clarify, I have two servers -- 'web' and 'db' (so really my string would be host="db" if I was setting it manually). Using psql I can connect to the database from either host so I'm fairly confident in my pg_hba file.
When I'm going through the install script I do not see any TCP traffic to port 5432 on either server (but when I'm using psql I do see the traffic).
Do you know if the install script produces a log that can be used for debugging?
Thanks, Mark
On Sat, 21 May 2011 07:10:27 -0400 mark bradley gopearls42@gmail.com wrote:
In my psql command-line test I'm actually connecting over TCP since it's between two hosts.
I don't know if there are any installation logs.
Check your settings.php
Check if your php has support for postgres pdo. php -i | grep -i pdo
Write a small php script on the box running drupal to see if you can connect.
$dbh = new PDO( "pgsql:dbname=$dbname;host=$host", $username, $password ); foreach( $dbh->query('select * from users limit 1') as $row ) { print_r( $row ); }