HTTP4s handshake exception

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
W.Y
Reply | Threaded
Open this post in threaded view
|

HTTP4s handshake exception

W.Y
You could do something like this to set SSL for Http4

private void configureSslForHttp4(){
KeyStoreParameters ksp = new KeyStoreParameters();
ksp.setResource(keystoreLocation);
ksp.setPassword(keystorePassword);
TrustManagersParameters tmp = new TrustManagersParameters();
tmp.setKeyStore(ksp);
SSLContextParameters scp = new SSLContextParameters();
scp.setTrustManagers(tmp);
HttpComponent httpComponent = getContext().getComponent("https4",
HttpComponent.class);
httpComponent.setSslContextParameters(scp);
}


------------------------------
If you reply to this email, your message will be added to the discussion
below:
http://camel.465427.n5.nabble.com/private-void-configureSslForHttp4-KeyStoreParameters-ksp-new-KeyStoreParameters-ksp-setResource-keys-tp5832522.html
To unsubscribe from Camel - Users, click here
<
.
NAML
<
http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
Reply | Threaded
Open this post in threaded view
|

Re: HTTP4s handshake exception

Rohan Emmanuel
still getting Handshake exception:]
not sure where i am going wrong

java.net.SocketException: Software caused connection abort: recv failed
at java.net.SocketInputStream.socketRead0(Native Method) ~[?:1.8.0_101]
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
~[?:1.8.0_101]
at java.net.SocketInputStream.read(SocketInputStream.java:170)
~[?:1.8.0_101]
at java.net.SocketInputStream.read(SocketInputStream.java:141)
~[?:1.8.0_101]
at sun.security.ssl.InputRecord.readFully(InputRecord.java:465)
~[?:1.8.0_101]
at sun.security.ssl.InputRecord.read(InputRecord.java:503) ~[?:1.8.0_101]
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973)
~[?:1.8.0_101]
at
sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
~[?:1.8.0_101]
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403)
~[?:1.8.0_101]
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387)
~[?:1.8.0_101]

On Sat, Mar 30, 2019 at 2:28 PM Wang Yan <[hidden email]> wrote:

> You could do something like this to set SSL for Http4
>
> private void configureSslForHttp4(){
> KeyStoreParameters ksp = new KeyStoreParameters();
> ksp.setResource(keystoreLocation);
> ksp.setPassword(keystorePassword);
> TrustManagersParameters tmp = new TrustManagersParameters();
> tmp.setKeyStore(ksp);
> SSLContextParameters scp = new SSLContextParameters();
> scp.setTrustManagers(tmp);
> HttpComponent httpComponent = getContext().getComponent("https4",
> HttpComponent.class);
> httpComponent.setSslContextParameters(scp);
> }
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/private-void-configureSslForHttp4-KeyStoreParameters-ksp-new-KeyStoreParameters-ksp-setResource-keys-tp5832522.html
> To unsubscribe from Camel - Users, click here
> <
> >
> .
> NAML
> <
>
http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> >
>


--
Regards,
Rohan Emmanuel
Reply | Threaded
Open this post in threaded view
|

Re: HTTP4s handshake exception

Rohan Emmanuel
Can anyone point me to working HTTPS sample please?


On Sat, Mar 30, 2019 at 3:32 PM Rohan Emmanuel <[hidden email]>
wrote:

> still getting Handshake exception:]
> not sure where i am going wrong
>
> java.net.SocketException: Software caused connection abort: recv failed
> at java.net.SocketInputStream.socketRead0(Native Method) ~[?:1.8.0_101]
> at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
> ~[?:1.8.0_101]
> at java.net.SocketInputStream.read(SocketInputStream.java:170)
> ~[?:1.8.0_101]
> at java.net.SocketInputStream.read(SocketInputStream.java:141)
> ~[?:1.8.0_101]
> at sun.security.ssl.InputRecord.readFully(InputRecord.java:465)
> ~[?:1.8.0_101]
> at sun.security.ssl.InputRecord.read(InputRecord.java:503) ~[?:1.8.0_101]
> at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973)
> ~[?:1.8.0_101]
> at
> sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
> ~[?:1.8.0_101]
> at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403)
> ~[?:1.8.0_101]
> at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387)
> ~[?:1.8.0_101]
>
> On Sat, Mar 30, 2019 at 2:28 PM Wang Yan <[hidden email]> wrote:
>
>> You could do something like this to set SSL for Http4
>>
>> private void configureSslForHttp4(){
>> KeyStoreParameters ksp = new KeyStoreParameters();
>> ksp.setResource(keystoreLocation);
>> ksp.setPassword(keystorePassword);
>> TrustManagersParameters tmp = new TrustManagersParameters();
>> tmp.setKeyStore(ksp);
>> SSLContextParameters scp = new SSLContextParameters();
>> scp.setTrustManagers(tmp);
>> HttpComponent httpComponent = getContext().getComponent("https4",
>> HttpComponent.class);
>> httpComponent.setSslContextParameters(scp);
>> }
>>
>>
>> ------------------------------
>> If you reply to this email, your message will be added to the discussion
>> below:
>>
>> http://camel.465427.n5.nabble.com/private-void-configureSslForHttp4-KeyStoreParameters-ksp-new-KeyStoreParameters-ksp-setResource-keys-tp5832522.html
>> To unsubscribe from Camel - Users, click here
>> <
>> >
>> .
>> NAML
>> <
>>
http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
>> >
>>
>
>
> --
> Regards,
> Rohan Emmanuel
>


--
Regards,
Rohan Emmanuel
Reply | Threaded
Open this post in threaded view
|

Re: HTTP4s handshake exception

Rohan Emmanuel
any clues on the reasons for getting "java.net.SocketException: Software
caused connection abort: recv failed"
when using http4s?


On Sun, Mar 31, 2019 at 10:08 AM Rohan Emmanuel <[hidden email]>
wrote:

> Can anyone point me to working HTTPS sample please?
>
>
> On Sat, Mar 30, 2019 at 3:32 PM Rohan Emmanuel <[hidden email]>
> wrote:
>
>> still getting Handshake exception:]
>> not sure where i am going wrong
>>
>> java.net.SocketException: Software caused connection abort: recv failed
>> at java.net.SocketInputStream.socketRead0(Native Method) ~[?:1.8.0_101]
>> at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
>> ~[?:1.8.0_101]
>> at java.net.SocketInputStream.read(SocketInputStream.java:170)
>> ~[?:1.8.0_101]
>> at java.net.SocketInputStream.read(SocketInputStream.java:141)
>> ~[?:1.8.0_101]
>> at sun.security.ssl.InputRecord.readFully(InputRecord.java:465)
>> ~[?:1.8.0_101]
>> at sun.security.ssl.InputRecord.read(InputRecord.java:503) ~[?:1.8.0_101]
>> at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973)
>> ~[?:1.8.0_101]
>> at
>> sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
>> ~[?:1.8.0_101]
>> at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403)
>> ~[?:1.8.0_101]
>> at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387)
>> ~[?:1.8.0_101]
>>
>> On Sat, Mar 30, 2019 at 2:28 PM Wang Yan <[hidden email]> wrote:
>>
>>> You could do something like this to set SSL for Http4
>>>
>>> private void configureSslForHttp4(){
>>> KeyStoreParameters ksp = new KeyStoreParameters();
>>> ksp.setResource(keystoreLocation);
>>> ksp.setPassword(keystorePassword);
>>> TrustManagersParameters tmp = new TrustManagersParameters();
>>> tmp.setKeyStore(ksp);
>>> SSLContextParameters scp = new SSLContextParameters();
>>> scp.setTrustManagers(tmp);
>>> HttpComponent httpComponent = getContext().getComponent("https4",
>>> HttpComponent.class);
>>> httpComponent.setSslContextParameters(scp);
>>> }
>>>
>>>
>>> ------------------------------
>>> If you reply to this email, your message will be added to the discussion
>>> below:
>>>
>>> http://camel.465427.n5.nabble.com/private-void-configureSslForHttp4-KeyStoreParameters-ksp-new-KeyStoreParameters-ksp-setResource-keys-tp5832522.html
>>> To unsubscribe from Camel - Users, click here
>>> <
>>> >
>>> .
>>> NAML
>>> <
>>>
http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
>>> >
>>>
>>
>>
>> --
>> Regards,
>> Rohan Emmanuel
>>
>
>
> --
> Regards,
> Rohan Emmanuel
>


--
Regards,
Rohan Emmanuel