Community discussions

MikroTik App
 
User avatar
kijomabb
just joined
Topic Author
Posts: 2
Joined: Mon Jul 20, 2009 9:24 am
Location: England
Contact:

"cannot get challenge"

Mon Jul 20, 2009 9:31 am

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'
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: "cannot get challenge"

Mon Jul 20, 2009 9:46 am

is api enabled, what router are you using?
 
User avatar
kijomabb
just joined
Topic Author
Posts: 2
Joined: Mon Jul 20, 2009 9:24 am
Location: England
Contact:

Re: "cannot get challenge"

Mon Jul 20, 2009 12:16 pm

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
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: "cannot get challenge"

Mon Jul 20, 2009 1:10 pm

make supout.rif and send it to support@mikrotik.com
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: "cannot get challenge"

Mon Jul 20, 2009 1:13 pm

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.
 
Ozelo
Member
Member
Posts: 338
Joined: Fri Jun 02, 2006 3:56 am

Re: "cannot get challenge"

Thu Jul 23, 2009 9:20 pm

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
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: "cannot get challenge"

Thu Jul 23, 2009 11:07 pm

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...
make supout.rif and send it to support@mikrotik.com
 
Ozelo
Member
Member
Posts: 338
Joined: Fri Jun 02, 2006 3:56 am

Re: "cannot get challenge"

Fri Jul 24, 2009 2:48 pm

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.
 
Ozelo
Member
Member
Posts: 338
Joined: Fri Jun 02, 2006 3:56 am

Re: "cannot get challenge"

Fri Jul 24, 2009 2:51 pm

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.
 
jparsons
Frequent Visitor
Frequent Visitor
Posts: 83
Joined: Sat Feb 18, 2006 5:41 pm
Location: Maryville, TN
Contact:

Re: "cannot get challenge"

Tue Feb 23, 2010 1:11 am

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 ?
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: "cannot get challenge"

Wed Feb 24, 2010 2:18 pm

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
 
joeg321
just joined
Posts: 5
Joined: Fri May 28, 2004 4:08 pm

Re: "cannot get challenge"

Thu Jun 10, 2010 11:08 pm

Has anyone found a fix for this, besides rebooting? Is it fixed in the new 4.x versions?

Thanks
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: "cannot get challenge"

Fri Jun 11, 2010 1:39 am

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)
 
Vehuel
just joined
Posts: 5
Joined: Thu Sep 11, 2008 9:20 pm

Re: "cannot get challenge"

Tue Jul 06, 2010 1:26 am

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.
You do not have the required permissions to view the files attached to this post.
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: "cannot get challenge"

Thu Oct 07, 2010 1:11 pm

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.
 
taduikis
Member
Member
Posts: 436
Joined: Sat Jul 07, 2007 12:09 pm

Re: "cannot get challenge"

Thu Oct 07, 2010 1:24 pm

Well, it's at least something. Thanks again janisk.
 
djradiator
just joined
Posts: 5
Joined: Mon Mar 22, 2010 7:10 pm

Re: "cannot get challenge"

Sat Aug 20, 2011 10:39 am

I have version 4.17 on x86 and same problem. When want login to mikrotik api return message "!trap=message=cannot get challenge"... :(
 
alexandrecorrea
just joined
Posts: 22
Joined: Fri Sep 22, 2006 6:18 pm
Location: Sacramento, MG, Brasil
Contact:

Re: "cannot get challenge"

Sun Jan 22, 2012 1:31 am

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 !!
 
alexandrecorrea
just joined
Posts: 22
Joined: Fri Sep 22, 2006 6:18 pm
Location: Sacramento, MG, Brasil
Contact:

Re: "cannot get challenge"

Sun Jan 22, 2012 1:43 am

seems api daemon not closing the sessions !!!
You do not have the required permissions to view the files attached to this post.
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: "cannot get challenge"

Fri Jan 27, 2012 1:31 pm

yes, it's known problem of v4. upgrade to v5...
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: "cannot get challenge"

Fri Jan 27, 2012 1:36 pm

exactly, only solution in this case is to upgrade to 5.xx (5.12)

Who is online

Users browsing this forum: No registered users and 35 guests