Second build sold out. Message will appear here when store is ready for third build ordering.

24hr per-IP addr time limit not limiting [fixed in v1.248]

lpilpi
edited December 2018 in Problems Now Fixed
Something has gone wrong with the "24hr per-IP addr time limit" option. As I have a limited bandwidth 4G network subscription, this has been a very good option/tool to reduce to a limit the connections. Also earlier I did have some problems with a issue when someones reached the limit and was kicked off, by refreshing the page, did "erase" the time used and begin again at 0 minutes of use. But now this function did not work at all. Now this message appear in the log for every connections:"TLIMIT exempt local connection from xx.xxx.xxx.xxx " and not the "TLIMIT - IP connecting LIMIT OKAY cur:10 < lim 300 for xxx.xxx.xxx.xxx" as before. This also happens to another Kiwi SDR I have at another QTH.

Levi
Norway

Comments

  • This bug was a race condition between the maintenance of the 24hr time limit database (connect time versus ip address) and the watchdog process that happens when a network connection is closed. If you kept refreshing after being kicked you could often times get back in even though your time had expired.

    Also, multiple connections are now counted cumulatively towards the limit. So if there is a limit of two minutes in 24 hours, and you have made two simultaneous connections, both of the connections will be kicked after one minute as you have consumed your two minutes of total connect time.
  • edited December 2018
    Hi John,

    I think there is a problem with v1.248

    I updated my main KiWi earlier today and it ran OK.

    But now several hours later I can't log into the web interface either as a user or admin.

    I have a 30 min inactivity and 120 min IP timeout set.

    I could SSH in as root on the local network, but it didn't seem to be able to find some directories.

    I tried a restart (cribbed from the other thread) using

    "cdp" (cd project)
    "mi" (make install)
    "ku" (kiwi up)
    wait a bit
    "ms" (check status)

    and it came back up.

    Any ideas ?

    Regards,

    Martin - G8JNJ
  • Anyone else? This report is so vague I don't know where to begin. "Find some directories"? What does that mean exactly?
  • edited December 2018
    Forced update, no issues seen here. To qualify that I'll set a short timeout and see if I can break it.
  • I did a force updated earlier today, and no issues seen here either. It works nicely. Test it with different short times limits, and had no problem to log in to the admin page either. And the previous problems has gone! tnx!

    Levi
  • "This report is so vague I don't know where to begin. "Find some directories"? What does that mean exactly?"

    Hi John,

    Yes it is vague - sorry about that.

    I tired to get a grab of the terminal screen and log whilst running some commands (Unfortunately I'm not a Linux Guru) but for some reason it didn't catch them, by which time the KiWi had rebooted. The only error messages I could remember were several that said something along the lines of "unable to find directory".

    It's behaved OK since the rebuild, so I'll just keep my eye on it to see if it lock out again later today when there has been some extended use that may cause the timeout to kick in.

    If this happens again, what commands should I use to try and capture suitable diagnostic information ?

    Regards,

    Martin - G8JNJ
  • I prefer to send the syslog output (duplicate) to a remote (linux) host, much easier to see how the process is going.

    On the remote syslog server something like
    "tail -f /var/log/messages | grep -i 'kiwisdr'"

    I was going to see if there still syslog servers for Windows kicking about but one I used years ago amusingly called "Kiwi Syslog" seems to be $300 now, PTRG still do one a part of the free package but they do tend to follow up with lots of emails or at least did last time I tried their stuff.
    Most if not all Linux distros can have their syslog server edited to accept remote connections so my preference is for $0 and a few lines of code copy-pasted from the internet.
  • Screenshots of suspicious looking messages can be useful. I don't know the keyboard sequence on Windows, but on a Mac it's command-shift-3. Scrolling the Kiwi log (admin page, log tab) to the end and screen-shotting that is sometimes interesting.

    And in the case of user interface problems it's essential to capture the browser's javascript/console log (Mac: Firefox cmd-alt-K, Chrome cmd-alt-J, Safari cmd-alt-C; probably ctrl key instead of cmd on Windows).
Sign In or Register to comment.