Re: CGI/Execute: The remote server returned an error: (401) Unauthorized.

Version 1
    This document was generated from CDN thread

    Created by: Mayank Sharma on 04-02-2009 05:21:19 PM
    Today, I tried to work with this again and now I am getting CiscoIPPhoneError Number="4".

    I am aware that this is an authentication error.

    Yesterday, I tried to change the authentication server for my phone and thats when I got this error. I removed the authentication server so that the phone uses the default, saved it and have soft/hard restarted my phone multiple times but even then I see this error.

    When I look thru WireShark, the request sends credentials fine, but the phone does not even try to forward my credentials to the authentication server anymore.

    Edit: It just responds with a CiscoIPPhoneError.

    Any ideas...

    Thanks,
    Max

    Edited by: Mayank Sharma on Feb 4, 2009 3:45 PM

    Edited by: Mayank Sharma on Feb 4, 2009 3:47 PM

    Subject: Re: CGI/Execute: The remote server returned an error: (401) Unauthorized.
    Replied by: David Staudt on 04-02-2009 07:46:51 PM
    The behavior and pcap look a little weird...is this a Cisco device? What model?

    Can you provide the pcap for the latest run where it returns Bad Request?

    Subject: Re: CGI/Execute: The remote server returned an error: (401) Unauthorized.
    Replied by: Mayank Sharma on 05-02-2009 01:12:30 PM
    The "Bad request" was actually returned by IE 7. IE doesn't even give me a box to provide user credentials. When I run CGI/Execute using firefox, I get a popup to provide my username and password and then get the CiscoIPPhoneError in the browser.

    Subject: Re: CGI/Execute: The remote server returned an error: (401) Unauthorized.
    Replied by: David Staudt on 05-02-2009 05:15:36 PM
    If this capture is from the PC switch port on the phone itself, it looks like the phone does not attemp to reach or cannot reach its authentication URL.

    • Check that the Authentication URL is the default (i.e. empty on the phone's config page)
    • Check the Enterprise Parameters page to check the default URL. Is this URL reachable by the phone? If the URL contains a host name for the CM - not an IP address - the phone may not be able to look it up via DNS. 

    You can validate the authentication URL by using a browser to request the Authentication page. The form should be something like this:

    http://[ucm-ip-address]/ccmcip/authenticate.jsp?UserID=dstaudt&Password=12345&devicename=SEP00070EB9C4B4


    Subject: Re: CGI/Execute: The remote server returned an error: (401) Unauthorized.
    Replied by: Mayank Sharma on 05-02-2009 06:57:51 PM
    1. Authentication url for the phone is default, i.e. empty.
    2. It looks like it is reachable. It has an IP address instead of a name. I can login on the phone, I can login on CCMUser page.

    Enterprise URL: http://<IP>/InformaCast/phone/auth

    When I try to test it with a browser, I get UN-AUTHORIZED as a response.

    Here's what I did:

    1. http://<InformaCast IP>/InformaCast/phone/auth?UserID=msharma&#38;Password=12345&#38;devicename=SEP000AB2E24568

    2. It redirects this request to:

    http://<CUCM IP>/ccmcip/authenticate.jsp?UserID=msharma&#38;Password=12345&#38;devicename=SEP000AB2E24568

    3. I get response: UN-AUTHORIZED

    Is there anything else I can check?

    Thanks for all your help,
    Max

    Subject: Re: CGI/Execute: The remote server returned an error: (401) Unauthorized.
    Replied by: Mayank Sharma on 05-02-2009 09:36:09 PM
    Ok...now I am back to 401 Unauthorized message. Something was probably cached and that is why the phone was rejecting my credentials right away.

    So now it's sending it to the server, but the server is rejecting my credentials.

    This is weird.

    Subject: Re: CGI/Execute: The remote server returned an error: (401) Unauthorized.
    Replied by: David Staudt on 05-02-2009 10:09:58 PM
    It seems the phone is working ok...this is where I would concentrate:

    2. It redirects this request to:

    http://<CUCM IP>/ccmcip/authenticate.jsp?UserID=msharma&#38;
    Password=12345&#38;devicename=SEP000AB2E24568

    3. I get response: UN-AUTHORIZED

    Until CM returns AUTHORIZED it's not going to work. Things to check:

    • Username/pw are correct
    • Username/pw are in the correct case (case-sensitive)
    • User is not set to change pw on next login/expired pw, etc.
    • User is associated to the phone you are attempting to auth for

    Subject: Re: CGI/Execute: The remote server returned an error: (401) Unauthorized.
    Replied by: Mayank Sharma on 06-02-2009 01:15:52 PM
    It turns out the username was also case sensitive, thanks to your tip.

    Whenever I used to login on CCM-User page, I never used a case sensitive user name. I always used to type my user name in lower case and used to get authenticated. I never thought it would be case sensitive in this case.

    Thanks so much, I never would have thought about that.
    Max