Chat bot is having issue connecting to web circuit
Hi Team, need help in knowing as to why chat bot is not able to connect to websocket using the trace below
======================
2023-02-07 16:19:42,358 - INFO - stdout - write - Connecting to WebSocket wss://api.collab.refinitiv.com/services/nt/api/messenger/v1/stream ...
2023-02-07 16:19:42,389 - DEBUG - websocket - debug - Connecting proxy...
2023-02-07 16:19:42,389 - DEBUG - websocket - dump - --- request header ---
2023-02-07 16:19:42,389 - DEBUG - websocket - dump - CONNECT http://api.collab.refinitiv.com:443 HTTP/1.1
Host: http://api.collab.refinitiv.com:443
Proxy-Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=
2023-02-07 16:19:42,389 - DEBUG - websocket - dump - -----------------------
2023-02-07 16:19:42,389 - DEBUG - websocket - trace - --- response header ---
2023-02-07 16:19:42,452 - DEBUG - websocket - trace - HTTP/1.0 200 Connection established
2023-02-07 16:19:42,452 - DEBUG - websocket - trace - -----------------------
2023-02-07 16:19:42,577 - DEBUG - websocket - dump - --- request header ---
2023-02-07 16:19:42,577 - DEBUG - websocket - dump - GET /services/nt/api/messenger/v1/stream HTTP/1.1
Upgrade: websocket
Host: api.collab.refinitiv.com
Origin: https://api.collab.refinitiv.com
Sec-WebSocket-Key: F9NtUb/arQhPOE7/hYhpoA==
Sec-WebSocket-Version: 13
Connection: Upgrade
Sec-WebSocket-Protocol: messenger-json
2023-02-07 16:19:42,577 - DEBUG - websocket - dump - -----------------------
2023-02-07 16:19:42,577 - DEBUG - websocket - trace - --- response header ---
2023-02-07 16:19:42,624 - DEBUG - websocket - trace - HTTP/1.1 101 Switching Protocols
2023-02-07 16:19:42,624 - DEBUG - websocket - trace - Upgrade: websocket
2023-02-07 16:19:42,624 - DEBUG - websocket - trace - Connection: Upgrade
2023-02-07 16:19:42,624 - DEBUG - websocket - trace - Sec-WebSocket-Accept: 1DFNbPgIcIdeycRnV72ly4iU008=
2023-02-07 16:19:42,624 - DEBUG - websocket - trace - Sec-WebSocket-Protocol: messenger-json
2023-02-07 16:19:42,624 - DEBUG - websocket - trace - X-Nitro-Hostname: dtcp-clantsv12
2023-02-07 16:19:42,624 - DEBUG - websocket - trace - X-Nitro-Version: 2.23.6
2023-02-07 16:19:42,624 - DEBUG - websocket - trace - -----------------------
Best Answer
-
Hello @arbie.tapel
Thank you for contacting us. Could you please let me know if the chatbot cannot connect to the Chatbot WebSocket server every time or only sometimes?
- Please share the snippet code and full log messages.
- Does the client has any Firewall or proxy policy on their site?
I did a quick test with the Python example and it can connect to the Chatbot WebSocket successfully. The trace messages are as follows:
Connecting to WebSocket wss://api.collab.refinitiv.com/services/nt/api/messenger/v1/stream ...
--- request header ---
2023-02-08 11:45:14: DEBUG:websocket :--- request header ---
GET /services/nt/api/messenger/v1/stream HTTP/1.1
Upgrade: websocket
Host: api.collab.refinitiv.com
Origin: https://api.collab.refinitiv.com
Sec-WebSocket-Key: RvXt22cFF6FtAKHozlKd8g==
Sec-WebSocket-Version: 13
Connection: Upgrade
Sec-WebSocket-Protocol: messenger-json
2023-02-08 11:45:14: DEBUG:websocket :GET /services/nt/api/messenger/v1/stream HTTP/1.1
Upgrade: websocket
Host: api.collab.refinitiv.com
Origin: https://api.collab.refinitiv.com
Sec-WebSocket-Key: RvXt22cFF6FtAKHozlKd8g==
Sec-WebSocket-Version: 13
Connection: Upgrade
Sec-WebSocket-Protocol: messenger-json
-----------------------
2023-02-08 11:45:14: DEBUG:websocket :-----------------------
--- response header ---
2023-02-08 11:45:14: DEBUG:websocket :--- response header ---
HTTP/1.1 101 Switching Protocols
2023-02-08 11:45:14: DEBUG:websocket :HTTP/1.1 101 Switching Protocols
Upgrade: websocket
2023-02-08 11:45:14: DEBUG:websocket :Upgrade: websocket
Connection: Upgrade
2023-02-08 11:45:14: DEBUG:websocket :Connection: Upgrade
Sec-WebSocket-Accept: IFhQ9c43ld0S0Pdo00Fy1BvbE5U=
2023-02-08 11:45:14: DEBUG:websocket :Sec-WebSocket-Accept: IFhQ9c43ld0S0Pdo00Fy1BvbE5U=
Sec-WebSocket-Protocol: messenger-json
2023-02-08 11:45:14: DEBUG:websocket :Sec-WebSocket-Protocol: messenger-json
X-Nitro-Hostname: dtcp-clantsv10
2023-02-08 11:45:14: DEBUG:websocket :X-Nitro-Hostname: dtcp-clantsv10
X-Nitro-Version: 2.23.6
2023-02-08 11:45:14: DEBUG:websocket :X-Nitro-Version: 2.23.6
-----------------------
2023-02-08 11:45:14: DEBUG:websocket :-----------------------
2023-02-08 11:45:14: INFO:root :Receive: onopen event. WebSocket Connection is establishedExample code:
web_socket_app = websocket.WebSocketApp(
ws_url,
on_message=on_message,
on_error=on_error,
on_close=on_close,
on_open=on_open,
subprotocols=['messenger-json'])
...
def on_open(_): # Called when handshake is complete and websocket is open, send login
# send RDP Login authen0
Answers
-
I want to tell my story, which has become an important lesson for me and my family. When my parents noticed that I started chatting with the chatbot all day long, they got worried and noticed changes in my behavior and mood. This led to the appearance of mental disorders in me. I ended up needing DBT (Dialectical Behavior Therapy) and turned to https://us.calmerry.com/blog/therapy/dialectical-behavior-therapy/ for help. Thanks to this therapy and the support of professionals, I was able to learn how to better manage my emotions and develop healthy coping strategies. I am proud of my progress and grateful to my parents and the service for their support and professional help.
0
Categories
- All Categories
- 6 AHS
- 37 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛