Обсуждение: Problem with SSL: "could not accept SSL connection: EOF detected"
I have an ubuntu intrepid server running postgres 8.3.6. The server is able to accept connections via SSL. We have another host that is unable to connect via ssl for some reason. Trying to connect results in psql: and quitting. The server log says "could not accept SSL connection: EOF detected" I'm pretty sure it's a client ssl issue, because the server accepts ssl connections from other hosts, and the problem host is able to connect when the server doesn't require ssl. I have no clue how to solve this issue though, and would really appreciate some help. Please let me know if you need any more info. Pat
Pat Maddox <pat.maddox@gmail.com> writes: > I have an ubuntu intrepid server running postgres 8.3.6. The server > is able to accept connections via SSL. > We have another host that is unable to connect via ssl for some > reason. Trying to connect results in > psql: > and quitting. The server log says > "could not accept SSL connection: EOF detected" > I'm pretty sure it's a client ssl issue, because the server accepts > ssl connections from other hosts, and the problem host is able to > connect when the server doesn't require ssl. Odd. Try strace'ing the failing psql session, and send us the last few dozen lines of the output. regards, tom lane
On Thu, Mar 5, 2009 at 10:34 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > Pat Maddox <pat.maddox@gmail.com> writes: >> I have an ubuntu intrepid server running postgres 8.3.6. The server >> is able to accept connections via SSL. > >> We have another host that is unable to connect via ssl for some >> reason. Trying to connect results in >> psql: >> and quitting. The server log says >> "could not accept SSL connection: EOF detected" > >> I'm pretty sure it's a client ssl issue, because the server accepts >> ssl connections from other hosts, and the problem host is able to >> connect when the server doesn't require ssl. > > Odd. Try strace'ing the failing psql session, and send us the last few > dozen lines of the output. http://pastie.org/private/y7cbpuamemxawmhh8hdna is the strace output Pat
Pat Maddox <pat.maddox@gmail.com> writes: > On Thu, Mar 5, 2009 at 10:34 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote: >> Odd. �Try strace'ing the failing psql session, and send us the last few >> dozen lines of the output. > http://pastie.org/private/y7cbpuamemxawmhh8hdna is the strace output So the relevant info is sendto(3, "\0\0\0*\0\3\0\0user\0enc\0database\0yachti"..., 42, 0, NULL, 0) = 42 rt_sigaction(SIGPIPE, {SIG_DFL}, {SIG_IGN}, 8) = 0 poll([{fd=3, events=POLLIN|POLLERR, revents=POLLIN}], 1, -1) = 1 recvfrom(3, "E\0\0\0\225SFATAL\0C28000\0Mno pg_hba.co"..., 16384, 0, NULL, NULL) = 150 write(2, "psql: ", 6psql: ) = 6 close(3) = 0 exit_group(2) = ? Which looks to me like the server is correctly returning a rejection (I assume there's a "no pg_hba.conf entry..." error showing up in the server log too?) and then libpq is somehow falling down at converting that to a displayable message --- psql seems to be getting told correctly that the connection failed, but it's getting an empty string instead of the desired error message. In short, you've got a broken libpq (or possibly a broken psql executable) on that machine. I'd try reinstalling the postgres stuff before spending additional time on it. If it still fails then it would be time to inquire into configuration options and so forth used to build the postgres code for that machine. regards, tom lane