Websocket API closes the connection. It never sends PING. Most of the times it doesn't even respond to Login.
What I do is:
- authenticate with https://api.edp.thomsonreuters.com/auth/oauth2/beta1/token to get an auth token
- fetch the services list from https://api.edp.thomsonreuters.com/streaming/pricing/v1/
- choose a websocket tr_json2 service and connect to it
- send Login request
Here's my logs. Timestamps show it's probably a connection timeout.
2018-09-19 19:09:24.929 DEBUG 21238 --- [ main] test.pricing.tr.TrPriceService : Restarting socket 2018-09-19 19:09:26.269 DEBUG 21238 --- [ main] test.pricing.tr.TrPriceService : Got authentication token 2018-09-19 19:09:26.630 DEBUG 21238 --- [ main] test.pricing.tr.TrPriceService : Preferred server amer-3.pricing.streaming.edp.thomsonreuters.com 2018-09-19 19:09:27.055 INFO 21238 --- [ main] test.pricing.App : Starting NATS RPC handlers 2018-09-19 19:09:27.750 DEBUG 21238 --- [er@974861985-59] test.pricing.tr.TrSocketHandler : Socket open, sending login 2018-09-19 19:10:17.727 ERROR 21238 --- [er@974861985-62] test.pricing.tr.TrSocketHandler : Socket transport error: null null 2018-09-19 19:10:17.729 DEBUG 21238 --- [er@974861985-62] test.pricing.tr.TrSocketHandler : Connection closed 2018-09-19 19:10:17.729 DEBUG 21238 --- [er@974861985-62] test.pricing.tr.TrPriceService : Restarting socket 2018-09-19 19:10:18.599 DEBUG 21238 --- [er@974861985-62] test.pricing.tr.TrPriceService : Got authentication token 2018-09-19 19:10:18.819 DEBUG 21238 --- [er@974861985-62] test.pricing.tr.TrPriceService : Preferred server amer-3.pricing.streaming.edp.thomsonreuters.com 2018-09-19 19:10:19.526 DEBUG 21238 --- [r@1819034250-77] test.pricing.tr.TrSocketHandler : Socket open, sending login 2018-09-19 19:11:09.525 ERROR 21238 --- [r@1819034250-80] test.pricing.tr.TrSocketHandler : Socket transport error: null null 2018-09-19 19:11:09.525 DEBUG 21238 --- [r@1819034250-80] test.pricing.tr.TrSocketHandler : Connection closed 2018-09-19 19:11:09.525 DEBUG 21238 --- [r@1819034250-80] test.pricing.tr.TrPriceService : Restarting socket 2018-09-19 19:11:10.511 DEBUG 21238 --- [r@1819034250-80] test.pricing.tr.TrPriceService : Got authentication token 2018-09-19 19:11:10.718 DEBUG 21238 --- [r@1819034250-80] test.pricing.tr.TrPriceService : Preferred server amer-3.pricing.streaming.edp.thomsonreuters.com 2018-09-19 19:11:11.409 DEBUG 21238 --- [er@566763811-89] test.pricing.tr.TrSocketHandler : Socket open, sending login 2018-09-19 19:11:11.525 DEBUG 21238 --- [er@566763811-92] test.pricing.tr.TrSocketHandler : Received message TextMessage payload=[[{"ID":-1,..], byteCount=816, last=true] 2018-09-19 19:11:11.526 DEBUG 21238 --- [er@566763811-92] test.pricing.tr.TrSocketHandler : Socket Message 2018-09-19 19:11:11.526 DEBUG 21238 --- [er@566763811-92] test.pricing.tr.TrSocketHandler : [{"ID":-1,"Type":"Refresh","Domain":"Login","Key":{"Name":"AQIC5wM2LY4SfcxUGSjazBbmE7EbB%2FxOWPc3QEFRFz2BXlI%3D%40AAJTSQACMjAAAlNLABQtODY2NjI3NzExNTMwNDgxMzA5MAACUzEAAjM0%23","Elements":{"AllowSuspectData":1,"ApplicationId":"256","ApplicationName":"ADS","AuthenticationErrorCode":0,"AuthenticationErrorText":{"Type":"AsciiString","Data":null},"AuthenticationTTReissue":1537373770,"Position":"127.0.1.1","ProvidePermissionExpressions":1,"ProvidePermissionProfile":0,"SingleOpen":1,"SupportEnhancedSymbolList":1,"SupportOMMPost":1,"SupportPauseResume":0,"SupportStandby":0,"SupportBatchRequests":7,"SupportViewRequests":1,"SupportOptimizedPauseResume":0}},"State":{"Stream":"Open","Data":"Ok","Text":"Login accepted by host ads-premium-az2-blue-3-main-prd.use1-az2."},"Elements":{"PingTimeout":30,"MaxMsgSize":61430}}] 2018-09-19 19:11:11.534 INFO 21238 --- [er@566763811-92] test.pricing.tr.TrSocketHandler : Socket connected and authenticated 2018-09-19 19:12:01.566 ERROR 21238 --- [er@566763811-89] test.pricing.tr.TrSocketHandler : Socket transport error: null null 2018-09-19 19:12:01.566 DEBUG 21238 --- [er@566763811-89] test.pricing.tr.TrSocketHandler : Connection closed 2018-09-19 19:12:01.566 DEBUG 21238 --- [er@566763811-89] test.pricing.tr.TrPriceService : Restarting socket 2018-09-19 19:12:02.343 DEBUG 21238 --- [er@566763811-89] test.pricing.tr.TrPriceService : Got authentication token 2018-09-19 19:12:02.597 DEBUG 21238 --- [er@566763811-89] test.pricing.tr.TrPriceService : Preferred server amer-3.pricing.streaming.edp.thomsonreuters.com 2018-09-19 19:12:03.301 DEBUG 21238 --- [@1108813670-104] test.pricing.tr.TrSocketHandler : Socket open, sending login 2018-09-19 19:12:53.299 ERROR 21238 --- [@1108813670-107] test.pricing.tr.TrSocketHandler : Socket transport error: null null 2018-09-19 19:12:53.300 DEBUG 21238 --- [@1108813670-107] test.pricing.tr.TrSocketHandler : Connection closed 2018-09-19 19:12:53.300 DEBUG 21238 --- [@1108813670-107] test.pricing.tr.TrPriceService : Restarting socket