Page 1 of 1
"cannot get challenge"
Posted: Mon Jul 20, 2009 9:31 am
by kijomabb
Hi,
The API has decided to stop working here on 3.27 / RB493AH not long after upgrading..
As can be seen below, we get the "cannot get challenge" response from the python api and we use PHP and get the same response.
Is there a way, without rebooting, to get this to work again?
We do not want to lose the data our script needs to acquire.
Thank you
<<< /login
/login
<<<
>>> !trap
>>> =message=cannot get challenge
>>>
>>> !done
>>>
Traceback (most recent call last):
File "api.py", line 165, in <module>
main()
File "api.py", line 140, in main
apiros.login(sys.argv[2], sys.argv[3]);
File "api.py", line 13, in login
chal = binascii.unhexlify(attrs['=ret'])
KeyError: '=ret'
Re: "cannot get challenge"
Posted: Mon Jul 20, 2009 9:46 am
by janisk
is api enabled, what router are you using?
Re: "cannot get challenge"
Posted: Mon Jul 20, 2009 12:16 pm
by kijomabb
hi,
3.27 / RB493AH
API is on, it has stopped responding at 4 a.m. two days after getting 3.27
it still refuses today
cheers
Re: "cannot get challenge"
Posted: Mon Jul 20, 2009 1:10 pm
by Chupaka
make supout.rif and send it to
support@mikrotik.com
Re: "cannot get challenge"
Posted: Mon Jul 20, 2009 1:13 pm
by janisk
do you have any concurrent api connections to that board, if so, then how many of those? what happens if you close some of those connections?
on my test routers i could not get the effect.
Re: "cannot get challenge"
Posted: Thu Jul 23, 2009 9:20 pm
by Ozelo
I would like to say that we have some routers that sometimes don't get challenge. Somehow, "/login" just returned "!done", nothing else. I'm still investigating, but nothing specific nor wrong found.
I wonder if there are any chance to change the login process. I mean, first you ask the router for a challenge i.e.:
/challenge
Second you really do the login i.e.:
/login
=name=admin
=response=005062f7a5ef124d34675bf3e81f56c556
I can't find a reason why just very few routers barely and rarely give you the challenge at the first "/login"
Thanks
Ozelo
Re: "cannot get challenge"
Posted: Thu Jul 23, 2009 11:07 pm
by Chupaka
I would like to say that we have some routers that sometimes don't get challenge. Somehow, "/login" just returned "!done", nothing else. I'm still investigating, but nothing specific nor wrong found.
I wonder if there are any chance to change the login process. I mean, first you ask the router for a challenge i.e.:
/challenge
no reason =)
and...
Re: "cannot get challenge"
Posted: Fri Jul 24, 2009 2:48 pm
by Ozelo
Ive found a x86 WRAP device running ROS 3.24 that stuck on giving the challenge for login via API. A reboot solve the problem, so seems that ROS API often stop working since 3.24. Its clearly NOT an API implementation issue, since I have tested most of all implementations (delphi, php, c++, etc) with the same result.
Im going to upgrade that specific device to 3.27 and see if it still happens. If so, then I will have a fresh supout for MT.
Re: "cannot get challenge"
Posted: Fri Jul 24, 2009 2:51 pm
by Ozelo
do you have any concurrent api connections to that board, if so, then how many of those? what happens if you close some of those connections?
on my test routers i could not get the effect.
Ive made up to hundred concurrent API connections on another x86 WRAP device running ROS 3.22 with absolutely no problem.
Re: "cannot get challenge"
Posted: Tue Feb 23, 2010 1:11 am
by jparsons
We are running 3.30 on our AP's and several have hit this same issue returning "message=cannot get challenge"
The only solution we currently have is to reboot the router.
Has another fix been found?
Is this issue fixed in 4.X ?
Re: "cannot get challenge"
Posted: Wed Feb 24, 2010 2:18 pm
by janisk
can you make supout.rif file from that router or any other router (running 3.30 or 4.5 (or latest current version) you get "cannot get challange" and send it to
support@mikrotik.com?
details on how make supout.rif file:
http://wiki.mikrotik.com/wiki/Supout
Re: "cannot get challenge"
Posted: Thu Jun 10, 2010 11:08 pm
by joeg321
Has anyone found a fix for this, besides rebooting? Is it fixed in the new 4.x versions?
Thanks
Re: "cannot get challenge"
Posted: Fri Jun 11, 2010 1:39 am
by Chupaka
has anyone sent supout.rif from problematic router? we don't have such issues at least on 3.28, 4.1, 4.2 and 4.6 (they have hundreds days of uptime)
Re: "cannot get challenge"
Posted: Tue Jul 06, 2010 1:26 am
by Vehuel
This is my supout.rif file from RouterOS 3.30.
This routerboard sometimes show get challenge message or show message below
Connection attempt #1 to 192.168.5.5:8728...
<<< [6] /login
>>> [5/5 bytes read.
>>> [5, 0] !done
Connection attempt #2 to 192.168.5.5:8728...
<<< [6] /login
>>> [5/5 bytes read.
>>> [5, 0] !done
Connection attempt #3 to 192.168.5.5:8728...
<<< [6] /login
>>> [5/5 bytes read.
>>> [5, 0] !done
Connection attempt #4 to 192.168.5.5:8728...
<<< [6] /login
>>> [5/5 bytes read.
>>> [5, 0] !done
Connection attempt #5 to 192.168.5.5:8728...
<<< [6] /login
>>> [5/5 bytes read.
>>> [5, 0] !done
Error...
There is no concurrent connections. My PHP script runs for 5 in 5 minutes to get routerboard usage (# of clients connected, throughput used, ...) and log information on MySQL database. All my access points reset 3 times daily (06, 12, 18h).
If I run the script multiple times, in the second or third time the login is done.
If you need more information I can give.
Thank you.
Re: "cannot get challenge"
Posted: Thu Oct 07, 2010 1:11 pm
by janisk
it is only possible to remove these active user logins by rebooting the router. Currently only version with this bug fixed is 5.0rc1
there was other problem about getting challange, you will have to use at least 4.11 for that.
Re: "cannot get challenge"
Posted: Thu Oct 07, 2010 1:24 pm
by taduikis
Well, it's at least something. Thanks again janisk.
Re: "cannot get challenge"
Posted: Sat Aug 20, 2011 10:39 am
by djradiator
I have version 4.17 on x86 and same problem. When want login to mikrotik api return message "!trap=message=cannot get challenge"...
Re: "cannot get challenge"
Posted: Sun Jan 22, 2012 1:31 am
by alexandrecorrea
Connection attempt #1 to xx.xx.x.x:8728...
<<< [6] /login
>>> [5/5] bytes read.
>>> [5, 38]!trap
>>> [29/29] bytes read.
>>> [29, 8]=message=cannot get challenge
>>> [5/5] bytes read.
>>> [5, 1]!done
running x86 4.17 !!
Re: "cannot get challenge"
Posted: Sun Jan 22, 2012 1:43 am
by alexandrecorrea
seems api daemon not closing the sessions !!!
Re: "cannot get challenge"
Posted: Fri Jan 27, 2012 1:31 pm
by Chupaka
yes, it's known problem of v4. upgrade to v5...
Re: "cannot get challenge"
Posted: Fri Jan 27, 2012 1:36 pm
by janisk
exactly, only solution in this case is to upgrade to 5.xx (5.12)