From: Jonathan Sand <sand@gizmolab.com>
To: postgres jdbc <pgsql-interfaces@postgresql.org>
Subject: can't connect via jdbc
Date: Sat, 16 Jan 99 13:43:24 -0800
Message-ID: <199901162143.NAA28321@scruz.net> (raw)
If some kind soul could help straighten me out... :)
I recently installed Red Hat Linux 5.2, along with postgresql 6.3.2
(rpm). The postmaster is running, started from the
/etc/rc.d/init.d/postgresql script, which I changed so that the backend
runs in verbose mode, produces debugging output and redirects output to a
log file:
su postgres -c '/usr/bin/postmaster -d 9 -p 2002 -D/var/lib/pgsql >
/var/lib/pgsql/log/pg_log 2>&1 &'
After running this script, the log file contains startup output. I can
run the psql monitor and do normal SQL things on the redhat machine. What
I can't seem to do is connect to postgres from another machine. I've
written a java program which does a connect, using JDBC. This works fine
connecting to postgresql 6.3.2 running on a Slakware Linux machine. I
believe I've configured postgres to accept connections from my other
machine, adding the following line to pg_hba.conf:
host all 193.1.1.0 255.255.255.240 trust
The redhat machine is 193.1.1.2 and the other machine is 193.1.1.4. These
are local ip addresses, only valid on my side of an ISDN router.
I've added the java program's user name to pg_user, and granted that user
full access. I do a connect from the other machine; the log file shows no
output relating to this attempted connection. Thinking it might be a port
problem, I ran tcpdump. I'm not an expert in interpreting its output, but
the ethernet traffic looks like a valid request was made from the other
machine to the correct port and acknowledged by the redhat machine from
the correct port. I can telnet as the java user from the other machine to
the redhat machine and run psql, so my access is at least configured that
far.
Can anybody tell me what vital bits am I missing in my configuration?
Thank you,
Jonathan Sand
sand@gizmolab.com
Hardware: n. that aspect of a computer system which can be hit.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: sand@gizmolab.com
Subject: Re: can't connect via jdbc
In-Reply-To: <199901162143.NAA28321@scruz.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox