question

Upvotes
Accepted
21 0 0 1

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 5.0 MiB each and 10.0 MiB total.

Hi @gxu,

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

thanks.

Upvotes
Accepted
21 0 0 1

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 5.0 MiB each and 10.0 MiB total.

Upvotes
9.7k 49 38 60

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 5.0 MiB each and 10.0 MiB total.

Upvotes
20.3k 73 10 20

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 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea