Feature #439

current netdot svn doesn't work with Pg db

Added by begemot - about 7 years ago. Updated over 6 years ago.

Status:Closed Start date:
Priority:Normal Due date:
Assignee:Carlos Vicente % Done:


Target version:0.8


I can login in webinterface, but if any other pages dont' work with:

error: DBI connect('database=netdot;host=localhost;port=','netdot_user',...) failed: could not connect to server: Connection refused
Is the server running on host "localhost" and accepting
TCP/IP connections on port user='netdot_user'? at /usr/share/perl5/Ima/DBI.pm line 328
40: return $ if $;
41: goto &shortmess_real;
42: }
44: sub croak { die shortmess @_ }
45: sub confess { die longmess @_ }
46: sub carp { warn shortmess @_ }
47: sub cluck { warn longmess @_ }
code stack: /usr/share/perl/5.10/Carp.pm:44

tshark -i lo shows connection attempt to port 0
If I change port=_ to port='5432' - webinterface work


#1 Updated by Carlos Vicente over 6 years ago

  • Status changed from New to Closed
  • Resolution set to worksforme

This actually depends on Postgres' configuration. If DB_PORT is not set, Perl DBI will probably try a Unix socket connection, which might or might not work with the default postgres settings.

Specifying port 5432 will force a TCP connection. The details about Postgres' client authentication are in the file pg_hba.conf. See http://www.postgresql.org/docs/8.3/interactive/client-authentication.html for a detailed explanation.

Also available in: Atom PDF