Rt206 make install fails to connect to Pg

Hello,

I fail when trying to open a connection to Postgres database during ‘make install’.

tools/initdb fails; it looks like the variables it’s getting are correct, I just can’t tell how to further debug it.

My problem is somewhat similar to what was described in this post,
http://lists.fsck.com/pipermail/rt-users/2001-June/002570.html
but I did not see this thread conclude with a resolution!

I have tried both specifying the password for user postgres in rt’s Makefile, and leaving it blank to no avail, while changing it at the OS level to match each case.

My Postgres install seems fine, that is, I can do other operations as user postgres with no problem, such as creating a test database. Postgres is running and the socket is up.

Maybe set up TCP/IP connect? Could it be my DBIx version is broken?

Output of ‘make install’

make install

mkdir -p /opt/rt2/bin
mkdir -p /opt/rt2/WebRT/data
mkdir -p /opt/rt2/WebRT/sessiondata
mkdir -p /opt/rt2/etc
mkdir -p /opt/rt2/lib
mkdir -p /opt/rt2/WebRT/html
mkdir -p /opt/rt2/local/WebRT/html
/usr/bin/perl tools/initdb ‘Pg’ ‘/usr/local/pgsql’ ‘localhost’ ‘’ ‘postgres’ ‘rt2’ create
Now creating a database for RT.
Enter the Pg password for postgres:
Creating Pg database rt2.
DBI->connect(dbname=template1;host=localhost) failed: PQconnectPoll() – connect() failed: Connection refused at /usr/lib/perl5/site_perl/5.6.0/DBIx/DataSource/Driver.pm line 74
PQconnectPoll() – connect() failed: Connection refused at /usr/lib/perl5/site_perl/5.6.0/DBIx/DataSource/Driver.pm line 74, line 1.
make: *** [createdb] Error 255

Do I have a bad version of DBIx? Did I miss something in the docs?
I really would appreciate any of your comments as I am dying to get this up and running.
My version info is below – and thanks very much,

-Harold

RT and System Version information
perl -MDBD::Pg -e ‘print $DBD::Pg::VERSION’
1.01

perl -MDBD::mysql -e ‘print $DBD::mysql::VERSION’
2.0415

RT v2.0.6
postgresql-7.1.3
perl 5.6.0
(SuSE) Linux andalus 2.2.18 #1 Wed Jan 24 12:28:55 GMT 2001 i686 unknown

My SMTP server, postfix, runs locally and works just fine, though I haven’t gotten as far as using with RT.

And the other pieces look good – I just got them from CPAN yesterday:

andalus:/home/hsinclai/test/rt-2-0-6 # make testdeps
/usr/bin/perl ./tools/testdeps -warn Pg
Checking for DBI 1.18 …found
Checking for DBIx::DataSource 0.02 …found
Checking for DBIx::SearchBuilder 0.40 …found
Checking for HTML::Entities…found
Checking for MLDBM…found
Checking for Net::Domain…found
Checking for Net::SMTP…found
Checking for Params::Validate 0.02 …found
Checking for HTML::Mason 0.896 …found
Checking for CGI::Cookie 1.20 …found
Checking for Apache::Cookie…found
Checking for Apache::Session 1.53 …found
Checking for Date::Parse…found
Checking for Date::Format…found
Checking for MIME::Entity 5.108 …found
Checking for Mail::Mailer 1.20 …found
Checking for Getopt::Long 2.24 …found
Checking for Tie::IxHash…found
Checking for Text::Wrapper…found
Checking for Text::Template…found
Checking for File::Spec 0.8 …found
Checking for Errno…found
Checking for FreezeThaw…found
Checking for File::Temp…found
Checking for Log::Dispatch 1.6 …found
Checking for DBD::Pg …found

END

“HS” == Harold Sinclair hsinclai@andalus.speakeasy.net writes:

HS> Creating Pg database rt2.
DBI-> connect(dbname=template1;host=localhost) failed: PQconnectPoll() – connect() failed: Connection refused at /usr/lib/perl5/site_perl/5.6.0/DBIx/DataSource/Driver.pm line 74
HS> PQconnectPoll() – connect() failed: Connection refused at /usr/lib/perl5/site_perl/5.6.0/DBIx/DataSource/Driver.pm line 74, line 1.

What does your Pg error log say after you run this?

Vivek Khera, Ph.D. Khera Communications, Inc.
Internet: khera@kciLink.com Rockville, MD +1-240-453-8497
AIM: vivekkhera Y!: vivek_khera http://www.khera.org/~vivek/

“HS” == Harold Sinclair hsinclai@andalus.speakeasy.net writes:
HS> Creating Pg database rt2. DBI-> connect(dbname=template1;host=localhost) failed: PQconnectPoll() – connect() failed: Connection refused at /usr/lib/perl5/site_perl/5.6.0/DBIx/DataSource/Driver.pm line 74
HS> PQconnectPoll() – connect() failed: Connection refused at /usr/lib/perl5/site_perl/5.6.0/DBIx/DataSource/Driver.pm line 74, line 1.

What does your Pg error log say after you run this?

Unfortunately, nothing. It’s empty leading me to believe that I am not even touching Pg with the DBI connect. Pg is local (Unix domain sockets) and not TCP/IP. Could this have something to do with hostname resolution?
I have duplicated the error exactly on 2 separate Linux test systems. One is “properly” in DNS, and the other is not in DNS so the hostname returned varies depending on the asking mechanism. I don’t think it’s a DNS problem but I can’t fully rule it out. Again, thanks for your further help.

PS- I tried changing the initdb code so that ‘host=’ is not included in the connect string, to no avail.

I seem to recall that DBD::Pg doesn’t work with Unix Domain sockets and that you must use TCP. But I could be out of date or just plain wrong.
(Note that I’d be happy to be proven wrong :wink:
-jOn Wed, Sep 12, 2001 at 08:44:28PM +0000, hsinclai@speakeasy.net wrote:

On Wed, 12 Sep 2001 16:16:41 -0400, Vivek Khera khera@kcilink.com wrote:

“HS” == Harold Sinclair hsinclai@andalus.speakeasy.net writes:
HS> Creating Pg database rt2. DBI-> connect(dbname=template1;host=localhost) failed: PQconnectPoll() – connect() failed: Connection refused at /usr/lib/perl5/site_perl/5.6.0/DBIx/DataSource/Driver.pm line 74
HS> PQconnectPoll() – connect() failed: Connection refused at /usr/lib/perl5/site_perl/5.6.0/DBIx/DataSource/Driver.pm line 74, line 1.

What does your Pg error log say after you run this?

Unfortunately, nothing. It’s empty leading me to believe that I am not even touching Pg with the DBI connect. Pg is local (Unix domain sockets) and not TCP/IP. Could this have something to do with hostname resolution?
I have duplicated the error exactly on 2 separate Linux test systems. One is “properly” in DNS, and the other is not in DNS so the hostname returned varies depending on the asking mechanism. I don’t think it’s a DNS problem but I can’t fully rule it out. Again, thanks for your further help.

PS- I tried changing the initdb code so that ‘host=’ is not included in the connect string, to no avail.


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

http://www.bestpractical.com/products/rt – Trouble Ticketing. Free.

“JV” == Jesse Vincent jesse@bestpractical.com writes:

JV> I seem to recall that DBD::Pg doesn’t work with Unix Domain sockets and that you must use TCP. But I could be out of date or just plain wrong.
JV> (Note that I’d be happy to be proven wrong :wink:

You’d be just plain wrong :wink:

“JV” == Jesse Vincent jesse@bestpractical.com writes:

JV> I seem to recall that DBD::Pg doesn’t work with Unix Domain sockets and that you must use TCP. But I could be out of date or just plain wrong.
JV> (Note that I’d be happy to be proven wrong :wink:

You’d be just plain wrong :wink:

Either way, as of 2.0.5 it looked to me like RT needed a little help to be
configured for domain sockets. I didn’t feel like messing with the code
before I even completed a successful installation, so I used TCP on the
loopback interface.

Brandin Claar
Network Analyst
Penn State Applied Research Lab

Either way, as of 2.0.5 it looked to me like RT needed a little help to be
configured for domain sockets. I didn’t feel like messing with the code
before I even completed a successful installation, so I used TCP on the
loopback interface.

Thanks, TCP/IP worked fine after your suggestion. It would still be nice to easily do the domain sockets connection but… whatever.

How many out there have an installation large enough that the database server is a separate machine?

-Harold