Page 1 of 3 123 LastLast
Results 1 to 10 of 24
  1. #1
    Power Member
    Join Date
    Sep 2013
    Location
    Coimbatore
    Posts
    103

    Unexpected error in notifyUser

    PHP Code:
    03-Jul-20 07:23:00,595|INFO |L.requests         |SERVER POOLED THREAD 5     |Serving request: /lightstreamer/create_session.js --> LS_op2=create&LS_phase=7175&LS_cause=failure.status0&LS_polling=true&LS_polling_millis=0&LS_idle_millis=0&LS_cid=pcYgxn8m8 feOojyA1T661j3g2.pz479h7m&LS_adapter_set=WLSTOCKLIST_REMOTE&LS_container=lscon "Lightstreamer HTTP Server" from 1.23.1.245:6296203-Jul-20 07:23:00,595|ERROR|L.requests         |SERVER POOLED THREAD 5     |Unexpected error in notifyUser:  Connection closed while facing request d9000001731456c5df:03-Jul-20 07:23:00,595|ERROR|L.connections      |SERVER POOLED THREAD 5     |Failure in request processingExternal error while managing the requestUnexpected error in notifyUser:  Connection closed while facing request d9000001731456c5df
    I have installed LS server in Linux centos 7 and I have started LS server and my remoter adapter. When I check connecting LS server and adapter with my client it's showing the error like

    • Request URL:
      http://209.59.158.15:8080/lightstreamer/create_session.js
    • Request Method:
      POST
    • Status Code:
      500 Internal Server Error
    • Remote Address:
      209.59.158.15:8080


      My notifyuser method looks like,
      PHP Code:
      public void notifyUser(String userString passwordMap<StringStringhttpHeadersthrows AccessException {        String origin httpHeaders.get("origin");        String un httpHeaders.get("username");
              if ((
      origin == null) || VALUES.contains(origin)) {            if ((un == null) || !un.equalsIgnoreCase("lmxwinbulllite")) {                throw new AccessException("Invalid User Access");            }        } else {            if ((un == null) || !un.equalsIgnoreCase("lmxwinbullliteapp")) {                throw new AccessException("Invalid User Access");            }        }
          } 

    Can you please help me on this what might be the issue?

  2. #2
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    575
    Hi,

    First I would check if http headers are actually present in the request and reach your adapter.
    Can you add some logs to your adapter to view the values for origin and un?

  3. #3
    Power Member
    Join Date
    Sep 2013
    Location
    Coimbatore
    Posts
    103
    In my client I have added,
    var lsClient = new LightstreamerClient(lsdata.url,lsdata.adapter);
    lsClient.connectionOptions.setHttpExtraHeaders({"u sername" : lsdata.username});
    lsClient.connectionOptions.setHttpExtraHeadersOnSe ssionCreationOnly(true);
    lsClient.connect();
    return lsClient;
    Lightstreamer.log
    03-Jul-20 06:50:22,136|INFO |L.requests |SERVER POOLED THREAD 3 |Serving request: /lightstreamer/create_session.js --> LS_op2=create&LS_phase=7633&LS_cause=failure.statu s0&LS_polling=true&LS_polling_millis=0&LS_idle_mil lis=0&LS_cid=pcYgxn8m8 feOojyA1T661j3g2.pz479h7m&LS_adapter_set=WLSTOCKLI ST_REMOTE&LS_container=lsc& on "Lightstreamer HTTP Server" from 1.23.1.245:60401
    03-Jul-20 06:50:22,137|ERROR|L.requests |SERVER POOLED THREAD 3 |Unexpected error in notifyUser: Connection closed while facing request 4f0000001731374a7e4:
    03-Jul-20 06:50:22,137|ERROR|L.connections |SERVER POOLED THREAD 3 |Failure in request processing: External error while managing the request: Unexpected error in notifyUser: Connection closed while facing request 4f0000001731374a7e4.
    03-Jul-20 06:50:27,131|INFO |L.requests |SERVER POOLED THREAD 3 |Serving request: /lightstreamer/create_session.js --> LS_op2=create&LS_phase=7635&LS_cause=nullresp&LS_p olling=true&LS_polling_millis=0&LS_idle_millis=0&L S_cid=pcYgxn8m8 feOojyA1T661j3g2.pz479h7m&LS_adapter_set=WLSTOCKLI ST_REMOTE&LS_container=lsc& on "Lightstreamer HTTP Server" from 1.23.1.245:60405
    03-Jul-20 06:50:27,131|ERROR|L.requests |SERVER POOLED THREAD 3 |Unexpected error in notifyUser: Connection closed while facing request 4f1000001731374a7e4:
    03-Jul-20 06:50:27,131|ERROR|L.connections |SERVER POOLED THREAD 3 |Failure in request processing: External error while managing the request: Unexpected error in notifyUser: Connection closed while facing request 4f1000001731374a7e4.
    03-Jul-20 06:50:32,140|INFO |L.requests |SERVER POOLED THREAD 3 |Serving request: /lightstreamer/create_session.js --> LS_op2=create&LS_phase=7637&LS_cause=nullresp&LS_p olling=true&LS_polling_millis=0&LS_idle_millis=0&L S_cid=pcYgxn8m8 feOojyA1T661j3g2.pz479h7m&LS_adapter_set=WLSTOCKLI ST_REMOTE&LS_container=lsc& on "Lightstreamer HTTP Server" from 1.23.1.245:60409
    03-Jul-20 06:50:32,140|ERROR|L.requests |SERVER POOLED THREAD 3 |Unexpected error in notifyUser: Connection closed while facing request 4f2000001731374a7e4:
    03-Jul-20 06:50:32,140|ERROR|L.connections |SERVER POOLED THREAD 3 |Failure in request processing: External error while managing the request: Unexpected error in notifyUser: Connection closed while facing request 4f2000001731374a7e4.
    03-Jul-20 06:50:37,143|INFO |L.requests |SERVER POOLED THREAD 3 |Serving request: /lightstreamer/create_session.js --> LS_op2=create&LS_phase=7639&LS_cause=nullresp&LS_p olling=true&LS_polling_millis=0&LS_idle_millis=0&L S_cid=pcYgxn8m8 feOojyA1T661j3g2.pz479h7m&LS_adapter_set=WLSTOCKLI ST_REMOTE&LS_container=lsc& on "Lightstreamer HTTP Server" from 1.23.1.245:60414
    03-Jul-20 06:50:37,143|ERROR|L.requests |SERVER POOLED THREAD 3 |Unexpected error in notifyUser: Connection closed while facing request 4f3000001731374a7e4:
    03-Jul-20 06:50:37,143|ERROR|L.connections |SERVER POOLED THREAD 3 |Failure in request processing: External error while managing the request: Unexpected error in notifyUser: Connection closed while facing request 4f3000001731374a7e4.
    03-Jul-20 06:50:42,138|INFO |L.requests |SERVER POOLED THREAD 3 |Serving request: /lightstreamer/create_session.js --> LS_op2=create&LS_phase=7641&LS_cause=nullresp&LS_p olling=true&LS_polling_millis=0&LS_idle_millis=0&L S_cid=pcYgxn8m8 feOojyA1T661j3g2.pz479h7m&LS_adapter_set=WLSTOCKLI ST_REMOTE&LS_container=lsc& on "Lightstreamer HTTP Server" from 1.23.1.245:60420
    03-Jul-20 06:50:42,138|ERROR|L.requests |SERVER POOLED THREAD 3 |Unexpected error in notifyUser: Connection closed while facing request 4f4000001731374a7e4:
    03-Jul-20 06:50:42,139|ERROR|L.connections |SERVER POOLED THREAD 3 |Failure in request processing: External error while managing the request: Unexpected error in notifyUser: Connection closed while facing request 4f4000001731374a7e4.
    03-Jul-20 06:50:47,145|INFO |L.requests |SERVER POOLED THREAD 3 |Serving request: /lightstreamer/create_session.js --> LS_op2=create&LS_phase=7643&LS_cause=nullresp&LS_p olling=true&LS_polling_millis=0&LS_idle_millis=0&L S_cid=pcYgxn8m8 feOojyA1T661j3g2.pz479h7m&LS_adapter_set=WLSTOCKLI ST_REMOTE&LS_container=lsc& on "Lightstreamer HTTP Server" from 1.23.1.245:60426
    03-Jul-20 06:50:47,145|ERROR|L.requests |SERVER POOLED THREAD 3 |Unexpected error in notifyUser: Connection closed while facing request 4f5000001731374a7e4:
    03-Jul-20 06:50:47,145|ERROR|L.connections |SERVER POOLED THREAD 3 |Failure in request processing: External error while managing the request: Unexpected error in notifyUser: Connection closed while facing request 4f5000001731374a7e4.
    03-Jul-20 06:50:52,129|INFO |L.requests |SERVER POOLED THREAD 3 |Serving request: /lightstreamer/create_session.js --> LS_op2=create&LS_phase=7645&LS_cause=nullresp&LS_p olling=true&LS_polling_millis=0&LS_idle_millis=0&L S_cid=pcYgxn8m8 feOojyA1T661j3g2.pz479h7m&LS_adapter_set=WLSTOCKLI ST_REMOTE&LS_container=lsc& on "Lightstreamer HTTP Server" from 1.23.1.245:60432
    03-Jul-20 06:50:52,129|ERROR|L.requests |SERVER POOLED THREAD 3 |Unexpected error in notifyUser: Connection closed while facing request 4f6000001731374a7e4:
    03-Jul-20 06:50:52,129|ERROR|L.connections |SERVER POOLED THREAD 3 |Failure in request processing: External error while managing the request: Unexpected error in notifyUser: Connection closed while facing request 4f6000001731374a7e4.
    03-Jul-20 06:50:54,928|INFO |streamerMonitorText|Timer-1 |Total threads = 96, Total heap = 62914560 (free = 43982112), Sessions = 1 (max = 2, refused = 0), New sessions = [+0, -0], Connections = 1 (max = 11), New connections = [+22, -22], In-pool threads = 32, Active threads = 0, Available threads = 32, Queued tasks = 0, Pool queue wait = 0, NIO write queue = 0, NIO write queue wait = 0, NIO write selectors = 4, NIO total selectors = 16, Subscribed items = 9 (for 9 subscriptions), Inbound throughput = 12.99 updates/s (pre-filtered = 12.99), Outbound throughput = 2.5 updates/s (1.77 kbit/s, max = 7.16), Lost updates = 0 (total = 0), Total bytes sent = 378910, Client messages throughput = 0 msgs/s (0 kbit/s, max = 0.08), Total messages handled = 5, Extra sleep = 0, Notify delay = 0

  4. #4
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    575
    Please could you leverage the following log settings:

    <logger name="LightstreamerLogger.connections" level="DEBUG"/>
    <logger name="LightstreamerLogger.connections.http" level="DEBUG"/>

    With these changes you will be able to verify the http headers of the client requests.
    Please also note that the log will be very verbose, so use them only for a while during your tests.

  5. #5
    Power Member
    Join Date
    Sep 2013
    Location
    Coimbatore
    Posts
    103
    Hello,
    I think my adapter is not running correctly by using my sh script.
    In my windows machine batch file for my adapter running is,
    TITLE WINBULLLITE
    set cpath=D:/Lightstreamer/adapters/WINLITERemoteStockList/classes/ls-adapter-remote.jar;D:/Lightstreamer/adapters/WINLITERemoteStockList/classes/java-json.jar;D:/Lightstreamer/adapters/WINLITERemoteStockList/classes/jedis.jar;D:/Lightstreamer/adapters/WINLITERemoteStockList/classes/gson.jar;D:/Lightstreamer/adapters/WINLITERemoteStockList/classes/LS_quote_feed_simulator.jar
    set class=stocklist.server.ServerMain


    set command=java -cp %cpath% %class% -host localhost -metadata_rrport 6722 -data_rrport 6720 -data_notifport 6721


    %command%
    pause
    Same above bat file I have converted as
    set cpath=/home/postnammauzhavan/Lightstreamer/adapters/WINLITERemoteStockList/classes/ls-adapter-remote.jar:/home/postnammauzhavan/Lightstreamer/adapters/WINLITERemoteStockList/classes/jedis.jar:/home/postnammauzhavan/Lightstreamer/adapters/WINLITERemoteStockList/classes/gson.jar:/home/postnammauzhavan/Lightstreamer/adapters/WINLITERemoteStockList/classes/LS_quote_feed_simulator.jar
    set class=stocklist.server.ServerMain


    set command=java -cp $cpath $class -host localhost -metadata_rrport 6722 -data_rrport 6720 -data_notifport 6721


    $command
    sleep 10
    I have doubt whether I have converted script correct or not. And also I don't know the use of sleep 10.
    And finally I had run this sh script like bash linuxwinbulllite.sh & to run my sh script in background. Now I'm having doubt whether this is running or not. Could you please help me to check whether adapter is running whether without issue in centos 7. In windows OS I can check in batch window screen whether adapter running correct or not. But I don't know how to check in centos 7 by using putty.

    New log is,
    03-Jul-20 11:35:57,702|DEBUG|L.connections.http |SERVER POOLED THREAD 10 |Writing response:
    HTTP/1.1 500 Internal Server Error
    Server: Lightstreamer-Server/7.1.1 build 1973 (Lightstreamer Server - www.lightstreamer.com) COMMUNITY edition
    Date: Fri, 3 Jul 2020 15:35:57 GMT
    Content-Length: 0
    Connection: close
    Access-Control-Allow-Origin: http://www.bullionsoftware.com
    Access-Control-Allow-Credentials: true
    x-accel-buffering: no


    on "Lightstreamer HTTP Server" from 1.23.1.245:64933
    03-Jul-20 11:35:57,702|INFO |L.connections |SERVER POOLED THREAD 10 |Closed HTTP connection with internal cause code: 0 (Terminated) on "Lightstreamer HTTP Server" from 1.23.1.245:64933
    03-Jul-20 11:36:02,705|DEBUG|L.connections |r Lightstreamer HTTP Server|Socket accept from 1.23.1.245:64939
    03-Jul-20 11:36:02,705|INFO |L.connections |ACCEPT POOLED THREAD 3 |Accepted HTTP connection on "Lightstreamer HTTP Server" from 1.23.1.245:64939
    03-Jul-20 11:36:02,707|INFO |L.connections.http |ACCEPT POOLED THREAD 3 |Using charset ISO-8859-1 for content type application/x-www-form-urlencoded
    03-Jul-20 11:36:02,707|DEBUG|L.connections |ACCEPT POOLED THREAD 3 |Got simple body block of size 193
    03-Jul-20 11:36:02,707|DEBUG|L.connections.http |ACCEPT POOLED THREAD 3 |Parsing request:
    POST /lightstreamer/create_session.js HTTP/1.1
    Accept: */*
    Accept-Encoding: gzip, deflate
    Accept-Language: en-US,en;q=0.9,ta;q=0.8
    Connection: keep-alive
    Content-Length: 193
    Content-Type: application/x-www-form-urlencoded
    Host: 209.59.158.15:8080
    Origin: http://www.bullionsoftware.com
    Referer: http://www.bullionsoftware.com/win_trade/
    User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36
    username: lmxwinbulllite


    LS_op2=create&LS_phase=9629&LS_cause=nullresp&LS_p olling=true&LS_polling_millis=0&LS_idle_millis=0&L S_cid=pcYgxn8m8 feOojyA1T661j3g2.pz479h7m&LS_adapter_set=WLSTOCKLI ST_REMOTE&LS_container=lsc& on "Lightstreamer HTTP Server" from 1.23.1.245:64939
    03-Jul-20 11:36:02,707|DEBUG|L.connections |ACCEPT POOLED THREAD 3 |Processing push request:
    /lightstreamer/create_session.js on "Lightstreamer HTTP Server" from 1.23.1.245:64939
    03-Jul-20 11:36:02,709|INFO |L.requests |SERVER POOLED THREAD 8 |Serving request: /lightstreamer/create_session.js --> LS_op2=create&LS_phase=9629&LS_cause=nullresp&LS_p olling=true&LS_polling_millis=0&LS_idle_millis=0&L S_cid=pcYgxn8m8 feOojyA1T661j3g2.pz479h7m&LS_adapter_set=WLSTOCKLI ST_REMOTE&LS_container=lsc& on "Lightstreamer HTTP Server" from 1.23.1.245:64939
    03-Jul-20 11:36:02,712|ERROR|L.requests |SERVER POOLED THREAD 8 |Unexpected error in notifyUser: Connection closed while facing request 120000017315508cc0:
    03-Jul-20 11:36:02,712|INFO |L.connections |SERVER POOLED THREAD 8 |Failed request on "Lightstreamer HTTP Server" from 1.23.1.245:64939
    03-Jul-20 11:36:02,712|ERROR|L.connections |SERVER POOLED THREAD 8 |Failure in request processing: External error while managing the request: Unexpected error in notifyUser: Connection closed while facing request 120000017315508cc0.
    03-Jul-20 11:36:02,713|DEBUG|L.connections.http |SERVER POOLED THREAD 8 |Writing response:
    HTTP/1.1 500 Internal Server Error
    Server: Lightstreamer-Server/7.1.1 build 1973 (Lightstreamer Server - www.lightstreamer.com) COMMUNITY edition
    Date: Fri, 3 Jul 2020 15:36:02 GMT
    Content-Length: 0
    Connection: close
    Access-Control-Allow-Origin: http://www.bullionsoftware.com
    Access-Control-Allow-Credentials: true
    x-accel-buffering: no


    on "Lightstreamer HTTP Server" from 1.23.1.245:64939
    03-Jul-20 11:36:02,713|INFO |L.connections |SERVER POOLED THREAD 8 |Closed HTTP connection with internal cause code: 0 (Terminated) on "Lightstreamer HTTP Server" from 1.23.1.245:64939
    03-Jul-20 11:36:07,706|DEBUG|L.connections |r Lightstreamer HTTP Server|Socket accept from 1.23.1.245:64947
    03-Jul-20 11:36:07,707|INFO |L.connections |ACCEPT POOLED THREAD 3 |Accepted HTTP connection on "Lightstreamer HTTP Server" from 1.23.1.245:64947
    03-Jul-20 11:36:07,707|INFO |L.connections.http |ACCEPT POOLED THREAD 3 |Using charset ISO-8859-1 for content type application/x-www-form-urlencoded
    03-Jul-20 11:36:07,707|DEBUG|L.connections |ACCEPT POOLED THREAD 3 |Got simple body block of size 193
    03-Jul-20 11:36:07,707|DEBUG|L.connections.http |ACCEPT POOLED THREAD 3 |Parsing request:
    POST /lightstreamer/create_session.js HTTP/1.1
    Accept: */*
    Accept-Encoding: gzip, deflate
    Accept-Language: en-US,en;q=0.9,ta;q=0.8
    Connection: keep-alive
    Content-Length: 193
    Content-Type: application/x-www-form-urlencoded
    Host: 209.59.158.15:8080
    Origin: http://www.bullionsoftware.com
    Referer: http://www.bullionsoftware.com/win_trade/
    User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36
    username: lmxwinbulllite


    LS_op2=create&LS_phase=9631&LS_cause=nullresp&LS_p olling=true&LS_polling_millis=0&LS_idle_millis=0&L S_cid=pcYgxn8m8 feOojyA1T661j3g2.pz479h7m&LS_adapter_set=WLSTOCKLI ST_REMOTE&LS_container=lsc& on "Lightstreamer HTTP Server" from 1.23.1.245:64947
    03-Jul-20 11:36:07,707|DEBUG|L.connections |ACCEPT POOLED THREAD 3 |Processing push request:
    /lightstreamer/create_session.js on "Lightstreamer HTTP Server" from 1.23.1.245:64947
    03-Jul-20 11:36:07,708|INFO |L.requests |SERVER POOLED THREAD 8 |Serving request: /lightstreamer/create_session.js --> LS_op2=create&LS_phase=9631&LS_cause=nullresp&LS_p olling=true&LS_polling_millis=0&LS_idle_millis=0&L S_cid=pcYgxn8m8 feOojyA1T661j3g2.pz479h7m&LS_adapter_set=WLSTOCKLI ST_REMOTE&LS_container=lsc& on "Lightstreamer HTTP Server" from 1.23.1.245:64947
    03-Jul-20 11:36:07,709|ERROR|L.requests |SERVER POOLED THREAD 8 |Unexpected error in notifyUser: Connection closed while facing request 130000017315508cc0:
    03-Jul-20 11:36:07,709|INFO |L.connections |SERVER POOLED THREAD 8 |Failed request on "Lightstreamer HTTP Server" from 1.23.1.245:64947
    03-Jul-20 11:36:07,709|ERROR|L.connections |SERVER POOLED THREAD 8 |Failure in request processing: External error while managing the request: Unexpected error in notifyUser: Connection closed while facing request 130000017315508cc0.
    03-Jul-20 11:36:07,709|DEBUG|L.connections.http |SERVER POOLED THREAD 8 |Writing response:
    HTTP/1.1 500 Internal Server Error
    Server: Lightstreamer-Server/7.1.1 build 1973 (Lightstreamer Server - www.lightstreamer.com) COMMUNITY edition
    Date: Fri, 3 Jul 2020 15:36:07 GMT
    Content-Length: 0
    Connection: close
    Access-Control-Allow-Origin: http://www.bullionsoftware.com
    Access-Control-Allow-Credentials: true
    x-accel-buffering: no


    on "Lightstreamer HTTP Server" from 1.23.1.245:64947
    03-Jul-20 11:36:07,709|INFO |L.connections |SERVER POOLED THREAD 8 |Closed HTTP connection with internal cause code: 0 (Terminated) on "Lightstreamer HTTP Server" from 1.23.1.245:64947
    Last edited by rvkvino; July 3rd, 2020 at 04:44 PM.

  6. #6
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    575
    Hi,

    The server log confirms that http headers Origin and username are valued in the request parsed by the server.
    Please be sure that the values are something you expect.

    Code:
    Origin: http://www.bullionsoftware.com
    username: lmxwinbulllite
    About the Adapters, you could check the server log looking for messages regarding the remote adapters connections and initialization; something like this:

    Code:
    06-Jul-20 09:55:42,243|INFO |L.S.Q.transport * *|pool-2-thread-1 * * * * * *|Accepted connection (1) on the Notify socket on port 6662 from /127.0.0.1:58633
    06-Jul-20 09:55:42,243|INFO |L.S.Q.transport * *|pool-3-thread-1 * * * * * *|Accepted connection (1) on the Request/Reply socket on port 6661 from /127.0.0.1:58631
    06-Jul-20 09:55:42,243|INFO |L.S.transport * * *|pool-4-thread-1 * * * * * *|Accepted connection (1) on the Request/Reply socket on port 6663 from /127.0.0.1:58632
    06-Jul-20 09:55:42,259|INFO |L.S.Q.r.notify * * |OTE_ADAPTER Notify Receiver|Notify receiver 'STOCKLISTDEMO_REMOTE.QUOTE_ADAPTER-1' starting...
    06-Jul-20 09:55:42,274|INFO |L.S.Q.sender * * * |UOTE_ADAPTER Request Sender|Request sender 'STOCKLISTDEMO_REMOTE.QUOTE_ADAPTER-1' starting...
    06-Jul-20 09:55:42,276|INFO |L.S.Q.r.reply * * *|UOTE_ADAPTER Reply Receiver|Reply receiver 'STOCKLISTDEMO_REMOTE.QUOTE_ADAPTER-1' starting...
    06-Jul-20 09:55:42,278|INFO |L.S.sender * * * * |TDEMO_REMOTE Request Sender|Request sender 'STOCKLISTDEMO_REMOTE-1' starting...
    06-Jul-20 09:55:42,280|INFO |L.S.receiver.reply |TDEMO_REMOTE Reply Receiver|Reply receiver 'STOCKLISTDEMO_REMOTE-1' starting...
    06-Jul-20 09:55:42,282|INFO |L.S.Q.transport * *|pool-2-thread-1 * * * * * *|Connected (1) *on port 6662 from /127.0.0.1:58633
    06-Jul-20 09:55:42,282|INFO |L.S.Q.transport * *|pool-3-thread-1 * * * * * *|Connected (1) *on port 6661 from /127.0.0.1:58631
    06-Jul-20 09:55:42,282|INFO |L.S.Q.transport * *|pool-2-thread-1 * * * * * *|Stopped waiting on port 6662
    06-Jul-20 09:55:42,283|INFO |L.S.transport * * *|pool-4-thread-1 * * * * * *|Connected (1) *on port 6663 from /127.0.0.1:58632
    06-Jul-20 09:55:42,283|INFO |L.S.Q.transport * *|STDEMO_REMOTE.QUOTE_ADAPTER|Stopped waiting on port 6661
    06-Jul-20 09:55:42,284|INFO |L.S.Q.transport * *|pool-3-thread-1 * * * * * *|Stopped waiting on port 6661
    06-Jul-20 09:55:42,285|INFO |L.S.transport * * *|pool-4-thread-1 * * * * * *|Stopped waiting on port 6663
    06-Jul-20 09:55:42,285|INFO |L.S.transport * * *|it for STOCKLISTDEMO_REMOTE|Stopped waiting on port 6663
    06-Jul-20 09:55:42,285|INFO |L.S.Q.transport * *|STDEMO_REMOTE.QUOTE_ADAPTER|Connected
    06-Jul-20 09:55:42,289|INFO |L.S.transport * * *|it for STOCKLISTDEMO_REMOTE|Connected
    06-Jul-20 09:55:42,323|INFO |L.init * * * * * * |it for STOCKLISTDEMO_REMOTE|Finished loading Metadata Adapter for Adapter Set STOCKLISTDEMO_REMOTE
    06-Jul-20 09:55:42,333|INFO |L.init * * * * * * |STDEMO_REMOTE.QUOTE_ADAPTER|Finished loading Data Adapter STOCKLISTDEMO_REMOTE.QUOTE_ADAPTER
    Obviously in your case the names of the adapters and the ports number will be different.

    Regards,
    Giuseppe

  7. #7
    Power Member
    Join Date
    Sep 2013
    Location
    Coimbatore
    Posts
    103
    Hello,
    I have checked well in all the places I didn't use port 6661, 6662 and 6663
    I have used the port 6720, 6721 and 6722 and my adapter looks like,
    <?xml version="1.0"?>


    <adapters_conf id="WLSTOCKLIST_REMOTE">
    <metadata_adapter_initialised_first>N</metadata_adapter_initialised_first>
    <metadata_provider>
    <adapter_class>com.lightstreamer.adapters.remote.m etadata.RobustNetworkedMetadataProvider</adapter_class>
    <classloader>log-enabled</classloader>
    <param name="request_reply_port">6722</param>
    <param name="connection_recovery_timeout_millis">10000</param>
    <param name="first_connection_timeout_millis">10000</param>
    <param name="close_notifications_recovery">unneeded</param>
    </metadata_provider>
    <data_provider name="WLQUOTE_ADAPTER">
    <adapter_class>com.lightstreamer.adapters.remote.d ata.RobustNetworkedDataProvider</adapter_class>
    <classloader>log-enabled</classloader>
    <param name="request_reply_port">6720</param>
    <param name="notify_port">6721</param>
    <param name="connection_recovery_timeout_millis">10000</param>
    <param name="events_recovery">use_snapshot</param>
    </data_provider>


    </adapters_conf>
    And my adapter starting shell script file looks like,
    set cpath=/home/postnu/Lightstreamer/adapters/WINLITERemoteStockList/classes/ls-adapter-remote.jar:/home/postnu/Lightstreamer/adapters/WINLITERemoteStockList/classes/jedis.jar:/home/postnu/Lightstreamer/adapters/WINLITERemoteStockList/classes/gson.jar:/home/postnu/Lightstreamer/adapters/WINLITERemoteStockList/classes/LS_quote_feed_simulator.jar
    set class=stocklist.server.ServerMain


    set command=java -cp $cpath $class -host localhost -metadata_rrport 6722 -data_rrport 6720 -data_notifport 6721


    $command
    sleep 10

  8. #8
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    575
    Ok, you should check your server log looking for messages like these:

    Accepted connection (1) on the Notify socket on port 6721 from ...
    Accepted connection (1) on the Request/Reply socket on port 6720 from ...
    Accepted connection (1) on the Request/Reply socket on port 6722 from ...


    To be sure that your adapters can get started properly and connected to the server.

    Regards,
    Giuseppe

  9. #9
    Power Member
    Join Date
    Sep 2013
    Location
    Coimbatore
    Posts
    103
    I have checked and mentioned the log below,
    06-Jul-20 06:28:33,211|ERROR|L.connections |SERVER POOLED THREAD 10 |Failure in request processing: External error while managing the request: Unexpected error in notifyUser: Connection closed while facing request 1d80000017323535e3e.
    06-Jul-20 06:28:38,211|INFO |L.requests |SERVER POOLED THREAD 10 |Serving request: /lightstreamer/create_session.js --> LS_op2=create&LS_phase=6721&LS_cause=nullresp&LS_p olling=true&LS_polling_millis=0&LS_idle_millis=0&L S_cid=pcYgxn8m8 feOojyA1T661j3g2.pz479h7m&LS_adapter_set=WLSTOCKLI ST_REMOTE&LS_container=lsc& on "Lightstreamer HTTP Server" from 1.22.24.58:55214
    06-Jul-20 06:28:38,212|ERROR|L.requests |SERVER POOLED THREAD 10 |Unexpected error in notifyUser: Connection closed while facing request 1d90000017323535e3e:
    But I couldn't see Accepted connection (1) on the Notify socket on port 6721 from like this.

    But this same adapter working in my windows machine but not working in centos 7. Whether any changes need to do while running adapter in centos.
    Last edited by rvkvino; July 6th, 2020 at 11:53 AM.

  10. #10
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    575
    Have you tried launching the script from a shell? Have you noticed any error messages?

    However, an example of a java adapter launch script for linux that you can use as a reference can be found in the deploy.zip file here: https://github.com/Lightstreamer/Lig...ases/tag/1.4.0

 

 

Similar Threads

  1. Replies: 12
    Last Post: May 26th, 2014, 09:59 AM
  2. Error handling for: [Unexpected update for item]
    By tony99nyr in forum Adapter SDKs
    Replies: 3
    Last Post: April 7th, 2014, 09:29 AM
  3. Preventing user access after notifyUser call
    By sarbao in forum Adapter SDKs
    Replies: 2
    Last Post: March 3rd, 2014, 07:39 AM
  4. NotifyUser Header
    By milad.j in forum Adapter SDKs
    Replies: 1
    Last Post: November 4th, 2013, 09:23 AM
  5. Delay in notifyUser() causes erratic create_session behavior
    By brianjohnson in forum Adapter SDKs
    Replies: 2
    Last Post: April 5th, 2010, 12:02 PM

Tags for this Thread

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 03:47 AM.