[prev in list] [next in list] [prev in thread] [next in thread] 

List:       stunnel-users
Subject:    Failed to initialize remote connection: connection reset by peer
From:       "Bee Sien Ooi" <bsien () lycos ! com>
Date:       2004-04-09 13:56:40
Message-ID: LALOLECBLMODABAA () mailcity ! com
[Download RAW message or body]

Hi all,

I'm trying to run stunnel (version 4.05) to secure the communication between client \
and server (both Windows machines) of MySQL. The MySQL server is listening to port \
3306, and I would like to secure MySQL through port 3307. I'm confusing in the \
following matters:

1. Do I need "stunnel.conf" file in both client and server of stunnel?
Currently the file exists in both machines. I assume MySQL server as stunnel's \
client, while assuming MySQL client as stunnel's server. And here is how I configure \
the "stunnel.conf" in both machines:

a) At MySQL server (stunnel client, named as CLIENT here forward):

   client = yes

   [mysqls]
   accept = CLIENT:3306
   connect = X.X.X.X:3307 
#where X.X.X.X is IP address of stunnel server 
#(or MySQL client)

b) At MySQL client (stunnel server, named as SERVER here forward):

   [mysqls]
   accept = SERVER:3307
   connect = Y.Y.Y.Y:3306 
#where Y.Y.Y.Y is IP address of stunnel client 
#(or MySQL server)

2. When I'm trying to test data source between the two machines, here are what I get:

a) At MySQL server (stunnel client, named as CLIENT here forward):

LOG5[471807:16315555]: mysqls connected from X.X.X.X:3267
LOG5[471807:16315087]: mysqls connected from X.X.X.X:3268
LOG5[471807:16314651]: mysqls connected from X.X.X.X:3269
LOG5[471807:16318247]: mysqls connected from X.X.X.X:3270
LOG5[471807:16317907]: mysqls connected from X.X.X.X:3271
LOG5[471807:399735]: mysqls connected from X.X.X.X:3272
LOG5[471807:395139]: mysqls connected from X.X.X.X:3273
LOG5[471807:393743]: mysqls connected from X.X.X.X:3274
LOG5[471807:393435]: mysqls connected from X.X.X.X:3275
LOG5[471807:397159]: mysqls connected from X.X.X.X:3276
LOG5[471807:395827]: mysqls connected from X.X.X.X:3277
LOG5[471807:395487]: mysqls connected from X.X.X.X:3278
LOG3[471807:395487]: remote connect #1 (X.X.X.X:3307): No buffer space available \
(WSAENOBUFS) (10055) LOG3[471807:395487]: Failed to initialize remote connection
LOG3[471807:395827]: SSL_read (ERROR_SYSCALL): Connection reset by peer \
(WSAECONNRESET) (10054) LOG5[471807:395827]: Connection reset: 0 bytes sent to SSL, 0 \
bytes sent to socket LOG3[471807:397159]: SSL_read (ERROR_SYSCALL): Connection reset \
by peer (WSAECONNRESET) (10054) LOG5[471807:397159]: Connection reset: 0 bytes sent \
to SSL, 0 bytes sent to socket LOG3[471807:393435]: SSL_read (ERROR_SYSCALL): \
Connection reset by peer (WSAECONNRESET) (10054) LOG5[471807:393435]: Connection \
reset: 0 bytes sent to SSL, 0 bytes sent to socket LOG3[471807:393743]: SSL_read \
(ERROR_SYSCALL): Connection reset by peer (WSAECONNRESET) (10054) \
LOG5[471807:393743]: Connection reset: 0 bytes sent to SSL, 0 bytes sent to socket \
LOG3[471807:395139]: SSL_read (ERROR_SYSCALL): Connection reset by peer \
(WSAECONNRESET) (10054) LOG5[471807:395139]: Connection reset: 0 bytes sent to SSL, 0 \
bytes sent to socket LOG3[471807:399735]: SSL_read (ERROR_SYSCALL): Connection reset \
by peer (WSAECONNRESET) (10054) LOG5[471807:399735]: Connection reset: 0 bytes sent \
to SSL, 0 bytes sent to socket LOG3[471807:16317907]: SSL_read (ERROR_SYSCALL): \
Connection reset by peer (WSAECONNRESET) (10054) LOG5[471807:16317907]: Connection \
reset: 0 bytes sent to SSL, 0 bytes sent to socket LOG3[471807:16318247]: SSL_read \
(ERROR_SYSCALL): Connection reset by peer (WSAECONNRESET) (10054) \
LOG5[471807:16318247]: Connection reset: 0 bytes sent to SSL, 0 bytes sent to socket \
LOG3[471807:16314651]: SSL_read (ERROR_SYSCALL): Connection reset by peer \
(WSAECONNRESET) (10054) LOG5[471807:16314651]: Connection reset: 0 bytes sent to SSL, \
0 bytes sent to socket LOG3[471807:16315087]: SSL_read (ERROR_SYSCALL): Connection \
reset by peer (WSAECONNRESET) (10054) LOG5[471807:16315087]: Connection reset: 0 \
bytes sent to SSL, 0 bytes sent to socket LOG3[471807:16315555]: SSL_read \
(ERROR_SYSCALL): Connection reset by peer (WSAECONNRESET) (10054) \
LOG5[471807:16315555]: Connection reset: 0 bytes sent to SSL, 0 bytes sent to socket

b) At MySQL client (stunnel server):

LOG5[2040:1308]: mysqls connected from Y.Y.Y.Y:1416
LOG5[2040:2032]: mysqls connected from Y.Y.Y.Y:1417
LOG5[2040:1036]: mysqls connected from Y.Y.Y.Y:1418
LOG5[2040:1532]: mysqls connected from Y.Y.Y.Y:1419
LOG5[2040:1768]: mysqls connected from Y.Y.Y.Y:1420
LOG5[2040:1760]: mysqls connected from Y.Y.Y.Y:1421
LOG5[2040:1472]: mysqls connected from Y.Y.Y.Y:1422
LOG5[2040:168]: mysqls connected from Y.Y.Y.Y:1423
LOG5[2040:1456]: mysqls connected from Y.Y.Y.Y:1424
LOG5[2040:1116]: mysqls connected from Y.Y.Y.Y:1425
LOG5[2040:536]: mysqls connected from Y.Y.Y.Y:1426
LOG5[2040:1236]: mysqls connected from Y.Y.Y.Y:1427
LOG3[2040:1236]: readsocket: Connection reset by peer (WSAECONNRESET) (10054)
LOG5[2040:1236]: Connection reset: 0 bytes sent to SSL, 0 bytes sent to socket
LOG3[2040:536]: readsocket: Connection reset by peer (WSAECONNRESET) (10054)
LOG5[2040:536]: Connection reset: 0 bytes sent to SSL, 0 bytes sent to socket
LOG3[2040:1116]: readsocket: Connection reset by peer (WSAECONNRESET) (10054)
LOG5[2040:1116]: Connection reset: 0 bytes sent to SSL, 0 bytes sent to socket
LOG3[2040:1456]: readsocket: Connection reset by peer (WSAECONNRESET) (10054)
LOG5[2040:1456]: Connection reset: 0 bytes sent to SSL, 0 bytes sent to socket
LOG3[2040:168]: readsocket: Connection reset by peer (WSAECONNRESET) (10054)
LOG5[2040:168]: Connection reset: 0 bytes sent to SSL, 0 bytes sent to socket
LOG3[2040:1472]: readsocket: Connection reset by peer (WSAECONNRESET) (10054)
LOG5[2040:1472]: Connection reset: 0 bytes sent to SSL, 0 bytes sent to socket
LOG3[2040:1760]: readsocket: Connection reset by peer (WSAECONNRESET) (10054)
LOG5[2040:1760]: Connection reset: 0 bytes sent to SSL, 0 bytes sent to socket
LOG3[2040:1768]: readsocket: Connection reset by peer (WSAECONNRESET) (10054)
LOG5[2040:1768]: Connection reset: 0 bytes sent to SSL, 0 bytes sent to socket
LOG3[2040:1532]: readsocket: Connection reset by peer (WSAECONNRESET) (10054)
LOG5[2040:1532]: Connection reset: 0 bytes sent to SSL, 0 bytes sent to socket
LOG3[2040:1036]: readsocket: Connection reset by peer (WSAECONNRESET) (10054)
LOG5[2040:1036]: Connection reset: 0 bytes sent to SSL, 0 bytes sent to socket
LOG3[2040:2032]: readsocket: Connection reset by peer (WSAECONNRESET) (10054)
LOG5[2040:2032]: Connection reset: 0 bytes sent to SSL, 0 bytes sent to socket
LOG3[2040:1308]: readsocket: Connection reset by peer (WSAECONNRESET) (10054)
LOG5[2040:1308]: Connection reset: 0 bytes sent to SSL, 0 bytes sent to socket

I just don't understand why was these happened. After all those logs, I get this \
message prompted: "Lost connection to MySQL server during query."

Furthermore, the Stunnel icon shown in the systray of both machines keep showing "0 \
session(s) active".

Can anyone please tell me what's wrong here? How to let stunnel run properly? How \
should I configure stunnel instead?

Thanks a lot! =)

Regards,
Bee Sien



____________________________________________________________
Find what you are looking for with the Lycos Yellow Pages
http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/default.asp?SRC=lycos10



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic