can't connect via jdbc
От | Jonathan Sand |
---|---|
Тема | can't connect via jdbc |
Дата | |
Msg-id | 199901162143.NAA28321@scruz.net обсуждение исходный текст |
Ответы |
Re: [INTERFACES] can't connect via jdbc
|
Список | pgsql-interfaces |
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.
В списке pgsql-interfaces по дате отправления: