Stream DISCONNECTED

1 post / 0 new
Jompe71
Stream DISCONNECTED

Trying to connect to the Streaming API after successful REST API login (v2) and using the CST and XST tokens from the response headers.

lightstreamerClient = new LightstreamerClient(
lightstreamerEndpoint,
ADAPTER_SET
);

String passwordToken = String.format( "CST-%s|XST-%s", cstAuthToken, xstAuthToken );

ConnectionDetails connectionDetails = lightstreamerClient.connectionDetails;
connectionDetails.setPassword( passwordToken );
connectionDetails.setUser( accountId );
connectionDetails.setServerAddress( lightstreamerEndpoint );
log.info( "Attempt to connect to Streaming API using: {}", serializationUtils.asJson( connectionDetails ) );
log.info( "Password token {}", passwordToken );

lightstreamerClient.addListener( clientListener );
lightstreamerClient.connect();
log.info( "Connected to Lightstreamer server located at: {}", lightstreamerEndpoint );

Note, I'm using the 4,3,1 Unified (Core Lightstreamer) API.
According to the docs it should work with v7.0 and higher which IG uses (7.0.1)

This is what the client listener gets back:

2019-11-15 17:12:14,170 INFO se.fernstroem.api.stream.IGStreamingClient [http-nio-8001-exec-1] Attempt to connect to Streaming API using: {"serverAddress":"https://demo-apd.marketdatasystems.com/","user":"Z30LSC","adapterSet":"DEFAULT"}
2019-11-15 17:12:14,171 INFO se.fernstroem.api.stream.IGLighstreamerClientListener [EventsThread <1>] Started listening on Lightstreamer events at https://demo-apd.marketdatasystems.com/
2019-11-15 17:12:14,172 INFO se.fernstroem.api.stream.IGStreamingClient [http-nio-8001-exec-1] Connect requested
2019-11-15 17:12:14,172 INFO se.fernstroem.api.stream.IGStreamingClient [http-nio-8001-exec-1] Connected to Lightstreamer server located at: https://demo-apd.marketdatasystems.com
2019-11-15 17:12:14,180 DEBUG se.fernstroem.api.stream.IGStreamingClient [Session Thread <1>] Opening a new session and starting automatic reconnections
2019-11-15 17:12:14,182 DEBUG se.fernstroem.api.stream.IGStreamingClient [Session Thread <1>] SessionManager state change: OFF -> STREAMING_WS
2019-11-15 17:12:14,185 DEBUG se.fernstroem.api.stream.IGStreamingClient [Session Thread <1>] Creating new WS channel pool map
2019-11-15 17:12:14,261 DEBUG se.fernstroem.api.stream.IGStreamingClient [Session Thread <1>] New protocol oid=1
2019-11-15 17:12:14,263 DEBUG se.fernstroem.api.stream.IGStreamingClient [Session Thread <1>] rhb max interval 0
2019-11-15 17:12:14,263 DEBUG se.fernstroem.api.stream.IGStreamingClient [Session Thread <1>] rhb current interval 0
2019-11-15 17:12:14,293 DEBUG se.fernstroem.api.stream.IGStreamingClient [Session Thread <1>] New session oid=1
2019-11-15 17:12:14,296 INFO se.fernstroem.api.stream.IGLighstreamerClientListener [EventsThread <1>] Lightstreamer server reports property change: sessionId
2019-11-15 17:12:14,296 INFO se.fernstroem.api.stream.IGStreamingClient [Session Thread <1>] Session ID value changed to null
2019-11-15 17:12:14,296 INFO se.fernstroem.api.stream.IGStreamingClient [Session Thread <1>] Server Socket Name value changed to null
2019-11-15 17:12:14,296 INFO se.fernstroem.api.stream.IGLighstreamerClientListener [EventsThread <1>] Lightstreamer server reports property change: serverSocketName
2019-11-15 17:12:14,296 INFO se.fernstroem.api.stream.IGStreamingClient [Session Thread <1>] Client IP value changed to null
2019-11-15 17:12:14,296 INFO se.fernstroem.api.stream.IGLighstreamerClientListener [EventsThread <1>] Lightstreamer server reports property change: clientIp
2019-11-15 17:12:14,296 INFO se.fernstroem.api.stream.IGStreamingClient [Session Thread <1>] Server Instance Address value changed to null
2019-11-15 17:12:14,296 INFO se.fernstroem.api.stream.IGLighstreamerClientListener [EventsThread <1>] Lightstreamer server reports property change: serverInstanceAddress
2019-11-15 17:12:14,296 INFO se.fernstroem.api.stream.IGStreamingClient [Session Thread <1>] Opening new session
2019-11-15 17:12:14,296 INFO se.fernstroem.api.stream.IGLighstreamerClientListener [EventsThread <1>] Lightstreamer server reports property change: realMaxBandwidth
2019-11-15 17:12:14,343 INFO se.fernstroem.api.stream.IGStreamingClient [Session Thread <1>] Setting up custom CookieHandler: java.net.CookieManager@4f791181
2019-11-15 17:12:14,343 INFO se.fernstroem.api.stream.IGStreamingClient [Session Thread <1>] Default CookieStore type: java.net.InMemoryCookieStore
2019-11-15 17:12:14,343 DEBUG se.fernstroem.api.stream.IGStreamingClient [Session Thread <1>] While getting cookies for https://demo-apd.marketdatasystems.com/lightstreamer/create_session.txt?...
2019-11-15 17:12:14,343 DEBUG se.fernstroem.api.stream.IGStreamingClient [Session Thread <1>] Result of getting cookies for https://demo-apd.marketdatasystems.com/lightstreamer/create_session.txt?...
2019-11-15 17:12:14,343 INFO se.fernstroem.api.stream.IGStreamingClient [Session Thread <1>] Cookies to be inserted for https://demo-apd.marketdatasystems.com/lightstreamer/create_session.txt?...
2019-11-15 17:12:14,353 DEBUG se.fernstroem.api.stream.IGStreamingClient [Session Thread <1>] HTTP transport connection establishing (oid=1): https://demo-apd.marketdatasystems.com:-1
/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=pcYgxptg4pkpW39AN3M4hwLri8L7OC53i&LS_adapter_set=DEFAULT&LS_user=Z30LSC&LS_password=CST-d44f8e3baf38258fe6099503ade94f86bfa401650ca5be6de25828b8b40bf40101113|XST-32f14ed97704bd537d26760f50ac1b68fc319978f1454d4add16aa9585a521e401113&

2019-11-15 17:12:14,353 DEBUG se.fernstroem.api.stream.IGStreamingClient [Session Thread <1>] Creating new HTTP channel pool map
2019-11-15 17:12:14,454 DEBUG se.fernstroem.api.stream.IGStreamingClient [Session Thread <1>] HTTP channel pool map [1] created and initialized
2019-11-15 17:12:14,454 DEBUG se.fernstroem.api.stream.IGStreamingClient [Session Thread <1>] New HTTP channel pool created. Remote address: demo-apd.marketdatasystems.com:443
2019-11-15 17:12:14,534 DEBUG se.fernstroem.api.stream.IGStreamingClient [Session Thread <1>] Session state change (1): OFF -> CREATING
2019-11-15 17:12:14,534 DEBUG se.fernstroem.api.stream.IGStreamingClient [Session Thread <1>] Status timeout in 4000 [currentConnectTimeout]
2019-11-15 17:12:14,535 INFO se.fernstroem.api.stream.IGLighstreamerClientListener [EventsThread <1>] Lightstreamer server reports status change: CONNECTING
2019-11-15 17:12:14,540 DEBUG se.fernstroem.api.stream.IGStreamingClient [Netty Thread 1] HTTP channel created [ab13bab8]
2019-11-15 17:12:14,584 DEBUG se.fernstroem.api.stream.IGStreamingClient [Netty Thread 1] HTTP channel acquired [ab13bab8]
2019-11-15 17:12:14,585 DEBUG se.fernstroem.api.stream.IGStreamingClient [Netty Thread 2] HTTP transport connection established (oid=1): https://demo-apd.marketdatasystems.com:-1
/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=pcYgxptg4pkpW39AN3M4hwLri8L7OC53i&LS_adapter_set=DEFAULT&LS_user=Z30LSC&LS_password=CST-d44f8e3baf38258fe6099503ade94f86bfa401650ca5be6de25828b8b40bf40101113|XST-32f14ed97704bd537d26760f50ac1b68fc319978f1454d4add16aa9585a521e401113&

2019-11-15 17:12:14,586 DEBUG se.fernstroem.api.stream.IGStreamingClient [Netty Thread 2] HTTP transport sending [ab13bab8]: /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=pcYgxptg4pkpW39AN3M4hwLri8L7OC53i&LS_adapter_set=DEFAULT&LS_user=Z30LSC&LS_password=CST-d44f8e3baf38258fe6099503ade94f86bfa401650ca5be6de25828b8b40bf40101113|XST-32f14ed97704bd537d26760f50ac1b68fc319978f1454d4add16aa9585a521e401113&

2019-11-15 17:12:14,609 DEBUG se.fernstroem.api.stream.IGStreamingClient [Netty Thread 1] HTTP channel active [ab13bab8]
2019-11-15 17:12:14,825 DEBUG se.fernstroem.api.stream.IGStreamingClient [Netty Thread 1] Response status: 200
2019-11-15 17:12:14,829 DEBUG se.fernstroem.api.stream.IGStreamingClient [Netty Thread 1] HTTP transport receiving [ab13bab8]:
CONERR,-2,A system error occurred.

2019-11-15 17:12:14,865 DEBUG se.fernstroem.api.stream.IGStreamingClient [Session Thread <1>] New message (1): CONERR,-2,A system error occurred.
2019-11-15 17:12:14,866 DEBUG se.fernstroem.api.stream.IGStreamingClient [Session Thread <1>] Session state change (1): CREATING -> OFF
2019-11-15 17:12:14,866 INFO se.fernstroem.api.stream.IGStreamingClient [Session Thread <1>] Protocol dismissed
2019-11-15 17:12:14,866 INFO se.fernstroem.api.stream.IGLighstreamerClientListener [EventsThread <1>] Lightstreamer server reports status change: DISCONNECTED
2019-11-15 17:12:14,866 DEBUG se.fernstroem.api.stream.IGStreamingClient [Session Thread <1>] rhb closed
2019-11-15 17:12:14,866 INFO se.fernstroem.api.stream.IGStreamingClient [Session Thread <1>] Batch manager is now END
2019-11-15 17:12:14,867 DEBUG se.fernstroem.api.stream.IGStreamingClient [Session Thread <1>] WebSocket request manager closing
2019-11-15 17:12:14,867 DEBUG se.fernstroem.api.stream.IGStreamingClient [Session Thread <1>] Session shutdown
2019-11-15 17:12:14,867 ERROR se.fernstroem.api.stream.IGLighstreamerClientListener [EventsThread <1>] Lightstreamer server reports error code: -2, message: A system error occurred.
2019-11-15 17:12:14,905 DEBUG se.fernstroem.api.stream.IGStreamingClient [Netty Thread 1] HTTP channel released [ab13bab8]
2019-11-15 17:12:19,913 DEBUG se.fernstroem.api.stream.IGStreamingClient [Netty Thread 1] Channel closed [ab13bab8]
2019-11-15 17:12:19,913 DEBUG se.fernstroem.api.stream.IGStreamingClient [Netty Thread 1] HTTP channel inactive [ab13bab8]

How should I know what's the main reason the the server to disconnecting?