Re: Trouble installing Drupal 5 using sockets (a little long) **SOLVED**???

From: Bryan <brakeb(at)gmail(dot)com>
To: "Frank Bax" <fbax(at)sympatico(dot)ca>
Cc: "PostgreSQL List - Novice" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Trouble installing Drupal 5 using sockets (a little long) **SOLVED**???
Date: 2008-08-23 22:48:02
Message-ID: 6532b7c80808231548j3638b273g3596e4cd82c0d103@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Sat, Aug 23, 2008 at 3:40 PM, Bryan <brakeb(at)gmail(dot)com> wrote:
> On Thu, Aug 14, 2008 at 7:53 PM, Frank Bax <fbax(at)sympatico(dot)ca> wrote:
>> Bryan wrote:
>>>>
>>>> I suspect you might need to create a symbolic link from one to the other;
>>>> but I don't know where the "real" one should be. Perhaps someone else
>>>> knows
>>>> that.
>>>
>>> But, the database starts and sees the socket, what part of pgsql is
>>> not seeing the socket? Could the fact that I did the "initdb" without
>>> the /var/www/tmp socket be causing the issue? Pgsql d
>>
>>
>>
>> The database SERVER creates the socket, so of course it can see it; the
>> problem is that your database CLIENTS do not see the socket.
>>
>> When you run createuser and createdb; you are running client interfaces
>> which expect to communicate with the PG server via the socket at /tmp/ but
>> that's not where it is; it is created in /var/www/tmp/ everytime the PG
>> server is started. The conf file tells PG server where to create the
>> socket; not where the clients should look for it.
>>
>> Yes, I presented a workaround. I also suggested that the proper permanent
>> solution is to include creation of a symbolic link on every boot; which I
>> don't have the proper syntax for since I've never used it (I chose to
>> disable chroot instead). Here's my guess at command you need to add to
>> startup:
>>
>> ln /var/www/tmp/.s.PGSQL.5432 /tmp/.s.PGSQL.5432
>>
> Frank, et al...
>
> I just wanted to give an update. I was able to successfully install
> Drupal with pgsql. The problem still stands though. I can make it
> work with apache not chrooted. I ran apache not chrooted and was able
> to install the DB, do the initial setup for Drupal, and create user#1.
>
> Now, as to the socket, postgresql puts the socket in /tmp. You cannot
> make a symbolic link from /tmp to /var/www/tmp. You receive a "cross
> link device" error. I did attempt to put the socket in
> /var/postgresql/data, and make the link to
> /var/www/var/postgresql/data. I rebooted the box (to enable the
> chrooting of apache). Everything starts, but Drupal is unable to
> connect to the database.
>
> I intend to continue to play around, but I'd rather not have to run
> apache in a way that it was not intended to run. I would like the
> extra security.
>
> Any help would be greatly appreciated...
>
> Bryan
>
Just as I hit send on this, I went back and looked at the error:
------------------------------------------------------
Unable to connect to database

If you still have to install Drupal, proceed to the installation page.

If you have already finished installing Drupal, this either means that
the username and password information in your settings.php file is
incorrect or that we can't connect to the PostgreSQL database server.
This could mean your hosting provider's database server is down.

The PostgreSQL error was: pg_connect() [<a
href='function.pg-connect'>function.pg-connect</a>]: Unable to connect
to PostgreSQL server: could not translate host name "localhost" to
address: non-recoverable failure in name resolution
--------------------------------------------------------

The last part is what made think. Name resolution??? It is unable to
lookup what "localhost" is? Maybe I should copy /etc/hosts to
/var/www. So I:

# mkdir -p /var/www/etc
# cp /etc/hosts /var/www/etc/

Went back, refreshed the screen, and all is good now. I believe this
has solved the problem. I will suggest to the port maintainer that
this step may need to be added to cut down on issues for us newbies...

Thanks for the suggestions...

Bryan

Browse pgsql-novice by date

  From Date Subject
Next Message Steve T 2008-08-26 07:57:41 Dump/Restore compatibility
Previous Message Bryan 2008-08-23 22:40:52 Re: Trouble installing Drupal 5 using sockets (a little long)