Page 3 of 3 FirstFirst 123
Results 21 to 30 of 30

Thread: Bind Error

  1. #21
    Member
    Join Date
    Feb 2009
    Location
    Pyrmont
    Posts
    25
    Hi again,

    I'm now trying to work on the real example on my machine and am coming across the same problem when I add the "environment" to the URL (local, uat, stage... etc).

    The set up is as follows:

    Domain: local.mysite.com
    Web: local.www.mysite.com
    Port: 8071
    Lighstreamer: local.lightstreamer.mysite.com
    Lightstreamer Port: 8090

    However I have a feeling that the entries in my host file conflicts with how the domain is being interpreted.

    127.0.0.1 local.mysite.com.au
    127.0.0.1 local.www.mysite.com.au
    127.0.0.1 local.lightstreamer.mysite.com.au
    127.0.0.1 local.www.lightstreamer.mysite.com.au

    This is what I have on the client side:

    <script language="JavaScript" src="http://local.www.mysite.com.au:8071/lightstreamer/js/lscommons.js"></script>
    <script language="JavaScript" src="http://local.www.mysite.com.au:8071/lightstreamer/js/lspushpage.js"></script>

    <div table="hellotable" item="item-test" field="field1">
    loading...
    </div>

    <script>
    var page = new PushPage();
    page.context.setDomain("local.www.mysite.com.au");
    page.onEngineCreation = function(engine) {
    engine.context.setDebugAlertsOnClientError(true);
    engine.connection.setLSHost("local.www.lightstream er.mysite.com.au");
    engine.connection.setLSPort(8090);
    engine.connection.setAdapterName("PROXY_HELLOWORLD _SOCKETS");
    engine.changeStatus("STREAMING");
    }
    page.bind();
    page.createEngine("HelloWorldApp", "lightstreamer/js", "SHARE_SESSION");

    var pushtable = new OverwriteTable(null, null, "MERGE");
    pushtable.setPushedHtmlEnabled(true);
    pushtable.setSnapshotRequired(true);
    page.addTable(pushtable, "hellotable");
    </script>


    I also noticed that I needed to specifically put the "www" in the page domain and lightstreamer host.

    Many Thanks,

    C

  2. #22
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    given that your web server is reached throug local.www.mysite.com and that your lightstreamer server is reached through local.lightstreamer.mysite.com, you can't use local.mysite.com as domain as it doesn't match neither host.

    Hosts and domain must respect the "same origin policy".
    So you should use as domain only mysite.com.

    If you prefer/need a longer domain, another possibility is the following:
    Web Server: www.local.mysite.com
    Lightstreamer Server: lightstreamer.local.mysite.com
    Domain: local.mysite.com

    Hope that helps.

    Note that Opera poses further limits to this policy. Check these thread for details: http://www.lightstreamer.com/vb/showthread.php?t=28 and http://www.lightstreamer.com/vb/showthread.php?t=96

  3. #23
    Member
    Join Date
    Feb 2009
    Location
    Pyrmont
    Posts
    25
    Hi Mone,

    Thanks for your reply. Unfortunately, we're unable to change the way the URL is constructed for our web app. I don't envisage the domain issue to be a problem when we go live, but we would require users to test on the UAT and Stage environments before we go live.

    Is there another way in which we could keep the subdomain "www" in the URL (local.www.mysite.com)?

    I've also tried:

    domain: local.www.mysite.com, local.mysite.com
    web: web.local.www.mysite.com, web.local.mysite.com
    lightstreamer: lighstreamer.local.www.mysite.com, lighstreamer.local.mysite.com

    Many Many Thanks,

    C

  4. #24
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    972
    I can't understand why sometimes you use host/domain names that end with ".com.au" and sometimes you use names that end with ".com".
    May you also clarify which constraints your application server imposes you on the names you can use? Does it also affect the generation of javascript code?

    Referring to the above client code, setting
    Code:
    page.context.setDomain("mysite.com.au");
    should work.
    Moreover, as the domain is only a pattern, you don't need a hosts file entry for the domain name.

  5. #25
    Member
    Join Date
    Feb 2009
    Location
    Pyrmont
    Posts
    25
    Hi Dario,

    Sorry that was just a typo - I was removing the name of actual site that I'm working on. So for this case, I've tried to keep it generic to mysite.com.
    Just to clarify, I use the hosts file for testing locally (as the site is currently live, but without the new functionality I'm currently working on).

    When we go live with the new functionality, there shouldn't be a problem with using:

    Site: mysite.com
    Web: www.mysite.com
    Lightstreamer: lightstreamer.mysite.com

    The problem arises when we include the environment (local, uat, stage) and "www" in the URL, such as local.www.mysite.com.

    Is there something else I need to do for this to work?

    Many Thanks,

    C

  6. #26
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    972
    Setting the domain to "mysite.com" should work also with longer hostnames, provided that all of them end in "mysite.com".
    Did you try it and find any problems?
    Or is the "mysite.com" domain name unacceptable in your testing environment?

    The name combinations that you reported should work as well.
    I Refer to:
    domain: local.www.mysite.com
    web: web.local.www.mysite.com
    lightstreamer: lighstreamer.local.www.mysite.com
    domain: local.mysite.com
    web: web.local.mysite.com
    lightstreamer: lighstreamer.local.mysite.com
    If you had them not working, then the problem may no longer be related to domain name choice.
    Please concentrate on one of the above cases and provide us with more detais.

  7. #27
    Member
    Join Date
    Feb 2009
    Location
    Pyrmont
    Posts
    25
    Hello,

    I managed to get it working with the following:

    domain: mysite.com
    web: local.www.mysite.com
    lightstreamer: lightstreamer.mysite.com

    The site that I work on dynamically builds the location of files that are placed in a "static" file directory to be in the site root directory (i.e. mysite.com/).
    The problem turned out the html files in the ls directory (mysite.com/ls) were not getting resolved properly (ie. not resolved to be in mysite.com/ls).

    Thanks for all your help

  8. #28
    Member
    Join Date
    Jun 2008
    Location
    Seattle
    Posts
    6
    Hi.

    I've read this thread and a couple more regarding "Unable to find the engine", but I still have a problem. I have LS and an IIS 6 webserver on the same machine. LS is under the default 8080 port. My Data Adapter is a C# adapter successfully opening the TCP ports specified in adapters.xml when started.

    These are my configs:

    Hosts file:
    127.0.0.1 localhost
    127.0.0.1 archtst1.test.alaskaair.com
    127.0.0.1 push.archtst1.test.alaskaair.com

    Client script:

    <script type="text/javascript">
    var page = new PushPage();
    page.context.setDomain("archtst1.test.alaskaair.co m");
    page.onEngineCreation = startEngine;
    page.bind();
    page.createEngine("CBOFlightPublisher", "JSLib", "SHARE_SESSION");

    function startEngine(engine)
    {
    engine.connection.setAdapterName("LSADAPTERDEMO");
    engine.changeStatus("STREAMING");
    engine.connection.setLSHost("push.archtst1.test.al askaair.com");
    engine.connection.setLSPort("8080");
    }

    var pushtable = new OverwriteTable(null, null, "MERGE");
    page.addTable(pushtable, "EventTargetTable");
    </script>

    Any feedback will be most appreciated.
    -Guillermo

  9. #29
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    hi Guillermo, please see my reply in the other thread.

  10. #30
    Member
    Join Date
    Feb 2009
    Location
    Pyrmont
    Posts
    25
    Hi Guillermo,

    Try putting these host entries:
    127.0.0.1 localhost
    127.0.0.1 alaskaair.com
    127.0.0.1 test.alaskaair.com
    127.0.0.1 archtst1.test.alaskaair.com
    127.0.0.1 push.alaskaair.com

    If it helps, this was what I had:

    127.0.0.1 local.mysite.com
    127.0.0.1 local.www.mysite.com
    127.0.0.1 lightstreamer.mysite.com
    127.0.0.1 lightstreamer.www.mysite.com

    And the javascript was set up like this:

    var page = new PushPage();
    page.context.setDomain("mysite.com"); //for you, try: alaskaair.com

    //create the engine
    page.onEngineCreation = function(engine) {
    engine.context.setDebugAlertsOnClientError(true);
    engine.connection.setLSHost("lightstreamer.mysite.com"); //for your case try: push.alaskaair.com
    engine.connection.setLSPort(8090); //for your case 8080
    engine.connection.setAdapterName("MyAdapter"); //change to your required adapter
    engine.changeStatus("STREAMING");
    }
    page.bind();
    page.createEngine("MyApp", "http://local.www.mysite.com/LS", "SHARE_SESSION"); //for your case, http://archtst1.test.alaskaair.com/JSLib or move the JS files to http://archtst1.test.alaskaair.com/LS

    Hope that helps!

    C

 

 

Similar Threads

  1. Replies: 6
    Last Post: March 26th, 2010, 04:09 PM
  2. Replies: 1
    Last Post: August 6th, 2008, 11:05 AM
  3. ER bind problem
    By gerald.logor in forum Client APIs
    Replies: 5
    Last Post: April 18th, 2008, 08:46 AM
  4. ER bind Unable to find the Engine
    By eduramires in forum Client APIs
    Replies: 3
    Last Post: February 4th, 2008, 09:14 AM
  5. ER bind Unable to find the Engine
    By eduramires in forum General
    Replies: 1
    Last Post: January 29th, 2008, 05:03 PM

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