For a deeper look into our Elektron API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
21 0 0 2

websocket connection refused by target machine

We used sample code

https://github.com/Refinitiv/websocket-api/blob/master/Applications/Examples/python/market_price.py

to test websocket connection to TREP machine (where we changed the hostname,user to fit our in-house configurations, we still keep port=15000 and app_id=256 intact). However we received the error message

[WinError 10061] No connection could be made because the target machine actively refused it
WebSocket Closed

On the other hand if we use port=14002, remote machine won't refuse the connection, but will close the connection immediately.

elektronrefinitiv-realtimeelektron-sdktrepwebsockets
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hi @gxu,

I'm just following up to see whether the suggestions below helped.

thanks.

Upvotes
Accepted
21 0 0 2

it turns out our TREP machine need updates

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
16.6k 79 39 63

Hi @gxu,

As a first step to confirm connectivity, which is what appears to be your issue here, try using the interactive documentation as outlined within the WebSocket Quick Start. If you are having trouble connecting, refer to the troubleshooting section within that quick start. If you are still unable to connect, I would reach out to your market data team to confirm they have in fact set up a WebSocket server correctly. Note, the TREP server component ADS must be version 3.2 or greater.

thanks.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
25.3k 87 12 25

Hi @gxu

The error message you report does suggest that the server is not listening on port 15000 - i.e. the Websocket interface/service has been disabled or the ADS is an older version and does not support it.

The 14002 is initially accepted as the server is listening on 14002 - but then closed the connections as it is not recognised as a RSSL type connection.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.