Error info: Connection to remote host was lost. Connection to remote host was lost.


  • @admin ok thanks.


  • Hi @vip we have already reported this to our team.


  • I also got the same error today at around 11:57.

    {'task': 'cn', 'channel': 'NONLM', 'token': '', 'user': 'V232487', 'acctid': 'V232487'}
    2021-06-15 11:53:26.590721 : Start task in the background
    {'task': 'hb', 'channel': '', 'token': '', 'user': 'V232487', 'acctid': 'V232487'}
    2021-06-15 11:53:56.598657 : Start task in the background
    {'task': 'hb', 'channel': '', 'token': '', 'user': 'V232487', 'acctid': 'V232487'}
    2021-06-15 11:54:26.604543 : Start task in the background
    {'task': 'hb', 'channel': '', 'token': '', 'user': 'V232487', 'acctid': 'V232487'}
    2021-06-15 11:54:56.609620 : Start task in the background
    {'task': 'hb', 'channel': '', 'token': '', 'user': 'V232487', 'acctid': 'V232487'}
    2021-06-15 11:55:26.614417 : Start task in the background
    {'task': 'hb', 'channel': '', 'token': '', 'user': 'V232487', 'acctid': 'V232487'}
    2021-06-15 11:55:56.619472 : Start task in the background
    {'task': 'hb', 'channel': '', 'token': ', 'user': 'V232487', 'acctid': 'V232487'}
    2021-06-15 11:56:26.622838 : Start task in the background
    {'task': 'hb', 'channel': '', 'token': '', 'user': 'V232487', 'acctid': 'V232487'}
    2021-06-15 11:56:56.627850 : Start task in the background
    {'task': 'hb', 'channel': '', 'token': '', 'user': 'V232487', 'acctid': 'V232487'}
    Error info: Connection to remote host was lost.
    2021-06-15 11:57:26.633079 : Start task in the background
    {'task': 'hb', 'channel': '', 'token': '', 'user': 'V232487', 'acctid': 'V232487'}
    HeartBeat Sending Failed
    2021-06-15 11:57:56.634392 : Start task in the background
    {'task': 'hb', 'channel': '', 'token': '', 'user': 'V232487', 'acctid': 'V232487'}
    HeartBeat Sending Failed
    2021-06-15 11:58:26.638785 : Start task in the background
    {'task': 'hb', 'channel': '', 'token': '', 'user': 'V232487', 'acctid': 'V232487'}
    HeartBeat Sending Failed


  • HI @Vypy1 Ok we will update you on this.


  • @admin Facing the same issue.

    Additionally also receiving heartbeat failed error.

    FEED_TOKEN=feedToken
    CLIENT_CODE="" #Removed for security
    token="nse_cm|1333"    #SAMPLE: nse_cm|2885&nse_cm|1594&nse_cm|11536&nse_cm|3045
    task="mw"   # mw|sfi|dp
    
    ss = SmartWebSocket(FEED_TOKEN, CLIENT_CODE)
    
    def on_message(ws, message):
        print("Ticks: {}".format(message))
        
    def on_open(ws):
        print("on open")
        ss.subscribe(task,token)
        
    def on_error(ws, error):
        print(error)
        
    def on_close(ws):
        print("Close")
    
    # Assign the callbacks.
    ss._on_open = on_open
    ss._on_message = on_message
    ss._on_error = on_error
    ss._on_close = on_close
    
    ss.connect()
    

    **Output looks like **

    __on_open################
    {'task': 'cn', 'channel': 'NONLM', 'token': 'feedToken', 'user': '', 'acctid': ''} # removed user and acctid for security
    2021-06-15 11:48:05.385797 : Start task in the background
    {'task': 'hb', 'channel': '', 'token': 'feedToken', 'user': '', 'acctid': ''}
    on open
    Ticks: [{'ak': 'nk', 'msg': 'cn', 'task': 'cn'}]
    Ticks: [{'ak': 'nk', 'msg': 'hb', 'task': 'hb'}]
    Ticks: [{'ak': 'nk', 'msg': 'mw', 'task': 'mw'}]
    2021-06-15 11:48:10.720655 : Start task in the background
    {'task': 'hb', 'channel': '', 'token': 'feedToken', 'user': '', 'acctid': ''}
    HeartBeat Sending Failed
    2021-06-15 11:48:14.200221 : Start task in the background
    {'task': 'hb', 'channel': '', 'token': 'feedToken', 'user': '', 'acctid': ''}
    HeartBeat Sending Failed
    2021-06-15 11:48:19.780455 : Start task in the background
    {'task': 'hb', 'channel': '', 'token': 'feedToken', 'user': '', 'acctid': ''}
     #removed user and acctid for security
    HeartBeat Sending Failed
    2021-06-15 11:48:20.349411 : Start task in the background
    {'task': 'hb', 'channel': '', 'token': 'feedToken', 'user': '', 'acctid': ''}
    HeartBeat Sending Failed
    2021-06-15 11:48:25.824907 : Start task in the background
    {'task': 'hb', 'channel': '', 'token': 'feedToken', 'user': '', 'acctid': ''}
    HeartBeat Sending Failed
    Error info: 
    

  • HI @s4ntosh Our team is working on it. We appreciate your patience.


  • @admin

    Got the same error today again:

    2021-06-15 10:38:07.204511 : Start task in the background
    {'task': 'hb', 'channel': '', 'token': '', 'user': '', 'acctid': ''} (removed acctid and token for privacy issue)
    457.7 10:38:07
    478.4 10:38:08
    Error info: Connection to remote host was lost.
    Connection to remote host was lost.


  • HI @s4ntosh We have reported your issue to our team we will update you on how you can handle this.


  • @admin I have faced the similar issue a while back for crude oil.

    How do I reconnect to the websocket incase of an event like this.


  • HI @nahas_n Our team is working on websocket.We will keep you updated.