You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by nocheinandi <an...@gmail.com> on 2012/01/06 12:01:08 UTC

Protocol mismatch for port 443: engine's protocol is http, the url protocol is https

Hallo everyone,

I would like to use SSL with my CXF-endpoints. After I replaced http with
https in the cxf-definition the following error has occured:

Caused by: java.io.IOException: Protocol mismatch for port 443: engine's
protocol is http, the url protocol is https 
at
org.apache.cxf.transport.http_jetty.JettyHTTPServerEngineFactory.createJettyHTTPServerEngine(JettyHTTPServerEngineFactory.java:254)

I thought that this is ok, because I have not attached any configuration for
SSL. So I have read the following articles:

http://camel.apache.org/how-to-switch-the-cxf-consumer-between-http-and-https-without-touching-the-spring-configuration.html

http://fusesource.com/docs/esb/4.4/esb_security/CamelCXF-SecureClient.html

And: 
http://cxf.apache.org/docs/client-http-transport-including-ssl-support.html#ClientHTTPTransport%28includingSSLsupport%29-ConfiguringSSLSupport

Therefore I have added some new parts to my configuration and I have still
the same error. Currently my configuration looks like that:

     	 <http:conduit name="*.http-conduit"> 
   <!__ &lt;http:conduit name=&quot;https://192.168.122.128:443/.*&quot;>
__>
    <!__ &lt;http:conduit name=&quot;{http://xxx}yyy.http-conduit&quot;> __>
	     <!__ disableCNCheck=&quot;false&quot; __>
		    <http:tlsClientParameters>
		      <sec:trustManagers>
		        <sec:keyStore type="JKS" password="password" file="xxx"/>
		      </sec:trustManagers>
		      <sec:cipherSuitesFilter>
		        <sec:include>.*_EXPORT_.*</sec:include>
		        <sec:include>.*_EXPORT1024_.*</sec:include>
		        <sec:include>.*_WITH_DES_.*</sec:include>
		        <sec:include>.*_WITH_NULL_.*</sec:include>
		        <sec:exclude>.*_DH_anon_.*</sec:exclude>
		      </sec:cipherSuitesFilter>
		    </http:tlsClientParameters>
		    <!__  &lt;http:client AutoRedirect=&quot;true&quot;
Connection=&quot;Keep-Alive&quot;/>__>
  		</http:conduit>	 

             <cxf:cxfEndpoint id="myEndpointName"
                   address="https://192.168.122.128:443/yyy"
                   serviceName="myServiceName"
                   endpointName="yyy"
                   serviceClass="myServiceClass"
                   xmlns:s="xxx"
                   wsdlURL="kkk.wsdl">
                   <cxf:properties>
            			<entry key="schema-validation-enabled" value="true" />
            			<!__ Quelle: http://camel.apache.org/cxf.html#CXF-Options __>
				<entry key="mtom-enabled" value="true"/>
        		   </cxf:properties>
  		   </cxf:cxfEndpoint>


And I have still the same error. Why? The conduit-part ist also instantiated
during the booting. Something like: "Pre-instantiating singletons in [...]
[...*.http-conduit...];"

I have also tried to use different names for the conduit, as you can see
above. How can I find out, what's wrong? Or do you have any suggestions?
Thanks a lot for your help!


     


--
View this message in context: http://camel.465427.n5.nabble.com/Protocol-mismatch-for-port-443-engine-s-protocol-is-http-the-url-protocol-is-https-tp5125232p5125232.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Protocol mismatch for port 443: engine's protocol is http, the url protocol is https

Posted by Andreas Feldmann <an...@gmail.com>.
I think I should mention the versions of my components. Here is the part from
my pom.xml

    <camel-version>2.8.3</camel-version>
    <jaxb-api-version>2.1</jaxb-api-version>
    <jaxb-impl-version>2.1.13</jaxb-impl-version>
    <cxf-version>2.4.4</cxf-version>
    <java-version>1.6</java-version>
    <slf4j-version>1.6.1</slf4j-version>
    <log4j-version>1.2.16</log4j-version>
    <commons-logging>1.1.1</commons-logging>
    <junit-version>4.8.1</junit-version>
    <maven-compiler-version>2.3.2</maven-compiler-version>
    <derby-version>10.8.2.2</derby-version>
   
<derby-path>C:\Programme\db-derby-10.8.2.2-bin\lib\derby.jar</derby-path>
    <spring-version>3.0.6.RELEASE</spring-version>

That's it. I you have any questions regarding my problem. Do not hesitate to
ask!

--
View this message in context: http://camel.465427.n5.nabble.com/Protocol-mismatch-for-port-443-engine-s-protocol-is-http-the-url-protocol-is-https-tp5125232p5125306.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Protocol mismatch for port 443: engine's protocol is http, the url protocol is https

Posted by Willem Jiang <wi...@gmail.com>.
Hi,

 From the stack trace, I can tell the error is from CXF server side not 
the client side.

The URL you found is for configuration of the CXF client side. You need 
to setup the jetty engine for SSL like this[1] for the server side.

[1]http://cxf.apache.org/docs/jetty-configuration.html

Willem

On 1/6/12 7:01 PM, nocheinandi wrote:
> Hallo everyone,
>
> I would like to use SSL with my CXF-endpoints. After I replaced http with
> https in the cxf-definition the following error has occured:
>
> Caused by: java.io.IOException: Protocol mismatch for port 443: engine's
> protocol is http, the url protocol is https
> at
> org.apache.cxf.transport.http_jetty.JettyHTTPServerEngineFactory.createJettyHTTPServerEngine(JettyHTTPServerEngineFactory.java:254)
>
> I thought that this is ok, because I have not attached any configuration for
> SSL. So I have read the following articles:
>
> http://camel.apache.org/how-to-switch-the-cxf-consumer-between-http-and-https-without-touching-the-spring-configuration.html
>
> http://fusesource.com/docs/esb/4.4/esb_security/CamelCXF-SecureClient.html
>
> And:
> http://cxf.apache.org/docs/client-http-transport-including-ssl-support.html#ClientHTTPTransport%28includingSSLsupport%29-ConfiguringSSLSupport
>
> Therefore I have added some new parts to my configuration and I have still
> the same error. Currently my configuration looks like that:
>
>       	<http:conduit name="*.http-conduit">
>     <!__&lt;http:conduit name=&quot;https://192.168.122.128:443/.*&quot;>
> __>
>      <!__&lt;http:conduit name=&quot;{http://xxx}yyy.http-conduit&quot;>  __>
> 	<!__ disableCNCheck=&quot;false&quot; __>
> 		<http:tlsClientParameters>
> 		<sec:trustManagers>
> 		<sec:keyStore type="JKS" password="password" file="xxx"/>
> 		</sec:trustManagers>
> 		<sec:cipherSuitesFilter>
> 		<sec:include>.*_EXPORT_.*</sec:include>
> 		<sec:include>.*_EXPORT1024_.*</sec:include>
> 		<sec:include>.*_WITH_DES_.*</sec:include>
> 		<sec:include>.*_WITH_NULL_.*</sec:include>
> 		<sec:exclude>.*_DH_anon_.*</sec:exclude>
> 		</sec:cipherSuitesFilter>
> 		</http:tlsClientParameters>
> 		<!__&lt;http:client AutoRedirect=&quot;true&quot;
> Connection=&quot;Keep-Alive&quot;/>__>
>    		</http:conduit>	
>
>               <cxf:cxfEndpoint id="myEndpointName"
>                     address="https://192.168.122.128:443/yyy"
>                     serviceName="myServiceName"
>                     endpointName="yyy"
>                     serviceClass="myServiceClass"
>                     xmlns:s="xxx"
>                     wsdlURL="kkk.wsdl">
>                     <cxf:properties>
>              			<entry key="schema-validation-enabled" value="true" />
>              			<!__ Quelle: http://camel.apache.org/cxf.html#CXF-Options __>
> 				<entry key="mtom-enabled" value="true"/>
>          		</cxf:properties>
>    		</cxf:cxfEndpoint>
>
>
> And I have still the same error. Why? The conduit-part ist also instantiated
> during the booting. Something like: "Pre-instantiating singletons in [...]
> [...*.http-conduit...];"
>
> I have also tried to use different names for the conduit, as you can see
> above. How can I find out, what's wrong? Or do you have any suggestions?
> Thanks a lot for your help!
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Protocol-mismatch-for-port-443-engine-s-protocol-is-http-the-url-protocol-is-https-tp5125232p5125232.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


-- 
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
          http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang