[stunnel-users] Connection reset by peer (104)

RAJADURAI D rajadurai.d at gmail.com
Fri Apr 15 06:49:56 CEST 2005


hi

I am trying to connect using mysql and also telnet , there are no fw
between the 2 boxes. I tested with stunnel latest version 4.08 in red
hat 9,it shows the last message as connection refused (111) after the
cipher negotiation


it shows an message in the client side when connecting telnet,     
==> SSL_read: Connection reset by peer (104)

==>Connection reset: 27 bytes sent to SSL , 0 bytes sent to socket 



  what it means any thing i have to add in the configuration file .

   Any ideas on how to solve this error plz help me, to
short out this problem ?

i am using ==>
Stunnel 4.08
redhat 9
Kernel 2.4.20-8
mysql  Ver 11.18 Distrib 3.23.54,for redhat-linux-gnu(i386)
I am using stunnel.pem generated while installing stunnel 4.08

SERVER SIDE

[root at scorpion src]# ./stunnel

2005.03.30 12:23:19 : stunnel  with OpenSSL 0.9.7a Feb 19 2003

2005.03.30 12:23:19 : Certificate: /usr/local/etc/stunnel/stunnel.pem

2005.03.30 12:23:19 : Key file: /usr/local/etc/stunnel/stunnel.pem

2005.03.30 12:23:19 : 500 clients allowed

2005.03.30 12:23:19 : SO_REUSEADDR option set on accept socket

2005.03.30 12:23:19 : mysqls bound to 0.0.0.0:3307

2005.03.30 12:23:19 : Created pid file /stunnel.pid
2005.03.30 12:27:01 : mysqls accepted FD=7 from 192.168.2.175:33091

2005.03.30 12:27:01 : mysqls started

2005.03.30 12:27:01 : mysqls connected from 192.168.2.175:33091

2005.03.30 12:27:01 : SSL state (accept): before/accept initialization

2005.03.30 12:27:01 : SSL state (accept): SSLv3 read client hello A

2005.03.30 12:27:01 : SSL state (accept): SSLv3 write server hello A

2005.03.30 12:27:01 : SSL state (accept): SSLv3 write certificate A

2005.03.30 12:27:01 : SSL state (accept): SSLv3 write server done A

2005.03.30 12:27:01 : SSL state (accept): SSLv3 flush data

2005.03.30 12:27:01 : SSL state (accept): SSLv3 read client key exchange A

2005.03.30 12:27:01 : SSL state (accept): SSLv3 read finished A

2005.03.30 12:27:01 : SSL state (accept): SSLv3 write change cipher spec A

2005.03.30 12:27:01 : SSL state (accept): SSLv3 write finished A

2005.03.30 12:27:01 : SSL state (accept): SSLv3 flush data

2005.03.30 12:27:01 :    1 items in the session cache

2005.03.30 12:27:01 :    0 client connects (SSL_connect())

2005.03.30 12:27:01 :    0 client connects that finished

2005.03.30 12:27:01 :    0 client renegotiatations requested

2005.03.30 12:27:01 :    1 server connects (SSL_accept())

2005.03.30 12:27:01 :    1 server connects that finished

2005.03.30 12:27:01 :    0 server renegotiatiations requested

2005.03.30 12:27:01 :    0 session cache hits

2005.03.30 12:27:01 :    0 session cache misses

2005.03.30 12:27:01 :    0 session cache timeouts

2005.03.30 12:27:01 : SSL accepted: new session negotiated

2005.03.30 12:27:01 : Negotiated ciphers: AES256-SHA              SSLv3 Kx=RSA

  Au=RSA  Enc=AES(256)  Mac=SHA1

2005.03.30 12:27:01 : mysqls connecting 127.0.0.1:3306

2005.03.30 12:27:01 : connect_wait: waiting 10 seconds

2005.03.30 12:27:01 : connect_wait: getsockopt: Connection refused (111)

2005.03.30 12:27:01 : Failed to initialize remote connection

2005.03.30 12:27:01 : mysqls finished (0 left)

======================================================

CLIENT SIDE

[root at redhat src]# ./stunnel

2005.03.30 23:24:42 LOG5[7383:1075999904]: stunnel 4.08 on i686-pc-linux-gnu PTH

READ+POLL+IPv4+LIBWRAP with OpenSSL 0.9.7a Feb 19 2003

2005.03.30 23:24:42 LOG7[7383:1075999904]: RAND_status claims sufficient entropy

for the PRNG

2005.03.30 23:24:42 LOG6[7383:1075999904]: PRNG seeded successfully

2005.03.30 23:24:42 LOG7[7383:1075999904]: Certificate: /usr/local/etc/stunnel/s

tunnel.pem

2005.03.30 23:24:42 LOG7[7383:1075999904]: Key file: /usr/local/etc/stunnel/stun

nel.pem

2005.03.30 23:24:42 LOG6[7383:1075999904]: file ulimit = 1024 (can be changed wi

th 'ulimit -n')

2005.03.30 23:24:42 LOG6[7383:1075999904]: poll() used - no FD_SETSIZE limit for

file descriptors

2005.03.30 23:24:42 LOG5[7383:1075999904]: 500 clients allowed

2005.03.30 23:24:42 LOG7[7383:1075999904]: FD 4 in non-blocking mode

2005.03.30 23:24:42 LOG7[7383:1075999904]: FD 5 in non-blocking mode

2005.03.30 23:24:42 LOG7[7383:1075999904]: FD 6 in non-blocking mode

2005.03.30 23:24:42 LOG7[7383:1075999904]: SO_REUSEADDR option set on accept soc

ket

2005.03.30 23:24:42 LOG7[7383:1075999904]: mysqls bound to 0.0.0.0:3306

2005.03.30 23:24:42 LOG7[7383:1075999904]: Created pid file /stunnel.pid

2005.03.30 23:32:19 LOG7[7383:1075999904]: mysqls accepted FD=7 from
127.0.0.1:3

3090

2005.03.30 23:32:19 LOG7[7383:1075999904]: FD 7 in non-blocking mode

2005.03.30 23:32:19 LOG7[7383:1076067520]: mysqls started

2005.03.30 23:32:20 LOG5[7383:1076067520]: mysqls connected from 127.0.0.1:33090

2005.03.30 23:32:20 LOG7[7383:1076067520]: FD 8 in non-blocking mode

2005.03.30 23:32:20 LOG7[7383:1076067520]: mysqls connecting 192.168.2.210:3307

2005.03.30 23:32:20 LOG7[7383:1076067520]: connect_wait: waiting 10 seconds

2005.03.30 23:32:20 LOG7[7383:1076067520]: connect_wait: connected

2005.03.30 23:32:20 LOG7[7383:1076067520]: Remote FD=8 initialized

2005.03.30 23:32:20 LOG7[7383:1076067520]: SSL state (connect):
before/connect initialization

2005.03.30 23:32:20 LOG7[7383:1076067520]: SSL state (connect): SSLv3
write client hello A

2005.03.30 23:32:20 LOG7[7383:1076067520]: SSL state (connect): SSLv3
read server hello A

2005.03.30 23:32:20 LOG7[7383:1076067520]: SSL state (connect): SSLv3
read server certificate A

2005.03.30 23:32:20 LOG7[7383:1076067520]: SSL state (connect): SSLv3
read server done A

2005.03.30 23:32:20 LOG7[7383:1076067520]: SSL state (connect): SSLv3
write client key exchange A

2005.03.30 23:32:20 LOG7[7383:1076067520]: SSL state (connect): SSLv3
write change cipher spec A

2005.03.30 23:32:20 LOG7[7383:1076067520]: SSL state (connect): SSLv3
write finished A

2005.03.30 23:32:20 LOG7[7383:1076067520]: SSL state (connect): SSLv3 flush data

2005.03.30 23:32:20 LOG7[7383:1076067520]: SSL state (connect): SSLv3
read finished A

2005.03.30 23:32:20 LOG7[7383:1076067520]:    1 items in the session cache

2005.03.30 23:32:20 LOG7[7383:1076067520]:    1 client connects (SSL_connect())

2005.03.30 23:32:20 LOG7[7383:1076067520]:    1 client connects that finished

2005.03.30 23:32:20 LOG7[7383:1076067520]:    0 client renegotiatations requeste

d

2005.03.30 23:32:20 LOG7[7383:1076067520]:    0 server connects (SSL_accept())

2005.03.30 23:32:20 LOG7[7383:1076067520]:    0 server connects that finished

2005.03.30 23:32:20 LOG7[7383:1076067520]:    0 server renegotiatiations request

ed

2005.03.30 23:32:20 LOG7[7383:1076067520]:    0 session cache hits

2005.03.30 23:32:20 LOG7[7383:1076067520]:    0 session cache misses

2005.03.30 23:32:20 LOG7[7383:1076067520]:    0 session cache timeouts

2005.03.30 23:32:20 LOG6[7383:1076067520]: SSL connected: new session negotiated

2005.03.30 23:32:20 LOG6[7383:1076067520]: Negotiated ciphers: AES256-SHA

     SSLv3 Kx=RSA      Au=RSA  Enc=AES(256)  Mac=SHA1

2005.03.30 23:32:20 LOG3[7383:1076067520]: SSL_read: Connection reset by peer (1

04)

2005.03.30 23:32:20 LOG5[7383:1076067520]: Connection reset: 0 bytes sent to SSL

, 0 bytes sent to socket

2005.03.30 23:32:20 LOG7[7383:1076067520]: mysqls finished (0 left)

RUNNING mysqL IN AN SEPARATE TERMINAL

[root at redhat bharathi]# mysql -h 127.0.0.1 -u anirudh -p

Enter password:

ERROR 2013: Lost connection to MySQL server during query



i will be very thankful if u help me.


-- 
-rajadurai.d



More information about the stunnel-users mailing list