We used sample code
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
On the other hand if we use port=14002, remote machine won't refuse the connection, but will close the connection immediately.
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.
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.