You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Arjun (JIRA)" <ji...@apache.org> on 2018/05/15 19:07:00 UTC

[jira] [Created] (CAMEL-12516) How to resolve the 400 The plain HTTP request was sent to HTTPS port issue in Apache Camel?

Arjun created CAMEL-12516:
-----------------------------

             Summary: How to resolve the 400 The plain HTTP request was sent to HTTPS port issue in Apache Camel?
                 Key: CAMEL-12516
                 URL: https://issues.apache.org/jira/browse/CAMEL-12516
             Project: Camel
          Issue Type: Task
            Reporter: Arjun


How to resolve the 400 The plain HTTP request was sent to HTTPS port issue?

{{from: empValidation to: myhost:443/EmpValidation/EmpValidationAPIService rules.getRules().forEach(x->\{ final LoadBalanceDefinition lb = from("jetty:http://0.0.0.0:"+rules.getPort()+"/"+x.getFrom()+"??matchOnUriPrefix=true").log(LoggingLevel.DEBUG, "Processing ${id}").log("Incoming Context Request :"+x.getFrom()) .loadBalance().roundRobin(); x.getTo().forEach(z->lb.to("http4://"+z+"?bridgeEndpoint=true&throwExceptionOnFailure=true").log("Outgoing mapping urls :"+z)) ; });}}

 

How to resolve the 400 The plain HTTP request was sent to HTTPS port issue?

{{from: empValidation to: myhost:443/EmpValidation/EmpValidationAPIService rules.getRules().forEach(x->\{ final LoadBalanceDefinition lb = from("jetty:http://0.0.0.0:"+rules.getPort()+"/"+x.getFrom()+"??matchOnUriPrefix=true").log(LoggingLevel.DEBUG, "Processing ${id}").log("Incoming Context Request :"+x.getFrom()) .loadBalance().roundRobin(); x.getTo().forEach(z->lb.to("http4://"+z+"?bridgeEndpoint=true&throwExceptionOnFailure=true").log("Outgoing mapping urls :"+z)) ; }); }}{{}}

if i use "https4" component it's working the above url(empValidation) but it's not working for below url.

{{Url: myhost:9008/emp-web-service/services/addEmp Error: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source) at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source) at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source) at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:396) }}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)