Remote Database Connect problem

We lost a hard drive yesterday without proper preparations for this in
place. It was a RT2 install and I’ve got all the data but having a hell
of a time getting the new install to work. I also decided to use a
database (PostgreSQL) on another system this time.
I can connect from another system so I know TCP connections are good
and I’ve made sure I have the right pg_hdb.conf entries (and restarted the
database :slight_smile: for the system running RT. Heck I’m pretty sure I made the
correct entires in the Makefile.

When I run make install this is the output.

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’
db.mycompany.com’ ‘5432’ ‘postgres’ ‘rt2’ create
Now creating a database for RT.
Enter the Pg password for postgres:
Creating Pg database rt2.
Use of uninitialized value in concatenation (.) or string at
/usr/lib/perl5/site_perl/5.6.1/i386-linux/DBI.pm line 584, line 1.
DBI connect(‘dbname=template1;host=db.mycompany.com;port=5432’,‘postgres’,…)
failed: at /usr/lib/perl5/site_perl/5.6.1/DBIx/DataSource/Driver.pm line
74
could not connect to server: Connection refused at
/usr/lib/perl5/site_perl/5.6.1/DBIx/DataSource/Driver.pm line 74,
line 1.
make: *** [createdb] Error 255

Increminating information has been changed to protect the guilty.

It has been a long and interesting process to re-install and I may have
buggered it by manually (perl -MCPAN -e shell;) installing some packages
that failed during a make fixdeps.

The wolves are nipping at my heals and I’ve thrown every excuse to them I
could.

Any ideas or guidance?

TIA,
Rod
“Open Source Software - Sometimes you get more than you paid for…”

Use of uninitialized value in concatenation (.) or string at
/usr/lib/perl5/site_perl/5.6.1/i386-linux/DBI.pm line 584,
line 1.
DBI
connect(‘dbname=template1;host=db.mycompany.com;
port=5432’,‘postgres’,…)
failed: at /usr/lib/perl5/site_perl/5.6.1/DBIx/DataSource/Driver.pm
line
74
could not connect to server: Connection refused at
/usr/lib/perl5/site_perl/5.6.1/DBIx/DataSource/Driver.pm line 74,

line 1.
make: *** [createdb] Error 255

I don’t know much about postgres, but this seems the postgres server
does not want You to connect from that server with that
username/password combination. Have You checked

  • If postgresql is correctly configured to accept tcp connections from
    another machine?

  • If You can connect using the command line interface with the username
    and password You intend to use?

  • If the RT configuration file is clean, i.e. no blanks, tabs or other
    unprintable characters after the username or password in the Makefile?

That’s it for now.

Regards,
Harald

Short reply is I got it working!

I don’t know much about postgres, but this seems the postgres server
does not want You to connect from that server with that
username/password combination. Have You checked

Yup! I’ve seen far to many of this mistake (and once or twice made it).

The longer answer is three-fold. There was an IP assigned twice, an ARP
table entry that didn’t go away after fixing the IP problem, and the
requirement to have psql installed on the RT system.

  • If postgresql is correctly configured to accept tcp connections from
    another machine?

  • If You can connect using the command line interface with the username
    and password You intend to use?

  • If the RT configuration file is clean, i.e. no blanks, tabs or other
    unprintable characters after the username or password in the Makefile?

Thanks for the response.

Rod
“Open Source Software - Sometimes you get more than you paid for…”