Page 1 of 3 123 LastLast
Results 1 to 10 of 24
  1. #1
    Member
    Join Date
    Jan 2011
    Location
    Plainfield
    Posts
    13

    RTD Demo will not connect to Lightstreamer Server

    Hello,

    We are having some difficulty connecting the RTD server to our Lightstreamer server.

    I've changed the pushServerHost and the pushServerPort in RtdServer.cs as well as added some login credentials using connInfo object (User, Password), however we cannot connect to our Lightstreamer server.

    The UI loads and hangs connecting to the RTD server. Is there anything else necessary to specify to connect or some way to enable more debugging output on our Lightstreamer server to help see if the connection attempt is being made and/or what info is being passed in?

  2. #2
    Member
    Join Date
    Jul 2010
    Location
    Trento
    Posts
    12
    Hi,
    we would like to know more info about your issue.
    First of all, is the RTD server running locally, or is it on a remote computer?

    The demo is meant to be run locally (both server and client).
    If you plan to use a remote RTD server, you need to decouple the server part of the library from the client part, which is actually outside the scope of the demo itself.

    Once you've moved the server part to a separate library, you need to install it on the server machine and register against DCOM (the .dll will be a COM resource).
    Same thing for the client part, you need to write and register it on every client in which your RTD service should be available.

  3. #3
    Member
    Join Date
    Jan 2011
    Location
    Plainfield
    Posts
    13
    Quote Originally Posted by lxnay
    Hi,
    we would like to know more info about your issue.
    First of all, is the RTD server running locally, or is it on a remote computer?

    The demo is meant to be run locally (both server and client).
    If you plan to use a remote RTD server, you need to decouple the server part of the library from the client part, which is actually outside the scope of the demo itself.

    Once you've moved the server part to a separate library, you need to install it on the server machine and register against DCOM (the .dll will be a COM resource).
    Same thing for the client part, you need to write and register it on every client in which your RTD service should be available.
    It is running locally - at this point we are just trying to get the RTD Demor to connect to our Lightstreamer server and receive updates from it.

    From the readme it appears this should be as simple as changing the pushServerHostURL and setting the appropriate port. I've changed this and added some login credentials to the LightstreamerClient.Start method so that it should successfully connect to our Lightstreamer server, but this does not appear to be successful.

    When the UI loads the connection is started but we don't appear to progress past
    Code:
    new ThreadStart(delegate() { lsClient.Start(pushServerUrl); }).Invoke();
    in RtdServer.ServerStart(). I put an output before the call to the Start method and after and we never reach the second output. Excel eventually throws a dialog that it is waiting for another task to complete an OLE operation.

  4. #4
    Member
    Join Date
    Jul 2010
    Location
    Trento
    Posts
    12
    It looks like a network issue (firewall?).
    Please have a look using wireshark and see what's going on at the NIC level.

  5. #5
    Member
    Join Date
    Jan 2011
    Location
    Plainfield
    Posts
    13
    Quote Originally Posted by lxnay
    It looks like a network issue (firewall?).
    Please have a look using wireshark and see what's going on at the NIC level.
    Sorry it took so long to reply - I got caught up doing other things. Firewall is disabled to rule out potential issues there. Wireshark doesn't show a single outgoing packet headed to the server. I've specified the URL as both a FQDN and IP (in case name resolution was failing for some reason) and still don't see any packets heading for the destination as expected.

  6. #6
    Member
    Join Date
    Jul 2010
    Location
    Trento
    Posts
    12
    Just a question and a request, if possible.
    Question: what do you mean with "I've changed this and added some login credentials to the LightstreamerClient.Start method so that it should successfully connect to our Lightstreamer server". What login credentials? Are you talking about HTTP AUTH? Can I have a code snippet that shows how you did that? Are you running behind a proxy? Please note anyway that all this is outside the scope of our, very simple demo.
    Request: Could I have a diff between the demo code and your changes, or alternatively, could you attach your code here?

    Thanks

  7. #7
    Member
    Join Date
    Jan 2011
    Location
    Plainfield
    Posts
    13
    Quote Originally Posted by lxnay
    Just a question and a request, if possible.
    Question: what do you mean with "I've changed this and added some login credentials to the LightstreamerClient.Start method so that it should successfully connect to our Lightstreamer server". What login credentials? Are you talking about HTTP AUTH? Can I have a code snippet that shows how you did that? Are you running behind a proxy? Please note anyway that all this is outside the scope of our, very simplified demo.
    Request: Could I have a diff between the demo code and your changes, or alternatively, could you attach your code here?

    Thanks
    Changed in rtdserver.cs

    Code:
         private const string pushServerHost = "http://ourhostname.here";
            // port, if different from 80
            private const string pushServerPort = "80";
    Changed in LightstraemerClient.CS:Start(string pushServerUrl)

    Code:
                // Added login credentials
                connInfo.User = "myUsername";
                connInfo.Password = "myPassword";

    I've added some output to RtdServer.cs:ServerStart(IRTDUpdateEvent CallbackObject) to verify the url it is using to instantiate the connection as well as when it passes - we never reach "Exited Connection".

    Code:
                flowForm.AppendExcelLog("Connecting to " + pushServerUrl);
                new ThreadStart(delegate() { lsClient.Start(pushServerUrl); }).Invoke();
                flowForm.AppendExcelLog("Exited Connection");
    We are not running behind any sort of proxy. All I am trying to do is get the RTD demo to connect to our lightstreamer server as it says it should be able to right in the README.

    Obviously you could test the application against your Lightstreamer server
    installed somewhere, but in this case, you have to recompile the source code
    after having changed "pushServerHost" and "pushServerPort" variables in
    RtdServer.cs.
    This is where the issue comes in to play. I don't see a single packet headed towards our server at all in wireshark, despite it seemingly being as simple as changing the host/port configuration and recompiling. The GUI launches fine and it says it's connecting to the appropriate host/port but I see no traffic in wireshark backing this up.

    If you'd like to supply an email I can email the 2 changed files if you would like to see the full source. The only changes are detailed above though.

  8. #8
    Member
    Join Date
    Jul 2010
    Location
    Trento
    Posts
    12
    Thanks,
    I'll have a look at the issue in the next 24/48 hours (hopefully even before).
    In the meantime, you could send us the source (please strip off sensible information from it) at support@lightstreamer.com

    Regards,

  9. #9
    Member
    Join Date
    Jan 2011
    Location
    Plainfield
    Posts
    13
    Quote Originally Posted by lxnay
    Thanks,
    I'll have a look at the issue in the next 24/48 hours (hopefully even before).
    In the meantime, you could send us the source (please strip off sensible information from it) at support@lightstreamer.com

    Regards,
    Sent as requested.

  10. #10
    Member
    Join Date
    Jul 2010
    Location
    Trento
    Posts
    12
    Thanks for your patience,
    I just reviewed your changes and didn't see anything that could cause the freeze on the connection attempt (the socket in use is a blocking socket, hence the freeze if the server cannot be reached, until timeout, which is set at ~30 seconds by default).
    I have two suspects by the way:
    1. The server cannot be reached, might be some firewall? Can you reach the server from the browser (just connect to the same URL)
    2. More probable: you are not using your re-compiled .dll. You probably installed the demo and your Visual Studio is not overriding registry settings created by the demo installation. This is easy to fix, just open the registry editor (regedit) and look for the following keys:

    - HKEY_CLASSES_ROOT\CLSID\{2368E0E6-1ED6-3C39-8FAE-45B4A9FB53F3}\InprocServer32\CodeBase
    - HKEY_CLASSES_ROOT\CLSID\{2368E0E6-1ED6-3C39-8FAE-45B4A9FB53F3}\InprocServer32\1.0.0.0\CodeBase

    [or just search through the whole registry for RTDLibraryExcelDemo.dll]

    Make sure to overwrite the .dll at the path contained in the keys above or provide a valid path to your .dll by changing those default values.

 

 

Similar Threads

  1. Could not connect to light streamer server
    By bponnappan in forum Adapter APIs
    Replies: 1
    Last Post: July 5th, 2012, 10:38 AM
  2. Replies: 3
    Last Post: November 14th, 2011, 10:33 AM
  3. Connect to LightStreamer with NodeJS
    By afshinmeh in forum Client APIs
    Replies: 1
    Last Post: October 6th, 2011, 07:31 PM
  4. Can't connect to lightstreamer in firefox
    By chuan_ckc in forum Client APIs
    Replies: 9
    Last Post: August 25th, 2009, 06:16 AM
  5. Replies: 1
    Last Post: February 22nd, 2008, 09:54 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 08:28 AM.