Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1

    Connection Issues

    I have a project where I need to connect to a Lightstreamer server runing v7.0.3 3 and there is an issue with the client I am using, lightstreamer_ls-javase-client_4.3.0 (downgraded from v4.3.7 at the request of the support staff for the market I am connecting to).

    When I attempt to subscribe to their server my application just doesn’t connect or subscribe in any way, without any error messages or exceptions thrown. The threads just seem to die out. Wireshark shows a successful handshake and session ID receipt. There is an extensive thread on Gain Capitals forum ensuring me that my connection details and subscription methods are correct:

    http://faq.labs.gaincapital.com/topi...tion-problems/

    I am unsure how to proceed from this point, any help you could provide would be greatly appreciated. See attached code for reference.



    public void lightstreamerSubscription() { // TODO LIGHTSTREAMER LOGIN AND SUBSCRIPTION

    String[] items = new String[forexComMarketList.length];
    String[] fields = { "MarketId", "TickDate", "Bid", "Offer", "Price", "High", "Low" };

    for (int i = 0; i < items.length; i++) { // MARKET item LIST BUILD LOOP
    items[i] = String.join("", "PRICE.", forexComMarketList[i].marketID);
    }
    lsClient = new LightstreamerClient("https://push.cityindex.com/", "STREAMINGALL");
    lsClient.connectionDetails.setUser(forexComClientD ata.personalEmailAddress);
    lsClient.connectionDetails.setPassword(forexComCli entData.sessionToken);
    lsClientListener = new LightstreamerClientListener();
    lsClient.addListener(lsClientListener);
    lsClient.connect(); // TODO FIND OUT WHERE THIS THREAD IS DYING
    lsSub = new Subscription("MERGE", "PRICE.401484300", fields); // TODO REPLACE ARRAY
    lsSub.setRequestedSnapshot("yes");
    lsSub.setDataAdapter("PRICES");
    lsSubscriptionListener = new LightstreamerSubscriptionListener();
    lsSub.addListener(lsSubscriptionListener);
    lsClient.subscribe(lsSub);
    }

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

    I don't expect the library version to be a problem since 4.3.7 is also compatible with 7.0.x servers anyway.

    But you could try to leverage the debug logging of the client library; please make sure that your project has also this dependency:

    <dependency>
    <groupId>com.lightstreamer</groupId>
    <artifactId>java-system-out-log</artifactId>
    <version>1.0.2</version>
    </dependency>

    and add this line of code just before the LightstreamerClient initialization:

    LightstreamerClient.setLoggerProvider(new SystemOutLogProvider());

    That will produce the log of the client library, maybe will help find some clues about the problem.

    Regards,
    Giuseppe

  3. #3
    Apologies I thought I listed the project dependencies already.

    I am using Eclipse IDE Version: 2021-12 (4.22.0) Build id: 20211202-1639, overtop Java SE 17 on Windows 10. The project Maven dependencies I am using are: jackson-annotations_2.13.1, jackson-core_2.13.1, jackson-databind_2.13.1, lightstreamer_java-system-out.log_1.02, lightstreamer_ls-log-adapter-java_1.02, lightstreamer_ls-javase-client_4.3.0, slf4j-api_1.7.32, and slf4j-log4j12_1.7.32.

    And finally some debug information, thank you very much already!

    15.Jan.22 12:26:34,148|INFO |lightstreamer.actions|main|New client created
    15.Jan.22 12:26:34,170|INFO |lightstreamer.actions|main|Server Address value changed to https://push.cityindex.com/
    15.Jan.22 12:26:34,170|INFO |lightstreamer.actions|main|Adapter Set value changed to STREAMINGALL
    15.Jan.22 12:26:34,174|INFO |lightstreamer.actions|main|Forced Transport value changed to null
    15.Jan.22 12:26:34,174|INFO |lightstreamer.actions|main|User value changed to (removed my email address)
    15.Jan.22 12:26:34,175|INFO |lightstreamer.actions|main|Password value changed
    15.Jan.22 12:26:34,179|INFO |lightstreamer.actions|main|Connect requested
    Status: LIGHTSTREAMER CLIENT LISTENER STARTED
    15.Jan.22 12:26:34,187|DEBUG|lightstreamer.session|Session Thread <1>|Opening a new session and starting automatic reconnections
    15.Jan.22 12:26:34,191|DEBUG|lightstreamer.session|Session Thread <1>|SessionManager state change: OFF -> STREAMING_WS
    15.Jan.22 12:26:34,192|ERROR|lightstreamer.threads|Session Thread <1>|Uncaught exception
    15.Jan.22 12:26:34,193|DEBUG|lightstreamer.actions|main|Item list assigned: PRICE.401484300
    15.Jan.22 12:26:34,193|DEBUG|lightstreamer.actions|main|Fiel d list assigned: MarketId TickDate Bid Offer Price High Low
    15.Jan.22 12:26:34,194|DEBUG|lightstreamer.actions|main|Snap shot Required assigned: yes
    15.Jan.22 12:26:34,194|DEBUG|lightstreamer.actions|main|Adap ter Set assigned: PRICES
    java.lang.NoClassDefFoundError: io/netty/util/concurrent/GenericFutureListener
    Status: LIGHTSTREAMER SUBSCRIPTION LISTENER STARTED
    at com.lightstreamer.client.transport.providers.netty .NettyHttpProviderFactory.getInstance(NettyHttpPro viderFactory.java:22)
    at com.lightstreamer.client.transport.providers.netty .NettyHttpProviderFactory.getInstance(NettyHttpPro viderFactory.java:18)
    at com.lightstreamer.client.session.SessionFactory.cr eateNewSession(SessionFactory.java:38)
    at com.lightstreamer.client.session.SessionManager.pr epareNewSessionInstance(SessionManager.java:312)
    at com.lightstreamer.client.session.SessionManager.cr eateOrSwitchSession(SessionManager.java:301)
    at com.lightstreamer.client.LightstreamerEngine$1.run (LightstreamerEngine.java:119)
    at com.lightstreamer.client.session.SessionThread$1.r un(SessionThread.java:155)
    at com.lightstreamer.util.threads.LoggingRunnable.run (LoggingRunnable.java:20)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.cal l(Executors.java:539)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.jav a:264)
    at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$S cheduledFutureTask.run(ScheduledThreadPoolExecutor .java:304)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker( ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:635)
    at java.base/java.lang.Thread.run(Thread.java:833)
    at com.lightstreamer.util.threads.JoinableSchedulerPo olExecutor$1$1.run(JoinableSchedulerPoolExecutor.j ava:33)
    Caused by: java.lang.ClassNotFoundException: io.netty.util.concurrent.GenericFutureListener
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(B uiltinClassLoader.java:641)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.lo adClass(ClassLoaders.java:188)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:5 20)
    ... 15 more
    15.Jan.22 12:26:34,208|INFO |lightstreamer.subscribe|Session Thread <1>|Adding subscription 1
    15.Jan.22 12:26:34,209|DEBUG|lightstreamer.actions|Session Thread <1>|Subscription 1 ready to be sent to server
    15.Jan.22 12:26:34,209|DEBUG|lightstreamer.actions|Session Thread <1>|structures reset for subscription 1
    15.Jan.22 12:26:34,210|DEBUG|lightstreamer.actions|Session Thread <1>|Subscription 1 is now on hold
    Last edited by cleggink; January 15th, 2022 at 06:40 PM.

  4. #4
    15.Jan.22 12:26:34,191|DEBUG|lightstreamer.session|Session Thread <1>|SessionManager state change: OFF -> STREAMING_WS

    seems to be the final action before the uncaught exempion

  5. #5
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    716
    Hi cleggink,

    Strange, it seems that your project misses a netty class, that is a dependecny of the library, please could you just try to add this to your pom?

    <!-- https://mvnrepository.com/artifact/io.netty/netty-all -->
    <dependency>
    <groupId>io.netty</groupId>
    <artifactId>netty-all</artifactId>
    <version>4.1.46.Final</version>
    </dependency>


    Regards,
    Giuseppe

  6. #6
    It was a missing dependancy. I'm ashamed to admit that. Any idea what this means?

    |DEBUG|lightstreamer.protocol|Session Thread <1>|New message (1): CONERR,60,License not valid for this Client version

  7. #7
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    716
    Okay, now we indeed have a client library version compatibility problem. You should double check with your data provider.
    In any case maybe you could give a try to 4.2.x version (www.lightstreamer.com/repo/maven/com/lightstreamer/ls-javase-client/).

  8. #8
    I've tried v4.3.7, v4.3.0, v4.0.0, and now V4.2.0, all the same result. Is there a way to pinpoint what version I do need. Lightstreamers download page says to use v.4.3.0 with server version 7.0.3 but that isn't the case here. Data provider has already said that client v4.3.0 is the recommended version. I'm sorry it wasn't the data provider that mislead me, he told me that I should be using the client version for server version 7.0.3 and your website's download page listed the correct version as 4.3.0. Thank you for the clarifications you where amazingly helpful. Might want to pass that typo onto whoever updates your website.
    Last edited by cleggink; January 16th, 2022 at 08:58 PM.

  9. #9
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    716
    Hi cleggink,

    I need to stress out that Java Client library 4.3.0 is fully compatible with server 7.0.x.
    But please consider that a specific server installation can configure more restrictions on the type of clients supported and their version, for this reason it is always necessary to double check with who actually deployed the server.

    Regards,
    Giuseppe

  10. #10
    Perhaps that is what the issue was, I don't think he was actually aware of the discrepancy there in the versions. Either way I've managed to connect fine thanks to your assistance thank you very much for that. Maybe you can help me understand what is happening now. I seem to be getting the subscription updates from the server, but my client is discarding them and stalling out the connection anyway. Log to follow:

    Status: INITIALIZING MATRIX
    Status: LOGIN FOREX.COM: AUTHENTICATED
    17.Jan.22 09:55:00,173|INFO |lightstreamer.actions|main|New client created
    17.Jan.22 09:55:00,175|INFO |lightstreamer.actions|main|Server Address value changed to https://push.cityindex.com/
    17.Jan.22 09:55:00,175|INFO |lightstreamer.actions|main|Adapter Set value changed to STREAMINGALL
    17.Jan.22 09:55:00,178|INFO |lightstreamer.actions|main|Forced Transport value changed to null
    17.Jan.22 09:55:00,178|INFO |lightstreamer.actions|main|User value changed to cleggfredrick@gmail.com
    17.Jan.22 09:55:00,179|INFO |lightstreamer.actions|main|Password value changed
    17.Jan.22 09:55:00,181|INFO |lightstreamer.actions|main|Connect requested
    Status: LIGHTSTREAMER CLIENT LISTENER STARTED
    17.Jan.22 09:55:00,191|DEBUG|lightstreamer.actions|main|Item list assigned: PRICE.401484300
    17.Jan.22 09:55:00,192|DEBUG|lightstreamer.actions|main|Fiel d list assigned: MarketId TickDate Bid Offer Price High Low
    17.Jan.22 09:55:00,193|DEBUG|lightstreamer.actions|main|Snap shot Required assigned: yes
    17.Jan.22 09:55:00,193|DEBUG|lightstreamer.actions|main|Adap ter Set assigned: PRICES
    17.Jan.22 09:55:00,195|DEBUG|lightstreamer.session|Session Thread <1>|Opening a new session and starting automatic reconnections
    17.Jan.22 09:55:00,200|DEBUG|lightstreamer.session|Session Thread <1>|SessionManager state change: OFF -> STREAMING_WS
    Status: LIGHTSTREAMER SUBSCRIPTION LISTENER STARTED
    17.Jan.22 09:55:00,247|DEBUG|lightstreamer.netty.pool|Sessio n Thread <1>|Creating new WS channel pool map
    17.Jan.22 09:55:01,105|INFO |lightstreamer.actions|Session Thread <1>|Session ID value changed to null
    17.Jan.22 09:55:01,105|INFO |lightstreamer.actions|Session Thread <1>|Server Socket Name value changed to null
    17.Jan.22 09:55:01,105|INFO |lightstreamer.actions|Session Thread <1>|Client IP value changed to null
    17.Jan.22 09:55:01,106|INFO |lightstreamer.actions|Session Thread <1>|Server Instance Address value changed to null
    17.Jan.22 09:55:01,106|INFO |lightstreamer.session|Session Thread <1>|Opening new session
    17.Jan.22 09:55:01,256|DEBUG|lightstreamer.netty.pool|Sessio n Thread <1>|Creating new HTTP channel pool map
    17.Jan.22 09:55:01,395|DEBUG|lightstreamer.netty.pool|Sessio n Thread <1>|HTTP channel pool map [1] created and initialized
    17.Jan.22 09:55:01,396|DEBUG|lightstreamer.netty.pool|Sessio n Thread <1>|New HTTP channel pool created. Remote address: push.cityindex.com/<unresolved>:443
    17.Jan.22 09:55:01,572|DEBUG|lightstreamer.session|Session Thread <1>|Session state change: OFF -> CREATING
    17.Jan.22 09:55:01,574|DEBUG|lightstreamer.session|Session Thread <1>|Status timeout in 4000
    17.Jan.22 09:55:01,575|DEBUG|lightstreamer.session|Session Thread <1>|WebSocket early opening
    17.Jan.22 09:55:01,577|DEBUG|lightstreamer.stream|Session Thread <1>|WebSocket transport: NOT_CONNECTED
    Status: LIGHTSTREAMER CLIENT: CONNECTING
    17.Jan.22 09:55:01,589|DEBUG|lightstreamer.netty.pool|Sessio n Thread <1>|New WS channel pool created. Remote address: push.cityindex.com/<unresolved>:443
    17.Jan.22 09:55:01,597|DEBUG|lightstreamer.stream|Session Thread <1>|WebSocket transport: CONNECTING
    17.Jan.22 09:55:01,598|INFO |lightstreamer.subscribe|Session Thread <1>|Adding subscription 1
    17.Jan.22 09:55:01,598|DEBUG|lightstreamer.actions|Session Thread <1>|Subscription 1 ready to be sent to server
    17.Jan.22 09:55:01,599|DEBUG|lightstreamer.actions|Session Thread <1>|structures reset for subscription 1
    17.Jan.22 09:55:01,599|DEBUG|lightstreamer.actions|Session Thread <1>|Subscription 1 is now on hold
    17.Jan.22 09:55:01,764|DEBUG|lightstreamer.netty.pool|Netty Thread 1|HTTP channel created [ee653a32]
    17.Jan.22 09:55:01,764|DEBUG|lightstreamer.netty.pool|Netty Thread 2|HTTP channel created [df90c136]
    17.Jan.22 09:55:02,200|DEBUG|lightstreamer.netty.pool|Netty Thread 1|HTTP channel acquired [ee653a32]
    17.Jan.22 09:55:02,200|DEBUG|lightstreamer.netty.pool|Netty Thread 2|HTTP channel acquired [df90c136]
    17.Jan.22 09:55:02,246|DEBUG|lightstreamer.netty.pool|Netty Thread 4|ChannelUpgradeFuture state change: CONNECTING -> CONNECTION_OK
    17.Jan.22 09:55:02,282|DEBUG|lightstreamer.stream|Netty Thread 3|HTTP transport sending [ee653a32]: /lightstreamer/create_session.txt?LS_protocol=TLCP-2.1.0
    LS_polling=true&LS_cause=new.api&LS_polling_millis =0&LS_idle_millis=0&LS_cid=pcYgxptg4pkpW39AM3M4hwL ri8L7MDl&LS_adapter_set=STREAMINGALL&LS_user=clegg fredrick@gmail.com&LS_password=93744e78-fbf1-4e71-9ed7-7938ae62bc5e&
    17.Jan.22 09:55:02,311|DEBUG|lightstreamer.netty.pool|Netty Thread 2|HTTP channel active [df90c136]
    17.Jan.22 09:55:02,311|DEBUG|lightstreamer.netty.pool|Netty Thread 1|HTTP channel active [ee653a32]
    17.Jan.22 09:55:02,376|DEBUG|lightstreamer.netty.pool|Netty Thread 2|WS channel handshake [df90c136]
    17.Jan.22 09:55:03,103|DEBUG|lightstreamer.stream|Netty Thread 1|Response status: 200
    17.Jan.22 09:55:03,111|DEBUG|lightstreamer.stream|Netty Thread 1|HTTP transport receiving [ee653a32]:
    CONOK,S4bc95cafd11478ebMbecT5503039,50000,0,push-retail-01-101-01.cityindex.com
    SERVNAME,Lightstreamer HTTP Server
    CLIENTIP,172.25.92.250
    CONS,unlimited
    LOOP,0
    17.Jan.22 09:55:03,114|DEBUG|lightstreamer.netty.pool|Netty Thread 1|HTTP channel released [ee653a32]
    17.Jan.22 09:55:03,115|DEBUG|lightstreamer.protocol|Session Thread <1>|New message: CONOK,S4bc95cafd11478ebMbecT5503039,50000,0,push-retail-01-101-01.cityindex.com
    17.Jan.22 09:55:03,116|DEBUG|lightstreamer.session|Session Thread <1>|OK event while CREATING
    17.Jan.22 09:55:03,117|DEBUG|lightstreamer.session|Session Thread <1>|Control-Link has changed: https://push.cityindex.com/ -> https://push-retail-01-101-01.cityindex.com/
    17.Jan.22 09:55:03,117|DEBUG|lightstreamer.stream|Session Thread <1>|WebSocket transport: DISCONNECTED
    17.Jan.22 09:55:03,118|DEBUG|lightstreamer.stream|Session Thread <1>|WebSocket transport: NOT_CONNECTED
    17.Jan.22 09:55:03,118|DEBUG|lightstreamer.netty.pool|Sessio n Thread <1>|New HTTP channel pool created. Remote address: push-retail-01-101-01.cityindex.com/<unresolved>:443
    17.Jan.22 09:55:03,118|DEBUG|lightstreamer.netty.pool|Netty Thread 2|ChannelUpgradeFuture state change: CONNECTION_OK -> UPGRADE_OK
    17.Jan.22 09:55:03,118|DEBUG|lightstreamer.netty.pool|Sessio n Thread <1>|New WS channel pool created. Remote address: push-retail-01-101-01.cityindex.com/<unresolved>:443
    17.Jan.22 09:55:03,118|DEBUG|lightstreamer.netty.pool|Netty Thread 2|WS channel created [df90c136]
    17.Jan.22 09:55:03,119|DEBUG|lightstreamer.stream|Session Thread <1>|WebSocket transport: CONNECTING
    17.Jan.22 09:55:03,119|DEBUG|lightstreamer.session|Session Thread <1>|Data event while CREATING
    17.Jan.22 09:55:03,119|DEBUG|lightstreamer.session|Session Thread <1>|Session state change: CREATING -> CREATED
    17.Jan.22 09:55:03,120|DEBUG|lightstreamer.session|Session Thread <1>|Status timeout in 2000
    17.Jan.22 09:55:03,121|DEBUG|lightstreamer.actions|Session Thread <1>|Subscription 1 ready to be sent to server
    17.Jan.22 09:55:03,121|INFO |lightstreamer.subscribe|Session Thread <1>|Preparing subscription: 1
    17.Jan.22 09:55:03,122|INFO |lightstreamer.protocol|Session Thread <1>|Sending subscription request
    17.Jan.22 09:55:03,122|DEBUG|lightstreamer.protocol|Session Thread <1>|subscription parameters: LS_reqId=1&LS_op=add&LS_subId=1&LS_mode=MERGE&LS_g roup=PRICE.401484300&LS_schema=MarketId TickDate Bid Offer Price High Low&LS_data_adapter=PRICES&LS_snapshot=true&LS_ses sion=S4bc95cafd11478ebMbecT5503039&
    17.Jan.22 09:55:03,127|INFO |lightstreamer.subscribe|Session Thread <1>|Start message handler
    17.Jan.22 09:55:03,127|DEBUG|lightstreamer.subscribe|Session Thread <1>|Sending queued messages
    17.Jan.22 09:55:03,128|INFO |lightstreamer.actions|Session Thread <1>|Session ID value changed to S4bc95cafd11478ebMbecT5503039
    17.Jan.22 09:55:03,128|INFO |lightstreamer.actions|Session Thread <1>|Server Instance Address value changed to https://push-retail-01-101-01.cityindex.com/
    17.Jan.22 09:55:03,128|DEBUG|lightstreamer.protocol|Session Thread <1>|New message: SERVNAME,Lightstreamer HTTP Server
    17.Jan.22 09:55:03,129|INFO |lightstreamer.actions|Session Thread <1>|Server Socket Name value changed to Lightstreamer HTTP Server
    17.Jan.22 09:55:03,129|DEBUG|lightstreamer.protocol|Session Thread <1>|New message: CLIENTIP,172.25.92.250
    17.Jan.22 09:55:03,129|INFO |lightstreamer.actions|Session Thread <1>|Client IP value changed to 172.25.92.250
    17.Jan.22 09:55:03,129|DEBUG|lightstreamer.protocol|Session Thread <1>|New message: CONS,unlimited
    17.Jan.22 09:55:03,130|DEBUG|lightstreamer.session|Session Thread <1>|Data event while CREATED
    17.Jan.22 09:55:03,130|DEBUG|lightstreamer.protocol|Session Thread <1>|New message: LOOP,0
    17.Jan.22 09:55:03,130|DEBUG|lightstreamer.session|Session Thread <1>|Loop event while CREATED
    17.Jan.22 09:55:03,130|DEBUG|lightstreamer.session|Session Thread <1>|Session state change: CREATED -> FIRST_PAUSE
    17.Jan.22 09:55:03,130|DEBUG|lightstreamer.session|Session Thread <1>|Timeout event while FIRST_PAUSE cause=null
    17.Jan.22 09:55:03,130|DEBUG|lightstreamer.netty.pool|Netty Thread 6|HTTP channel created [8d95ce21]
    17.Jan.22 09:55:03,130|INFO |lightstreamer.session|Session Thread <1>|Binding session
    17.Jan.22 09:55:03,132|DEBUG|lightstreamer.session|Session Thread <1>|Session state change: FIRST_PAUSE -> FIRST_BINDING
    17.Jan.22 09:55:03,132|DEBUG|lightstreamer.session|Session Thread <1>|Status timeout in 4000

 

 

Similar Threads

  1. Connection issues
    By cleggink in forum Client SDKs
    Replies: 0
    Last Post: January 14th, 2022, 07:34 PM
  2. Connection Issues (SSL related?) [WinRT]
    By EricS in forum Client SDKs
    Replies: 7
    Last Post: January 24th, 2014, 10:25 AM
  3. Replies: 0
    Last Post: December 27th, 2006, 04:56 PM
  4. Firefox 2.0 final just tested - no known issues
    By Alessandro in forum Client SDKs
    Replies: 1
    Last Post: October 30th, 2006, 05:53 PM
  5. IE 7.0 final just tested - no known issues
    By Alessandro in forum Client SDKs
    Replies: 0
    Last Post: October 19th, 2006, 06:53 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 11:54 PM.