Results 1 to 10 of 30

Thread: Bind Error

Hybrid View

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

    I've been reading some of the posts regarding bind errors - mostly around setting hostnames and domain names.

    I've set up an web server + lightstreamer server on the same machine with:

    web server domain name: mysite.com
    lightstreamer server: lightstreamer.mysite.com
    lightstreamer server port: 8090

    I've managed to have a page served from the web server working on Firefox and Chrome, but I'm having trouble with IE6 and IE7 - I get the following error "ER bind Unable to find the Engine. Retrying. If the problem persists, please check your configuration."

    This is what I've set up:


    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>mysite.com</title>
    <script language="JavaScript" src="ls/lscommons.js"></script>
    <script language="JavaScript" src="ls/lspushpage.js"></script>
    </head>
    <body>

    <div class="fieldA" source="lightstreamer" table="mytable" item="theItem" field="fieldA">
    LOADING...
    </div>

    <div class="fieldB"source="lightstreamer" table="mytable" item="theItem" field="fieldB">
    LOADING...
    </div>

    <script type="text/javascript">

    var page = new PushPage();
    page.context.setDomain("mysite.com");
    page.onEngineCreation = function(engine) {
    engine.context.setDebugAlertsOnClientError(true);

    engine.connection.setLSHost("lightstreamer.mysite. com");
    engine.connection.setLSPort(8090);
    engine.connection.setAdapterName("MYSITE");
    engine.changeStatus("STREAMING");
    }
    page.bind();
    page.createEngine("MySiteApp", "ls", "SHARE_SESSION");

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

    </body>
    </html>


    From the JS API (http://www.lightstreamer.com/docs/cl...html#setDomain) - I've set the domain to be null for IE, but with no luck.

    Just wondering if I'm missing something?

    Many Thanks,

    C

  2. #2
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    hi,

    the problem with IE is that your web server is equal to your domain name.
    you should extend your web server name to let the application run on IE:

    web server: web.mysite.com
    domain name:
    mysite.com
    lightstreamer server: lightstreamer.mysite.com
    lightstreamer server port: 8090

    Hope that helps

  3. #3
    Member
    Join Date
    Feb 2009
    Location
    Pyrmont
    Posts
    25
    Thanks! It worked

    Just a note if anyone is testing this locally, I updated my hosts file with the 3 domains mentioned below.

    127.0.0.1 mysite.com
    127.0.0.1 web.mysite.com
    127.0.0.1 lightstreamer.mysite.com

  4. #4
    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

  5. #5
    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

  6. #6
    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

  7. #7
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,091
    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.

 

 

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 SDKs
    Replies: 5
    Last Post: April 18th, 2008, 08:46 AM
  4. ER bind Unable to find the Engine
    By eduramires in forum Client SDKs
    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 06:01 PM.