Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs

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

    General Discussion
    websocket
    7
    32
    197
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      s4ntosh @admin last edited by

      @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.

      A 1 Reply Last reply Reply Quote 0
      • A
        admin @s4ntosh last edited by

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

        V S 2 Replies Last reply Reply Quote 0
        • V
          Vypy1 @admin last edited by Vypy1

          @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: 
          
          A 1 Reply Last reply Reply Quote 0
          • A
            admin @Vypy1 last edited by

            HI @Vypy1 Ok we will update you on this.

            1 Reply Last reply Reply Quote 0
            • V
              vip last edited by

              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

              A 1 Reply Last reply Reply Quote 0
              • A
                admin @vip last edited by

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

                V N 2 Replies Last reply Reply Quote 0
                • V
                  vip @admin last edited by

                  @admin ok thanks.

                  1 Reply Last reply Reply Quote 0
                  • S
                    s4ntosh @admin last edited by

                    @admin while your team is working on a resolution, please provide a way or a code snippet to reconnect the WebSocket , this will be really helpful as the connection to the host was lost error is coming every now and then.

                    A 1 Reply Last reply Reply Quote 0
                    • A
                      admin @s4ntosh last edited by

                      Hi @s4ntosh You can use the websocket now the above mentioned issue is solved.

                      S 2 Replies Last reply Reply Quote 0
                      • S
                        s4ntosh @admin last edited by

                        @admin Screenshot_10.jpg

                        This has happened today at 12:24 again, this time with a different error code

                        A 1 Reply Last reply Reply Quote 0
                        • A
                          admin @s4ntosh last edited by

                          HI @s4ntosh How many scripts you are passing.

                          tester12345 2 Replies Last reply Reply Quote 0
                          • tester12345
                            tester12345 @admin last edited by tester12345

                            @admin same is happening with me.
                            I am getting more 3 errors:

                            [WinError 10053] An established connection was aborted by the software in your host machine
                            and
                            [WinError 10054] An existing connection was forcibly closed by the remote host
                            and
                            [SSL: SSLV3_ALERT_BAD_RECORD_MAC] sslv3 alert bad record mac (_ssl.c:2633)

                            I am passing around 12 to 15 scripts.

                            nse_cm|20374&nse_cm|881&nse_cm|1333&nse_cm|4870&nse_cm|1594&nse_cm|2885&nse_cm|2963&nse_cm|21808&nse_cm|3045&nse_cm|3351&nse_cm|3456&nse_cm|3499

                            tester12345 1 Reply Last reply Reply Quote 0
                            • V
                              vip last edited by vip

                              @admin Getting error today as well.

                              2021-06-16 13:18:27.514597 : Start task in the background
                              {'task': 'hb', 'channel': '', 'token': '', 'user': 'V232487', 'acctid': 'V232487'}
                              Error info: Connection to remote host was lost.
                              Connection to remote host was lost.
                              2021-06-16 13:18:57.519762 : Start task in the background
                              {'task': 'hb', 'channel': '', 'token': '', 'user': 'V232487', 'acctid': 'V232487'}
                              HeartBeat Sending Failed
                              2021-06-16 13:19:27.524737 : Start task in the background
                              {'task': 'hb', 'channel': '', 'token': '', 'user': 'V232487', 'acctid': 'V232487'}
                              HeartBeat Sending Failed
                              2021-06-16 13:19:57.530171 : Start task in the background
                              {'task': 'hb', 'channel': '', 'token': '', 'user': 'V232487', 'acctid': 'V232487'}
                              HeartBeat Sending Failed
                              2021-06-16 13:20:27.535489 : Start task in the background
                              {'task': 'hb', 'channel': '', 'token': '', 'user': 'V232487', 'acctid': 'V232487'}
                              HeartBeat Sending Failed
                              2021-06-16 13:20:57.541105 : Start task in the background
                              {'task': 'hb', 'channel': '', 'token': '', 'user': 'V232487', 'acctid': 'V232487'}
                              HeartBeat Sending Failed

                              tester12345 1 Reply Last reply Reply Quote 0
                              • tester12345
                                tester12345 @admin last edited by

                                @admin also

                                Heartbeat sending failed.

                                e94e0f24-c985-4f34-b0e3-8394e6b96279-image.png

                                1 Reply Last reply Reply Quote 0
                                • tester12345
                                  tester12345 @vip last edited by

                                  @vip trying doing pip install smartapi-python --force-reinstall and run again.

                                  1 Reply Last reply Reply Quote 0
                                  • tester12345
                                    tester12345 @tester12345 last edited by

                                    @admin any update on this?

                                    1 Reply Last reply Reply Quote 0
                                    • S
                                      s4ntosh @admin last edited by

                                      @admin Min of 2, max I have tried is 3 scrips.

                                      A 2 Replies Last reply Reply Quote 0
                                      • A
                                        admin @s4ntosh last edited by admin

                                        This post is deleted!
                                        1 Reply Last reply Reply Quote 0
                                        • A
                                          admin @s4ntosh last edited by

                                          Hi @s4ntosh We reported this to our team we will update you on this.

                                          1 Reply Last reply Reply Quote 0
                                          • A
                                            abhijith last edited by

                                            This post is deleted!
                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post