Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    May 2008
    Location
    London
    Posts
    3

    Using Https to connect to the PushServer

    Hi,

    I am using Https to connect to the LightStreamer server using com.lightstreamer.ls_client.LSClient. The pushServerUrl in com.lightstreamer.ls_client.ConnectionInfo class passed in to LSClient has a url of the form https://XXX.XX etc.
    When i try to connect in this way, i am getting the following error:

    do i have to put any certificates in a particular location in LightStreamer installation?
    or, do i have to do something else/
    Thanks in advance for any pointers.

    Exception in thread "main" com.lightstreamer.ls_client.PushConnException: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
    at com.lightstreamer.ls_client.PushServerProxy.connec tForSession(PushServerProxy.java:115)
    at com.lightstreamer.ls_client.ServerManager.<init>(S erverManager.java:69)
    at com.lightstreamer.ls_client.LSClient.openConnectio n(LSClient.java:71)
    at uk.co.OUR_CLIENT.main(LightstreamerTestClient.java :57)
    Caused by: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRec ord(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.perform InitialHandshake(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHa ndshake(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHa ndshake(Unknown Source)
    at sun.net.http://www.protocol.https.HttpsClien...onnect(Unknown Source)
    at sun.net.http://www.protocol.https.AbstractDe...onnect(Unknown Source)
    at sun.net.http://www.protocol.http.HttpURLConn...Stream(Unknown Source)
    at sun.net.http://www.protocol.https.HttpsURLCo...Stream(Unknown Source)
    at com.lightstreamer.ls_client.HttpProvider.sendPost( HttpProvider.java:94)
    at com.lightstreamer.ls_client.HttpProvider.connectAn dGetAnswer(HttpProvider.java:163)
    at com.lightstreamer.ls_client.HttpProvider.doPost(Ht tpProvider.java:151)
    at com.lightstreamer.ls_client.PushServerTranslator.c allSession(PushServerTranslator.java:87)
    at com.lightstreamer.ls_client.PushServerProxy.connec tForSession(PushServerProxy.java:110)
    ... 3 more
    Caused by: java.io.EOFException: SSL peer shut down incorrectly
    at com.sun.net.ssl.internal.ssl.InputRecord.read(Unkn own Source)
    ... 16 more

  2. #2
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    973
    You must have enabled the 443 port on the Server by uncommenting the <https_server> element in the Server configuration file. There, you also find the <keystore> subelement, where the path to your certificate files is supplied (see the embedded comment for notes on the certificates).

    The keystore provided in the "conf" directory is self-signed. We provide it because it allows you to try https access from a browser (the browser will prompt you for acceptance). Can you access the Server in https successfully from a browser?

    Access in https from a java program, on the other hand, requires that either a correct certificate is mounted on the Server or, in case of a self-signed certificate, that the same certificate is supplied to the JVM "truststore".
    This can be done by application code, with no involvement of Lightstreamer Java Client Library.
    Anyway, please show us the corresponding Server log for a check.

  3. #3
    Member
    Join Date
    May 2008
    Location
    London
    Posts
    3
    Thanks Dario for the reply.
    It was an issue with the client. I had to set it up properly by giving the truststore etc. now it looks fine.

 

 

Similar Threads

  1. HTTPS Configuration
    By wwatts in forum Adapter APIs
    Replies: 1
    Last Post: May 2nd, 2012, 09:55 AM
  2. Replies: 2
    Last Post: August 22nd, 2011, 08:25 AM
  3. lightstreamer on https
    By ddhanis in forum General
    Replies: 3
    Last Post: December 15th, 2009, 09:45 AM
  4. Trying to run LS through Https / SSL
    By wmolde in forum Client APIs
    Replies: 2
    Last Post: April 18th, 2007, 03:40 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT +1. The time now is 04:42 PM.