-
March 1st, 2021, 09:48 AM
#1
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
-
September 26th, 2021, 07:48 AM
#2
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?
Originally Posted by
giuseppe.corti
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
-
September 27th, 2021, 11:17 AM
#3
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
-
September 29th, 2021, 12:39 PM
#4
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);
-
September 30th, 2021, 08:35 AM
#5
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
-
October 4th, 2021, 08:19 AM
#6
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.
-
October 4th, 2021, 09:56 AM
#7
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
-
By ManKeer in forum General
Replies: 1
Last Post: February 22nd, 2021, 09:28 AM
-
By subuta in forum Client SDKs
Replies: 2
Last Post: January 5th, 2012, 08:53 AM
-
By joshi_s_p in forum Client SDKs
Replies: 3
Last Post: January 4th, 2012, 08:30 AM
-
By k.mcc2009 in forum Adapter SDKs
Replies: 1
Last Post: May 21st, 2009, 09:41 AM
-
By jsharpe in forum Client SDKs
Replies: 4
Last Post: February 4th, 2009, 11:45 PM
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
All times are GMT +1. The time now is 08:19 AM.
Bookmarks