iotcreators.com web
    • Login
    • Search
    • forum.iotcreators.com
    • docs.iotcreators.com
    • Tags
    • Popular
    • Recent
    • Register

    TCP listener seems to be killed or stalled

    Network & Coverage
    tcp listerer killed
    2
    10
    128
    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.
    • A
      Adriaan last edited by

      Hello all, I have this strange experience.

      We have an NB-IOT and CAT M1 SOS button, that works 100% on a Chinese platform, but as soon as I point the button to my clients Windows Azure server or my own Linux server, it seems to kill or stall the TCP listener.

      I think is has something to do with the messages being malformed, or TTL or EOL or EOF or so. But I am not an expert.

      Do you have any idea how I can analyze this problem?

      On my Linux, my listener is started like this:

      netcat -k -l <port>
      

      and then parsed by a script.

      I have a couple of cronjobs running on 3 machines that emulate the NB-IoT message. That works 100% fine, over long time.

      Yet, as soon as I point the button to my Linux system, it stalls.

      I don’t get it. Maybe someone here?

      Thanks, Adriaan

      K 1 Reply Last reply Reply Quote 0
      • K
        Kolja Vornholt @Adriaan last edited by

        @Adriaan I would recommend to do a tcpdump (but limit to the port you are using) and save it fo a file (-w option). then analyze this dump with Wireshark.

        A 1 Reply Last reply Reply Quote 0
        • A
          Adriaan @Kolja Vornholt last edited by

          @Kolja-Vornholt Thanks. I have tcpdumped my ass off already. :-) Anything particular that I can look for while using tcpdump?

          1 Reply Last reply Reply Quote 0
          • K
            Kolja Vornholt last edited by

            @Adriaan Could you share a screenshot of your Wireshark Log with us?

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

              Hello Kolja,

              I have a tcap file, but that contains many request. I would not know what to show. I do have the idea though that the button does not always sends the [F.] flag.

              I will run the following for a while:

              tcpdump -i <interface> "tcp[tcpflags] & (tcp-fin) != 0" >> file.txt
              

              Schermafbeelding 2021-07-07 om 08.37.17.png

              1 Reply Last reply Reply Quote 0
              • K
                Kolja Vornholt last edited by

                You think that he button does not close the TCP socket correctly (meaning without sending FIN)?

                A 1 Reply Last reply Reply Quote 0
                • A
                  Adriaan @Kolja Vornholt last edited by

                  @Kolja-Vornholt Yes, a quick analysis hints to that, but I need more time.

                  Is there any way in which I can use wireshark to check pcap file for FIN messages, AND in relation to an IP number? (

                  Again, I am sorry, not a big expert here
                  Again: Thanks for your help.

                  K 1 Reply Last reply Reply Quote 0
                  • K
                    Kolja Vornholt @Adriaan last edited by

                    @Adriaan Can you share the pcap file with us?

                    A 1 Reply Last reply Reply Quote 0
                    • A
                      Adriaan @Kolja Vornholt last edited by

                      @Kolja-Vornholt Yes. I will make a nice clean one from 1 hour or so. Ok?

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

                        Dear all,

                        Thanks to hints from @Kolja-Vornholt , I found a link that with forking works great for me: Sending the input to my parser with socat. All request will now be handled by their own fork.

                        Example for Linux:

                        socat -u TCP4-LISTEN:4445,keepalive,reuseaddr,fork STDOUT | php -f /bin/parseTCPdata4445.php
                        

                        Thanks to this post:
                        https://stackoverflow.com/questions/44886399/output-a-linux-command-to-a-url-port-or-scocket-instead-of-writing-it-to-a-file/68299500#68299500

                        Thanks again, @Kolja-Vornholt

                        1 Reply Last reply Reply Quote 0
                        • Referenced by  A aliza izaton 
                        • 1 / 1
                        • First post
                          Last post