Results 1 to 6 of 6

Hybrid View

  1. #1
    Member
    Join Date
    Apr 2010
    Location
    San Francisco
    Posts
    16
    RE: Cookie Handling.
    Cookie handling is not required when we are bypassing the load balancer (as we are in this case). Disabling cookie handling seems to get things going but we’ve run into issues in the past where having cookie handling disabled caused connection and synch issues. So far I’m not seeing these when testing the app.

    We do have access to a browser console. The connections to create_session.js work fine but I do not see any other requests (I do see those requests when looking at successful connections).

    Unfortunately we cannot try a newer version of the web SDK because it throws compatibility errors with our version of LightStreamer. We are currently using the most recent version supported by our server.


    I guess the open question now is, why does cookie handling work in non-production environments?

    For some context, attached is a log (nonProdLog.txt) with debug enabled in an environment that works:
    This is with Cookie Handling enabled in the lower environment.
    Attached Files Attached Files

  2. #2
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,091
    By comparing the two logs, we can see the root difference.
    After the first occurrence of "Verify if a connection class is appropriate", the following line is: "This class is good" in the successful case, whereas it is: "Cookies on request are required, this class can't guarantee that cookies will be actually sent" in the failed case.
    In the first case, the library issues a normal XmlHttpRequest; on the other hand, after the latter message, the library tries to contact the Server in a different way, but it turns out to fail.

    Note that you cannot see the messages, because you must have regenerated the library by omitting the LogMessages class to make it smaller. You could see the messages by using a full version of the library.

    What causes LS library to issue the second message is the combination of two factors:
    1. setCookieHandlingRequired(true) has been issued;
    2. the running environment doesn't appear to be a browser.

    In the successful case, at least one of the two restricting conditions doesn't hold.
    My assumption is that the running environment was the same in the two experiments;
    hence, the difference is that in the successful one setCookieHandlingRequired(true) was not issued.
    Do you confirm?

    Actually, all the above is independent of the cookie handling setting in your Load Balancer, which comes into play only at a later stage.
    With Lightstreamer, you have to ensure session stickiness, hence, if you opt for doing this through the cookies, you have no choice but to enable cookie handling and to invoke setCookieHandlingRequired(true).
    Hence, the problem lies in our library.

    I am still struggling to understand the exact conditions of your various tests.
    Each test is characterized at least by the following aspects:
    1. browser vs native app;
    2. presence or absence of a Load Balancer;
    3. cookie handling configured on the load balancer;
    4. setCookieHandlingRequired(true) invoked;

    Could you please resume?

 

 

Similar Threads

  1. Replies: 9
    Last Post: May 6th, 2015, 02:02 PM
  2. Replies: 12
    Last Post: August 12th, 2013, 12:52 PM
  3. unable to setup HTTP server
    By jdepp in forum General
    Replies: 0
    Last Post: January 2nd, 2013, 03:43 PM
  4. connect Light streamer and j2EE web application
    By pradeepgamage in forum Adapter SDKs
    Replies: 7
    Last Post: May 17th, 2012, 09:21 AM
  5. Replies: 2
    Last Post: August 22nd, 2011, 08:25 AM

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:41 PM.