just doing some experiments with API using REBOL language, and found out that each time I log, no matter how do I terminate the session (“/quit” or just closing the TCP port), I can see the list of API (demo) users is growing. I noticed that this bug was fixed in 3.25. But I am doing my tests on 4.6 - I just wonder if the fix did not get it to 4.6 branch, or I am doing something wrong?
Seems like a common problem for the V4.x OS. Another user is having exactly the same problem with V4.7. http://forum.mikrotik.com/t/php-api-connection/33417/1
I recommend the same for you. Run the script a few times to get a few active users in the list, then make a supout file and email to support (at) mikrotik.com with a short explanation of the problem, and what you have tried.
The problem is not just the growing number of active sessions . the main problem is cannot get challenge after some hours and then unable to connect to API
Thank you for the report. We are aware of this problem and it will be fixed in
next version. Currently only option to clear active users is to reboot the
router.
I am still seeing this problem in RouterOS version up to V4.13. Using the newest PHP API, when I open a connection I see the Active Users list increase by 1 with an “unknown” field in the ‘Via’ column. I am using the disconnect() function at the end of the communication, but I do not see the user ever get removed. Eventually this list will get very large with tens of thousands of active users.
I will be resubmitting this bug to the support guys just to make sure they are aware.
@Chupaka
This is when the “cannot get challenge” comes into play. It seems when the API creates enough active users the board will start refusing any more connection attempts. Turning debug on in the API returns this string. The two seem to be linked in this way from my tests.
Not really. The core issue (api connections not being cleared), should not be related to api challenge. The api challenge problem is only the side effect of multiple api connections (ex. when not cleared out). The underlying issue is that the api connections are not being cleared on disconnect. This is a known problem, and Mikrotik know about it already. They say it will be fixed in v5.x
I’m currently using v5.0rc4 … after 10 or maybe 12 operations the mikrotik returns a message like “.. Already have such name” and the connection made within Users\Active remains there and the via is “unknown”… we are currently modifying queues and this application is working fine in mikrotik up to 4.2 ! … Trying to working around I made some modification to connection software generating different tags in each operation but the problem remains.