4.6 - API session user not removed from active user list ...

Hi,

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?

Thanks,
Petr

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.

OK, I can send suppout file, but I think that they know what the bug is about. Taken from 3.25 changelog:

*) api - closed sessions were not removed from the ‘/user active’ list;

From the thread you suggested, it is not clear what version was the user using …

EDIT: btw - this happens from python API wrapper, as well as from my REBOL tests, so I think I am not doing anything wrong with REBOL …

-pekr-

I thought it was clear.

This user tried with a couple different languages, with exactly the same result.

confirm this bug

have you tested previous versions? at least in v4.2 all is still okay

Ok . i will follow my other thread http://forum.mikrotik.com/t/php-api-connection/33417/1 here because this board is more popular .





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

I received a reply from Mikrotik Support

Hello,


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.


Regards,
Maris
\

Just for share

anyway, it’s about active users, not challenge…

ummmmmmmmm . you mean “cannot get challenge” will not solve ?!

I mean, I don’t see any connection between those two things…

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

this IS fixed in v5, but it’s still RC…

I’m currently using 5.0v and the problems remains… any suggestion ?

v5.0rc4 is definitely removes logged-out API connections. what exact version do you use?

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.