You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by avi39844 <av...@gmail.com> on 2015/04/26 11:18:59 UTC

CXF 2.7.11 | SSL server | Socket timeout

Hi, 
I have a cxf server which worked fine till I changed it to be over SSL. 
Since the change, I'm having random timeouts - the server get the data
(according to Java & jetty debugs) and doe's nothing so the client closes
the connection after timeout has passed. 

It happens after several request in a row, every time on a different
request. 

To me it seems to be performance related since when I give the machine (VM)
more CPUs the problem disappeared, but it doesn't make scene, since I've
tested the CPU usage and also it has some 100% spikes but never more then 30
*ms *while the client timeout is 30 *seconds*.
 
Does anyone have a clue why this is happening? How it related to SSL? 
I did some changes for mainly to allow null ciphers (my code is below) so
maybe the problem is there.
Any help will be much appreciated.
 
Thanks,


=================================================
My code:

1. myContextFactory is extending sslContextFactory and there I configure the
tlsparams
    (I had to do it that way for allowing null ciphers).
2. Without the httpj:tlsServerParameters element the server didn't accept
ssl connections. 


<httpj:engine-factory bus="myBus">


    <httpj:engine port="#{myPort}">
           
    <httpj:tlsServerParameters/>

    <httpj:connector>
               <bean
class="org.eclipse.jetty.server.ssl.SslSelectChannelConnector">
                   <property name="port" value="#myPort}"/>
                   <constructor-arg   ref="myContextFactory" />
               </bean>
           </httpj:connector>

     </httpj:engine>

<httpj:engine-factory/>

 



--
View this message in context: http://cxf.547215.n5.nabble.com/CXF-2-7-11-SSL-server-Socket-timeout-tp5756545.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: CXF 2.7.11 | SSL server | Socket timeout

Posted by avi39844 <av...@gmail.com>.
Hi, 
Could you elaborate pls? What do you mean by "Try to use TLS "?

As I wrote, I must have the tlsClientParameters element for the server be
able to accepts SSL connections 
but the standard tlsClientParameters didn't worked for me since I must allow
NULL cipher which are not supprted  are not supported
<http://cxf.547215.n5.nabble.com/CXF-https-server-Allowing-null-ciphers-td5752465.html#a5752652>  
in tlsClientParameters  in 2.7.4
so I had to configure my SSL by overriding SslContextFactory.

Thanks,



--
View this message in context: http://cxf.547215.n5.nabble.com/CXF-2-7-11-SSL-server-Socket-timeout-tp5756545p5756554.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: CXF 2.7.11 | SSL server | Socket timeout

Posted by Marcos Almeida Azevedo <ma...@gmail.com>.
On Sun, Apr 26, 2015 at 5:18 PM, avi39844 <av...@gmail.com> wrote:

> Hi,
> I have a cxf server which worked fine till I changed it to be over SSL.
> Since the change, I'm having random timeouts - the server get the data
> (according to Java & jetty debugs) and doe's nothing so the client closes
> the connection after timeout has passed.
>
> It happens after several request in a row, every time on a different
> request.
>
> To me it seems to be performance related since when I give the machine (VM)
> more CPUs the problem disappeared, but it doesn't make scene, since I've
> tested the CPU usage and also it has some 100% spikes but never more then
> 30
> *ms *while the client timeout is 30 *seconds*.
>
> Does anyone have a clue why this is happening? How it related to SSL?
> I did some changes for mainly to allow null ciphers (my code is below) so
> maybe the problem is there.
> Any help will be much appreciated.
>
> Thanks,
>
>
> =================================================
> My code:
>
> 1. myContextFactory is extending sslContextFactory and there I configure
> the
> tlsparams
>     (I had to do it that way for allowing null ciphers).
> 2. Without the httpj:tlsServerParameters element the server didn't accept
> ssl connections.
>
>
> <httpj:engine-factory bus="myBus">
>
>
>     <httpj:engine port="#{myPort}">
>
>     <httpj:tlsServerParameters/>
>
>     <httpj:connector>
>                <bean
> class="org.eclipse.jetty.server.ssl.SslSelectChannelConnector">
>                    <property name="port" value="#myPort}"/>
>                    <constructor-arg   ref="myContextFactory" />
>                </bean>
>            </httpj:connector>
>
>      </httpj:engine>
>
> <httpj:engine-factory/>
>

What is your tlsClientParameters? Try to use TLS


>
>
>
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/CXF-2-7-11-SSL-server-Socket-timeout-tp5756545.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>



-- 
Marcos | I love PHP, Linux, and Java
<http://javadevnotes.com/java-string-split-pipe-examples>