can't connect

Поиск
Список
Период
Сортировка
Искать

can't connect

От:
Jonathan Sand <sand@gizmolab.com>
Дата:
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. 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 it from another machine. I've 
written a java program which does a connect, using JDBC. This worked 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

I changed the default startup script so that it doesn't run in silent 
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 do a 
connect from the other machine; the log file is unchanged. 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 from the other machine to the 
redhat machine and run psql as the same user that the java program 
connects as, so my access is at least configured that far.

Can anybody tell me what vital bits am I missing in my configuration?

Jonathan Sand

sand@gizmolab.com

Hardware: n. that aspect of a computer system which can be hit.


FAQ