Skip to content

client isConnected [possible BUG] #55

Closed

Description

@Schrolli91

The client will check his connect status by send a packet with <keep-alive>.
But its possible that the client will spam this packet to the server instance.
We should take a network record (wireshark) and check how many packets are sent by this mechanism.

There is also a problem with the error handling if received data are broken:

20.09.2020 21:25:01,286 - Thread-6        server          handle             [DEBUG   ] Thread-6 192.168.192.### recv header: '12        '
20.09.2020 21:25:01,287 - Thread-6        server          handle             [DEBUG   ] Thread-6 192.168.192.### recv 10 bytes:

<keep-aliv
20.09.2020 21:25:01,287 - Thread-6        server          handle             [DEBUG   ] Add data to queue
20.09.2020 21:25:01,288 - Thread-6        server          handle             [DEBUG   ] Thread-6 192.168.192.### send: [ack]
20.09.2020 21:25:01,290 - Thread-6        server          handle             [INFO    ] Client disconnected: 192.168.192.###
20.09.2020 21:25:01,367 - MainThread      bw_server       <module>           [INFO    ] get data from 192.168.192.### (waited in queue 0.079 sec.)
20.09.2020 21:25:01,368 - MainThread      bw_server       <module>           [DEBUG   ] 0 packet(s) still waiting in queue
20.09.2020 21:25:01,368 - MainThread      packet          init           [DEBUG   ] create bwPacket from string
20.09.2020 21:25:01,368 - MainThread      bw_server       <module>           [ERROR   ] BOSWatch interrupted by an error
Traceback (most recent call last):
  File "bw_server.py", line 101, in <module>
    bwPacket = Packet((data[1]))
  File "/opt/boswatch3/boswatch/packet.py", line 35, in init
    self._packet = eval(str(bwPacket.strip()))
  File "<string>", line 1
    <keep-aliv
    ^
SyntaxError: invalid syntax
20.09.2020 21:25:01,370 - MainThread      bw_server       <module>           [DEBUG   ] Starting shutdown routine

Activity

  1. changed the title [-]client isConnected [possible problem][/-] [+]client isConnected [possible BUG][/+] on Sep 22, 2020
  2. wattenre commented on Aug 7, 2021

    @wattenre
    07.08.2021 14:19:42,851 - Thread-3        server          handle             [DEBUG   ] Thread-3 172.27.236.5 recv header: '12        '
    07.08.2021 14:19:42,852 - Thread-3        server          handle             [DEBUG   ] Thread-3 172.27.236.5 recv 6 bytes:
    <keep-
    07.08.2021 14:19:42,852 - Thread-3        server          handle             [DEBUG   ] Add data to queue
    07.08.2021 14:19:42,852 - Thread-3        server          handle             [DEBUG   ] Thread-3 172.27.236.5 send: [ack]
    07.08.2021 14:19:42,887 - Thread-3        server          handle             [INFO    ] Client disconnected: 172.27.236.5
    07.08.2021 14:19:42,949 - MainThread      bw_server       <module>           [INFO    ] get data from 172.27.236.5 (waited in queue 0.097 sec.)
    07.08.2021 14:19:42,950 - MainThread      bw_server       <module>           [DEBUG   ] 0 packet(s) still waiting in queue
    07.08.2021 14:19:42,950 - MainThread      packet          __init__           [DEBUG   ] create bwPacket from string
    07.08.2021 14:19:42,950 - MainThread      bw_server       <module>           [ERROR   ] BOSWatch interrupted by an error
    Traceback (most recent call last):
      File "bw_server.py", line 101, in <module>
        bwPacket = Packet((data[1]))
      File "/opt/boswatch3/boswatch/packet.py", line 35, in __init__
        self._packet = eval(str(bwPacket.strip()))
      File "<string>", line 1
        <keep-
        ^
    SyntaxError: invalid syntax
    07.08.2021 14:19:42,964 - MainThread      bw_server       <module>           [DEBUG   ] Starting shutdown routine
    07.08.2021 14:19:42,964 - MainThread      routerManager   cleanup            [DEBUG   ] Start cleanup for RouterMainPOC
    07.08.2021 14:19:42,965 - MainThread      moduleBase      _cleanup           [DEBUG   ] [module.filter.modeFilter] onUnload()
    07.08.2021 14:19:42,965 - MainThread      moduleBase      _cleanup           [DEBUG   ] [module.filter.regexFilter] onUnload()
    07.08.2021 14:19:42,965 - MainThread      moduleBase      _cleanup           [DEBUG   ] [module.filter.doubleFilter] onUnload()
    07.08.2021 14:19:42,965 - MainThread      moduleBase      _cleanup           [DEBUG   ] [module.descriptor] onUnload()
    07.08.2021 14:19:42,966 - MainThread      routerManager   cleanup            [DEBUG   ] Start cleanup for RouterAlarm
    07.08.2021 14:19:42,966 - MainThread      moduleBase      _cleanup           [DEBUG   ] [module.filter.regexFilter] onUnload()
    07.08.2021 14:19:42,966 - MainThread      pluginBase      _cleanup           [DEBUG   ] [plugin.fcmrts] onUnload()
    07.08.2021 14:19:42,966 - MainThread      pluginBase      _cleanup           [DEBUG   ] [plugin.telegram] onUnload()
    07.08.2021 14:19:42,966 - MainThread      routerManager   cleanup            [DEBUG   ] Start cleanup for RouterLog
    07.08.2021 14:19:42,967 - MainThread      pluginBase      _cleanup           [DEBUG   ] [plugin.mysql] onUnload()
    07.08.2021 14:19:43,260 - MainThread      server          stop               [DEBUG   ] TCPServer stopped
    07.08.2021 14:19:43,260 - MainThread      broadcast       stop               [WARNING ] udp broadcast server always stopped
    07.08.2021 14:19:43,260 - MainThread      bw_server       <module>           [DEBUG   ] BOSWatch server has stopped ...
    
    Aug 07 14:19:43 openvpn-vm python3[26715]:   File "/opt/boswatch3/boswatch/network/server.py", line 53, in handle
    Aug 07 14:19:43 openvpn-vm python3[26715]:     length = int(header.strip())
    Aug 07 14:19:43 openvpn-vm python3[26715]: ValueError: invalid literal for int() with base 10: 'alive>12'
    
  3. KoenigMjr commented on Jun 10, 2026

    @KoenigMjr
    Contributor

    #155 dürfte unmittelbar mit dem Issue zusammenhängen

  4. Schrolli91 commented on Jul 7, 2026

    @Schrolli91
    MemberAuthor

    Hotfix is merged - a better solution will be provides as well after testing is finished

  5. 1 remaining item

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions