<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Did you do a netstat -np to see if there is another program
    listening on port 2406?<br>
    <br>
    <div class="moz-cite-prefix">On 4/9/2015 11:30 AM, daninho dj wrote:<br>
    </div>
    <blockquote
cite="mid:CAFZpXbCrW+Ceabccg=gS+GMFQhL6H3-suv2+ZtLOCe+5QnVv2g@mail.gmail.com"
      type="cite">
      <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 moz-do-not-send="true"
              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 moz-do-not-send="true"
              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 moz-do-not-send="true"
                  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 moz-do-not-send="true"
                            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 moz-do-not-send="true"
                            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
                            moz-do-not-send="true"
                            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 moz-do-not-send="true"
                            href="mailto:daninho.dj@gmail.com"
                            target="_blank">daninho.dj@gmail.com</a>><br>
                          Sender: "stunnel-users" <<a
                            moz-do-not-send="true"
                            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 moz-do-not-send="true"
                            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 moz-do-not-send="true"
                            href="mailto:stunnel-users@stunnel.org"
                            target="_blank">stunnel-users@stunnel.org</a><br>
                          <a moz-do-not-send="true"
                            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 moz-do-not-send="true"
                          href="http://daninhodj.com" target="_blank">daninho</a></div>
                    </div>
                    <br>
                    <fieldset></fieldset>
                    <br>
                    <pre>_______________________________________________
stunnel-users mailing list
<a moz-do-not-send="true" href="mailto:stunnel-users@stunnel.org" target="_blank">stunnel-users@stunnel.org</a>
<a moz-do-not-send="true" 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 moz-do-not-send="true" 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 moz-do-not-send="true"
            href="http://daninhodj.com" target="_blank">daninho</a></div>
      </div>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Carter Browne
<a class="moz-txt-link-abbreviated" href="mailto:cbrowne@cbcs-usa.com">cbrowne@cbcs-usa.com</a></pre>
  </body>
</html>