Results 1 to 6 of 6
  1. #1

    Exclamation NPM Client web SDK disconnect for some reason

    Hi, I started using https://www.npmjs.com/package/lightstreamer-client-web npm package in my application instead of older version of lightstreamer client we had previously. And now for some reason I inconsistently cannot connect to my lightstreamer server(not always reproducable). I make a connect() call and in browser network I see the call to create_session.txt but in my lightstreamer server logs I see following errors
    Code:
    Serving request: bind_session -> LS_session=Sbd21b87183da6bdcM7e5T4447660&LS_phase=1903&LS_cause=loop1&
     Received unrecognized session ID: Sbd21b87183da6bdcM7e5T4447660
    Sync error: Unexpected session ID
    And there are no logs of create_session being called. For some reason session is not created properly from this client-web npm package. Can you please help what can be the root cause of the issue and why this keeps happening inconsistently?

  2. #2
    Hello Yana,

    Can you enable the client logger and send the output to support@lightstreamer.com?

    You can enable the logger by adding the following lines to your application:

    var log = new SimpleLoggerProvider();
    log.addLoggerAppender(new ConsoleAppender("DEBUG", "*"));
    LightstreamerClient.setLoggerProvider(log);



    Which server version are you using?

    Are you using a single Lightstreamer server or a cluster behind a load balancer?

    Have you configured a control link address for your Lightstreamer server?

    Regards

  3. #3
    Hi Alessandro,

    So I was able to resolve the issue thanks to your suggestions. After enabling logger I saw that error was "21 - Wrong session ID". And as you mentioned our server is on load balancer, that is why requests were made to different servers. I fixed it by setting connectionOptions.setCookieHandlingRequired(true) this way my load balancer sticky session is being sent with a request cookies and all requests go to the same server on load balancer.

    Thanks,
    Yana

  4. #4
    I have similar issue on react-navie client (with Load Balancer + Cloudflare). Sometimes LS is working, sometime it doesn't with same error "Wrong session ID". But this connectionOptions.setCookieHandlingRequired(true) option are not available on environment other then browser or nodejs:
    Code:
    
    
    Code:
       setCookieHandlingRequired: function(cookieHandlingRequired) {
          if (cookieHandlingRequired && ( !Environment.isBrowser() && !Environment.isNodeJS() )) {
            throw new IllegalArgumentException(IMPOSSIBLE_COOKIES);
          }
          
          this.heavySetter("cookieHandlingRequired",this.checkBool(cookieHandlingRequired));
        },

    Any advises ?


    We are using client lightstreamer-client-web@8.0.3 (module: lightstreamer-core.esm.js)
    LS logs attached
    Attached Files Attached Files

  5. #5
    Hello Anton,

    You are right. That check is too restrictive.
    We have already fixed it on Github and we’ll include the patch in the next release.
    Thank you for reporting the issue.

  6. #6
    Thanks a lot! It seems that this fixed your issue.

 

 

Similar Threads

  1. reason: 'Lightstreamer error received: 17
    By anilkumar2508 in forum Client SDKs
    Replies: 1
    Last Post: October 16th, 2012, 09:55 AM
  2. Replies: 2
    Last Post: January 5th, 2012, 08:53 AM
  3. Blackberry SDK Client
    By gustavo.barrientos in forum Client SDKs
    Replies: 3
    Last Post: November 3rd, 2010, 09:21 AM

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 05:13 AM.
Lightstreamer Logo