Results 1 to 10 of 15

Hybrid View

  1. #1
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    716
    Hi ManKeer,

    Thank you for the logs, we have checked them and first of all I want to clarify that the value for EarlyWSOpen seems completely irrelevant for the issue.
    Indeed from the logs it is evident that every time the client lib tries to open a connection with the server, in order to send the create_session request, it immediately receives the error "Couldn't get a socket, try again".
    So it would seem a connectivity problem between the device running the client and the Lightstreamer server. Please could you check by telnet or ping if the two machines can communicate? Maybe it's a DNS problem and the client can't resolve the host name?

    Regards,
    Giuseppe

  2. #2
    Senior Member
    Join Date
    Dec 2019
    Posts
    66

    Java Client not connecting to the lightstreamer server

    Hi giuseppe,

    I have asked this question again on the stackoverflow, I have got the following response "The observed behavior is not related to client and server versions, but to other context characteristics. For instance, one of the many possible causes could be that the needed root certificate is missing in the java environment. My suggestion is to write to Lightstreamer support forum, where you will have the opportunity to submit client and server logs."

    Now, my application is distributed to the clients, does that imply that I need to import the certificate in my JAR file????

    would you please clarify this point for me?

    Quote Originally Posted by giuseppe.corti View Post
    Hi ManKeer,

    Thank you for the logs, we have checked them and first of all I want to clarify that the value for EarlyWSOpen seems completely irrelevant for the issue.
    Indeed from the logs it is evident that every time the client lib tries to open a connection with the server, in order to send the create_session request, it immediately receives the error "Couldn't get a socket, try again".
    So it would seem a connectivity problem between the device running the client and the Lightstreamer server. Please could you check by telnet or ping if the two machines can communicate? Maybe it's a DNS problem and the client can't resolve the host name?

    Regards,
    Giuseppe

  3. #3
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    716
    Hi ManKeer,

    It seems to me that the actual cause of the problem has not yet been definitively determined.
    But if it is really a refusal by the java client to accept the certificate (or a part relating to the chain of intermediaries) because of a missing certificate root in the jvm, yes a possible solution would be to provide the missing certificate with the client installation.

    However, please consider that cases like this depend on a very unusual or extremely recent root certificate, and sometimes an update of the jvm is enough to solve the problem.

    Regards,
    Giuseppe

  4. #4
    Senior Member
    Join Date
    Dec 2019
    Posts
    66
    I have applied the code below, which loads the keystore that contains the required certificate, unfortunately not worked....

    char[] keyStorePassword = "MYPASSWORD".toCharArray();
    KeyStore ks = KeyStore.getInstance("JKS");
    FileInputStream fis = new FileInputStream("MYKEYSTORE.jks");
    ks.load(fis, keyStorePassword);
    fis.close();

    TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(/*"X509"*/TrustManagerFactory.getDefaultAlgorithm());
    trustManagerFactory.init(ks);
    LightstreamerClient.setTrustManagerFactory(trustMa nagerFactory);

  5. #5
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    716
    Hi ManKeer,

    At this point, maybe the certificate hypothesis as cause of the issue is no longer valid.
    However, it seems appropriate to me to have as much information as possible about the issue.

    Please, could you provide us with a snippet of the server log (lightstreamer.log) of a test case that fails?
    We can start with the factory configuration of the log; then based on the results we may ask you to move to more verbose levels.

    Thank you,
    Giuseppe

  6. #6
    Senior Member
    Join Date
    Dec 2019
    Posts
    66
    Dear Giuseppe,

    I have sent an email for "support@lightstreamer.com", I have attached the required logs for you, my email was titled by "Al Jazira Capital Logs", however I have noticed the following and I don't know if it's a correct note or not:

    * It seems that the java client connections come through bind_session and all of them rejected by network error.
    * All HTML5 connections come through create_session and all of them are accepted.

    Waiting your response.

  7. #7
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    716
    Hi ManKeer,

    Thank you for the server log.
    Your considerations are absolutely correct, in fact several javascript sessions work perfectly; as you can see, following one of these, the correct flow would be:

    - received the create_session request form the client;
    - created the session id and returned to the client;
    - received the bind_session from the client;
    - start with the regular activities of the session (subscription request ...).

    But for the Java Client there is no request to create_session at all. Only bind_session which all fail due to sync error.
    This behavior is very strange, and may be due to two reasons:
    - the create_sessions of the java client end up in a wrong server instance, this may be due either to a problem with the balancer or with a misconfiguration of the client;
    - the client has very serious delays such that the create request and the subsequent bind exceed the life of the server. Actually this is very unlikely.
    Can you check whether in front of the Lightstreamer server there is a balancer that sends the requests of the same client to two different instances?
    Do javascript and java clients have the same network intermediaries to get to the server?

    However, it might be useful to also have the client side log that we can match with that of the server.
    Please in order to enable the client log you can add the following lines to your application:

    SystemOutLogProvider prov = new SystemOutLogProvider();
    LightstreamerClient.setLoggerProvider(prov);


    You may also need to add to your project the dependencies 'com.lightstreamer:ls-log-adapter-java:1.0.1' and 'com.lightstreamer:java-system-out-log:1.0.2', which you can find on our public Maven repo.

    Please let us know if you need any further clarifications.

    Regards,
    Giuseppe

 

 

Similar Threads

  1. HTML5 LS client Vs Java LS client
    By ManKeer in forum General
    Replies: 1
    Last Post: February 22nd, 2021, 09:28 AM
  2. Replies: 2
    Last Post: January 5th, 2012, 08:53 AM
  3. where to download Java SE Client jar file
    By joshi_s_p in forum Client SDKs
    Replies: 3
    Last Post: January 4th, 2012, 08:30 AM
  4. Replies: 1
    Last Post: May 21st, 2009, 09:41 AM
  5. Replies: 4
    Last Post: February 4th, 2009, 11:45 PM

Tags for this Thread

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 08:19 AM.