Results 1 to 3 of 3
  1. #1

    Question Clarification of Node Adapter Setup

    Hi here!

    I've setup the LS server and it runs included demos. Now, I would like to add the Node adapter so I can start a real POC.

    However, some of the steps are not clear and I'm hitting some issues.

    For reference, I am following the steps here:

    First, the instructions say:

    copy the ChatAdapterNode directory and all of its files into the adapters folder.
    That is a bit misleading because the directory "lib" is empty and there's only one file called "adapters.xml". However, after doing more research it appears that only the config file is needed.

    Next, after adding the adapter from Github, the server doesn't start.

    waiting for a connection on port 8003
    I found if I start the remote node adapter demo it will trigger the server to finish starting. That's okay, but unfortunately, the remote adapter itself can't full start. Only the port 8003 is able to connect.

    $ node nodechat.js --host localhost --metadata_rrport 8003 --data_rrport 8001 --data_notifport 8002
    connect ECONNREFUSED
    connect ECONNREFUSED
    Question #1: How would we manage server deployments in production if the LS server won't start until a remote adapter tries to connect? It seems like you would need to always time the deployment of the adapter to match the LS server, which seems impossible.

    Question #2: The remote adapter demo won't fully start (as noted above) because it can't connect to the LS server on all ports. If both the LS server and adapter are dependent on each other to start it seems it will never work.

    Question #3: Is there an updated sample for Node JS or some additional steps that I'm missing?

  2. #2
    Join Date
    Feb 2012
    Hi Matt,

    I'm sorry that the instructions have been somewhat misleading for you.

    In fact, in case of remote adapter deployment, in the folder there is only the configuration file with the information for the connection of the remote counterparts.
    Contrary to what happens with in-process adapters which also contain all the necessary libraries. We used the same phrase in the instructions for both cases.

    About the connection errors you see, these aren't really fatal errors. In fact, the logic of the adapter is to launch the connection procedure for all three ports at the same time.
    But at the beginning the server waits only on 8003, the metadata, when this is connected, opens the listening also on the Data Adapter ports 8001 and 8002.
    What happens in the adapter is that in the first attempt only the connection to port 8003 succeeds while the other two print the error messages.
    But on the second attempt they succeed too and the server can start (see this piece of code:

    Maybe there is missing a message to the console that informs of connection success; I will add it.

    Now your questions:

    1. This depend on how the Proxy Adapter is configured in the Lightstreamer server side.
    There exist two flavors of Proxy MetaData Adapter: PROXY_FOR_REMOTE_ADAPTER (non-robust) and ROBUST_PROXY_FOR_REMOTE_ADAPTER (robust).
    In case of non-robust the Lightstreamer server not to start accepting client sessions until all Remote Adapters connect.
    In case of robust, the Lightstreamer server after a configurable timeout starts anyway.
    For more details about robust configuration please refer here:

    2. No, The Lightstreamer server waits (for an indefinite time) for connection on all the tcp ports configured in the adapters.xml configuration file.
    When all are connected it can start.

    3. No, the example seems to work well anyway, but I'll update the console messaging to avoid confusion.


  3. #3
    Thank you for the reply! That makes sense now.



Similar Threads

  1. Replies: 2
    Last Post: May 29th, 2020, 10:29 AM
  2. Replies: 0
    Last Post: May 9th, 2013, 03:33 PM
  3. How to setup frequency control?
    By chanro4 in forum Client SDKs
    Replies: 4
    Last Post: January 19th, 2011, 09:29 AM
  4. Need to setup a local demo
    By kumar117 in forum General
    Replies: 3
    Last Post: June 11th, 2010, 09:45 AM
  5. Replies: 1
    Last Post: November 6th, 2008, 08:44 AM

Tags for this Thread


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