<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta content="text/html; charset=utf-8" http-equiv="Content-Type"></head><body>The key error message is<br/>bind: Address already in use (98)<br/>You can' set both accept and connect to the same port.<br/><br/>See if you can configure your jdbc app on the server to listen on loopback interfase, line 127.0.0.1:2404, then set accept=yourserveraddress:2406 and connect=127.0.0.1:2404<br/><br/><hr/><div><b>From: </b> daninho dj <daninho.dj@gmail.com>
</div><div><b>Date: </b>Thu, 9 Apr 2015 17:30:55 +0200</div><div><b>To: </b><cbrowne@cbcs-usa.com></div><div><b>Cc: </b><josealf@rocketmail.com>; <stunnel-users@stunnel.org></div><div><b>Subject: </b>Re: [stunnel-users] Session is active but I cannot connect</div><div><br/></div><div dir="ltr">It was typo sorry. The settings on the server are: <div><br></div><div><div>[test]</div><div>accept = 2406</div><div>connect = 2404</div></div><div><br></div><div>and on the client:</div><div><br></div><div><div>[jdbc]</div><div>client = yes</div><div>accept = <a href="http://127.0.0.1:2404">127.0.0.1:2404</a></div><div>connect = my_server_name:2406</div></div><div><br></div><div><br></div><div>I'm trying to start the service on the server and it's not working: </div><div><br></div><div><br></div><div><div>/etc/init.d/stunnel start</div><div>Starting stunnel (SSL tunnel) startproc: exit status of parent of /usr/sbin/stunnel: 1</div><div> please see /var/log/rc.stunnel.log for details failed</div></div><div><br></div><div><br></div><div>Regards,</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 9, 2015 at 5:04 PM, Carter Browne <span dir="ltr"><<a href="mailto:cbcs@comcast.net" target="_blank">cbcs@comcast.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
In your before setting, your client should have been to connect to
your test server:<span class=""><br>
<br>
[jdbc]<br>
client = yes<br>
accept = <a href="http://127.0.0.1:2404" target="_blank">127.0.0.1:2404</a><br></span>
connect=my_server_name:2404<br>
<br>
In your after setting, the accept and connect ports cannot be the
same port.<div><div class="h5"><br>
<br>
<br>
<br>
<div>On 4/9/2015 10:51 AM, daninho dj wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hi Jose,
<div><br>
</div>
<div>Thanks for mail. The problem is that when I change the
accept port on the server, stunnel doesn't start:</div>
<div><br>
</div>
<div><b>Before:</b></div>
<div><br>
</div>
<div><u>Server:</u></div>
<div><br>
</div>
<div>
<div>[test]</div>
<div>accept = 2404</div>
<div>connect = 2406</div>
</div>
<div><br>
</div>
<div><u>Client:</u></div>
<div><br>
</div>
<div>
<div>[jdbc]</div>
<div>client = yes</div>
<div>accept = <a href="http://127.0.0.1:2404" target="_blank">127.0.0.1:2404</a></div>
<div>connect = <i>my_server_name</i>:2406</div>
</div>
<div><br>
</div>
<div><b>After:</b></div>
<div><br>
</div>
<div>I edited the stunnel.conf on the server:</div>
<div><br>
</div>
<div>
<div>[test]</div>
<div>accept = 2406</div>
<div>connect = 2406</div>
</div>
<div><br>
</div>
<div>Then trying to start the service:</div>
<div><br>
</div>
<div>
<div><b>/etc/init.d/stunnel start</b></div>
<div><b>Starting stunnel (SSL tunnel) startproc: exit status
of parent of /usr/sbin/stunnel: 1</b></div>
<div><b> please see /var/log/rc.stunnel.log for details
<font color="#ff0000">failed</font></b></div>
</div>
<div><br>
</div>
<div>/var/log/rc.stunnel.log is empty but in the log specified
in the stunnel.conf I have the following:<br>
</div>
<div><br>
</div>
<div>
<div>tail -10 /var/log/stunnel/stunnel.log</div>
<div>2015.04.09 16:42:36 LOG5[22524:139805264570112]:
Threading:PTHREAD SSL:ENGINE Sockets:POLL,IPv6 Auth:LIBWRAP</div>
<div>2015.04.09 16:42:36 LOG6[22524:139805264570112]: file
ulimit = 262144 (can be changed with 'ulimit -n')</div>
<div>2015.04.09 16:42:36 LOG6[22524:139805264570112]: poll()
used - no FD_SETSIZE limit for file descriptors</div>
<div>2015.04.09 16:42:36 LOG5[22524:139805264570112]: 128000
clients allowed</div>
<div>2015.04.09 16:42:36 LOG7[22524:139805264570112]: FD 10 in
non-blocking mode</div>
<div>2015.04.09 16:42:36 LOG7[22524:139805264570112]: FD 11 in
non-blocking mode</div>
<div>2015.04.09 16:42:36 LOG7[22524:139805264570112]: FD 12 in
non-blocking mode</div>
<div>2015.04.09 16:42:36 LOG7[22524:139805264570112]:
SO_REUSEADDR option set on accept socket</div>
<div>2015.04.09 16:42:36 LOG3[22524:139805264570112]: Error
binding test to <a href="http://0.0.0.0:2406" target="_blank">0.0.0.0:2406</a></div>
<div>2015.04.09 16:42:36 LOG3[22524:139805264570112]: bind:
Address already in use (98)</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div>Same thing happens when I try to change the ports on the
client. Any idea how this problem can be solved? </div>
<div><br>
</div>
<div>Thanks and regards,</div>
<div>Daninho</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Thu, Apr 9, 2015 at 4:12 PM, <span dir="ltr"><<a href="mailto:josealf@rocketmail.com" target="_blank">josealf@rocketmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
The accept port on the server Config must be the same as the
connect port on the client config.<br>
The connect port on the server must be the port used by the
application/service you try to secure, usually bound to the
loopback interfase, as you probably don't want to allow
unsecure connections.<br>
On the client the accept port is the port your client
application will connect to.<br>
<br>
Hope this helps to clarify a bit.<br>
<br>
Regards<br>
<br>
-----Original Message-----<br>
From: daninho dj <<a href="mailto:daninho.dj@gmail.com" target="_blank">daninho.dj@gmail.com</a>><br>
Sender: "stunnel-users" <<a href="mailto:stunnel-users-bounces@stunnel.org" target="_blank">stunnel-users-bounces@stunnel.org</a>><br>
Date: Thu, 9 Apr 2015 14:28:25<br>
To: <<a href="mailto:stunnel-users@stunnel.org" target="_blank">stunnel-users@stunnel.org</a>><br>
Subject: [stunnel-users] Session is active but I cannot
connect<br>
<br>
_______________________________________________<br>
stunnel-users mailing list<br>
<a href="mailto:stunnel-users@stunnel.org" target="_blank">stunnel-users@stunnel.org</a><br>
<a href="https://www.stunnel.org/cgi-bin/mailman/listinfo/stunnel-users" target="_blank">https://www.stunnel.org/cgi-bin/mailman/listinfo/stunnel-users</a><br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div><a href="http://daninhodj.com" target="_blank">daninho</a></div>
</div>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
stunnel-users mailing list
<a href="mailto:stunnel-users@stunnel.org" target="_blank">stunnel-users@stunnel.org</a>
<a href="https://www.stunnel.org/cgi-bin/mailman/listinfo/stunnel-users" target="_blank">https://www.stunnel.org/cgi-bin/mailman/listinfo/stunnel-users</a>
</pre>
</blockquote>
<br>
</div></div><span class="HOEnZb"><font color="#888888"><pre cols="72">--
Carter Browne
<a href="mailto:cbrowne@cbcs-usa.com" target="_blank">cbrowne@cbcs-usa.com</a></pre>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><a href="http://daninhodj.com" target="_blank">daninho</a></div>
</div>
</body></html>