Results 1 to 8 of 8
  1. #1
    Member
    Join Date
    Aug 2007
    Location
    Jakarta
    Posts
    10

    Lost streaming after migrating to Linux and had domain changed

    We just migrated our servers from windows to linux boxes (Red Hat) and had the domain changed. And there were glitches in making Lightstreamer to work properly.
    LS Server resides in the same server with the Webserver(ApacheTomcat). Previous to the migration, everything worked perfectly.
    The problem is that derivatives of the master push-page (its children's push-pages) are not able to "seekEngine" of the master push-page engine.
    The data streaming of the main page -which the master engine resides- works smoothly. As we open some other windows, which has reference to the masterEngine, they lost the streaming. (Alert: Unable to find the engine...).

    Does it have anything to do with Linux case-sensitiveness in configuring the push-page?
    Or does it have to with the domain changes? (However, the connection property and the domain context of the master push-page and its derivatives, are the same)


    Snippet:
    Code:
    // Main Page master push-page & master engine
    var lsPage = new PushPage();
    lsPage.context.setDebugAlertsOnClientError(false);
    lsPage.context.setDomain("<fmt:message key="LS.Domain"/>");
    lsPage.onEngineCreation = startEngine;
    lsPage.bind();
    lsPage.createEngine("RTEngine", "LS/","SHARE_SESSION");
    function startEngine(eng) {
    	eng.policy.setMaxBandwidth(<fmt:message key="LS.MaxBandwidth"/>);
    	eng.policy.setIdleTimeout(<fmt:message key="LS.IdleTimeout"/>);
    	eng.policy.setPollingInterval(<fmt:message key="LS.PollingInterval"/>);
    	eng.connection.setLSHost("<fmt:message key="LS.Host"/>");
    	eng.connection.setLSPort(<fmt:message key="LS.Port"/>);
    	eng.connection.setAdapterName("<fmt:message key="LS.Adapter"/>");
    	eng.changeStatus("<fmt:message key="LS.Status"/>");
    }	
    		
    		
    		
    //============================================
    
    // Derivative (pop-up) window 
    var lsPage = new PushPage();
    var txtDomain = "<fmt:message key="LS.Domain"/>";
    var debugAlerts = true;
    var remoteAlerts = false;
    var pushHost =null;
    if (location.href.indexOf(txtDomain) > -1) {
    	lsPage.context.setDomain(txtDomain);
    	debugAlerts = false;
    	remoteAlerts = true;
    } 
    else {
    	lsPage.context.setDomain(txtDomain);
    }
    lsPage.context.setDebugAlertsOnClientError(debugAlerts);
    lsPage.context.setRemoteAlertsOnClientError(remoteAlerts);
    lsPage.bind();
    lsPage.onClientError = function(mex) {  
         alert("Page "+getPageHeading()+"\n"+mex);  
    };  	
    lsPage.seekEngine("RTEngine", self.parent);


    Thanks in advance for the help.

  2. #2
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    At first sight everything seems correct.
    Just a couple of questions:

    Which browser are you using? Does the problem arise on different browsers?

    You talk about "popups" but I see in the code that you pass to the seekEngine a self.parent pointer. Is this correct? Note that the pushpage should be able to connect to its master-pushpage even if the pointer is not valid (thanks to the engine name) but it's always better if the pointer is the correct one.

    Please can you post the code as it arrives on the client and not as it is in the jsp?

  3. #3
    Member
    Join Date
    Aug 2007
    Location
    Jakarta
    Posts
    10
    Thanks for the prompt response, Mone.

    I'm using Mozilla Firefox 5 and Internet Explorer 6. Another observation that I found is that, on Firefox, the main master-page is still able to receive the data stream (but not the children pages as I've mentioned previously). However, on Explorer, it does not receive any streaming at all on the master push-page.

    ...Please can you post the code as it arrives on the client and not as it is in the jsp?


    I'm not quite understanding your request. What "client" code are you referring to? because the .jsp taglib just represents the data it contains, and it might be critical info that is limited to me to share.



    -Gerald

  4. #4
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,090
    Mone is not at office today, but I can focus on a couple of aspects.

    We need the final HTML code mainly to check the consistency of domain, host and port settings. We would just need the same small snippets as above, but grabbed from the browser page. Are domain and host settings among the private information?

    Have you assessed the use of "self.parent" in the "seekEngine" call? It seems to us that, in a popup window, "self.opener" should be used instead.

  5. #5
    Member
    Join Date
    Aug 2007
    Location
    Jakarta
    Posts
    10
    Dario,
    thanks for the notification.
    Attached is the requested snippet.
    And regarding the "self.parent", as Mone has said that "thanks to the engine name", the reference should be no problem. But we'll take a look at your suggestion in using "self.opener".
    Code:
    // Main Page master push-page & master engine
    
    <html>
    ...
    ...
    ...
    <script language="JavaScript">
    ...
    ...
    ...
    var lsPage = new PushPage();
    lsPage.context.setDebugAlertsOnClientError(false);
    lsPage.context.setDomain("ciptaonline");
    lsPage.onEngineCreation = startEngine;
    lsPage.bind();
    lsPage.createEngine("RTEngine", "LS/","SHARE_SESSION");
    function startEngine(eng) {
    	eng.policy.setMaxBandwidth(30);
    	eng.policy.setIdleTimeout(30000);
    	eng.policy.setPollingInterval(1000);
    	eng.connection.setLSHost("cipta-linux2.ciptaonline");
    	eng.connection.setLSPort(8080);
    	eng.connection.setAdapterName("RT2");
    	eng.changeStatus("STREAMING");
    }
    ...
    ...
    ...
    </script>
    ...
    ...
    ...
    </html>
    
    
    
    //==========================================================
    
    // Derivative (pop-up) window 
    
    <html>
    ...
    ...
    ...
    
    <script language="JavaScript">
    ...
    ...
    ...
    var lsPage = new PushPage();
    var debugAlerts = true;
    var remoteAlerts = false;
    var pushHost = null;
    var txtDomain="ciptaonline";
    if (location.href.indexOf(txtDomain) > -1) {
    	lsPage.context.setDomain(txtDomain);
    	debugAlerts = false;
    	remoteAlerts = true;
    } else {
    	lsPage.context.setDomain(txtDomain);
    }
    lsPage.context.setDebugAlertsOnClientError(debugAlerts);
    lsPage.context.setRemoteAlertsOnClientError(remoteAlerts);
    lsPage.bind();
    lsPage.onClientError = function(mex) {  
         alert("Page SalesPortfolio\n"+mex);  
    };  	
    lsPage.seekEngine("RTEngine",self.parent);
    ...
    ...
    ...	
    </script>
    ...
    ...
    ...
    </html>
    Thanks again.

  6. #6
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,090
    May you please confirm that you use those unusual hostnames (I mean: "cipta-linux2.ciptaonline", rather than something like "cipta-linux2.ciptaonline.com")?
    Setting the domain as just "ciptaonline" is not allowed by the browsers; this should cause a javascript error message; can you see an "Invalid argument" or similar message in your console?
    This would certainly prevent the pages from working.

    If this is the case, the "self.parent" setting is not involved in the problem; however, we still suggest you to check if "this.opener" would be more suitable.

  7. #7
    Member
    Join Date
    Aug 2007
    Location
    Jakarta
    Posts
    10
    Dario,
    May you please confirm that you use those unusual hostnames (I mean: "cipta-linux2.ciptaonline", rather than something like "cipta-linux2.ciptaonline.com")?

    In our current phase, Yes. Our current development domain is (only) "ciptaonline", and consequently the host address is "cipta-linux2.ciptaonline". Nevertheless, if this is what causes the problem, then why does it work for the master-push-page, and not for its derivatives' windows?

    About the "self.parent" vs. "self.opener", we'll try to implement and test your suggestion.
    Thanks again.

  8. #8
    Member
    Join Date
    Aug 2007
    Location
    Jakarta
    Posts
    10
    All,
    thanks for the helps. We managed to solve the problem by renaming our domain and adding the ".com" (which clearly signifies a valid domain. Doh!)

    -Gerald

 

 

Similar Threads

  1. Single Linux server with 2 IP addresses
    By anselme in forum General
    Replies: 4
    Last Post: March 30th, 2012, 09:37 AM
  2. Replies: 1
    Last Post: July 21st, 2011, 11:16 AM
  3. Replies: 1
    Last Post: January 14th, 2011, 09:35 AM
  4. Previous Data Lost
    By peaks2006@gmail.com in forum Client SDKs
    Replies: 1
    Last Post: October 6th, 2010, 10:18 AM
  5. Linux Production Settings
    By musaulker in forum General
    Replies: 1
    Last Post: December 21st, 2009, 11:02 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:56 PM.