Page 1 of 1

HTTP auth failing

Posted: Tue Nov 17, 2015 11:14 pm
by imnoboist
This is a cross post from the ZM GitHub issues list. They suggested posting here for help.

I have an AXIS P3214-V and ZM only reports the following logs when trying to connect to the MJPG stream with HTTP:

Code: Select all

Nov 13 11:20:38 shadow zmc_m2[37463]: ERR [Failed authentication: ]
Nov 13 11:20:38 shadow zmc_m2[37463]: ERR [Unable to get response]
Further investigation created these logs with debugging enabled:

Code: Select all

Nov 13 12:26:29 shadow zmc_m2[2011]: DB2 [HA1 pre-md5: viewonly:AXIS_ACCC8E45256A:password]
Nov 13 12:26:29 shadow zmc_m2[2011]: DB2 [HA2 pre-md5: GET:/mjpg/video.mjpg]
Nov 13 12:26:29 shadow zmc_m2[2011]: DB2 [pre-md5: b8ae326e9e1e97672b2e5b83256fc528:ulLY33EkBQA:00000001:0a4f113b:auth:ade69d1be2b68919b97f126202cc49ad]
Nov 13 12:26:59 shadow zmc_m2[2011]: DB3 [HTTP/1.1 401 Unauthorized#015#012Date: Fri, 13 Nov 2015 20:26:59 GMT#015#012Server: Apache/2.4.10 (Unix) OpenSSL/0.9.8zf#015#012WWW-Authenticate: Digest realm="AXIS_ACCC8E45256A", nonce="BQ2m4XEkBQA=edae1cf866638759b9f17d71de0f3a97fbced131", algorithm=MD5, stale=true, qop="auth"#015#012Content-Length: 381#015#012Keep-Alive: timeout=5, max=100#015#012Connection: Keep-Alive#015#012Content-Type: text/html; charset=iso-8859-1#015#012#015#012<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">#012<html><head>#012<title>401 Unauthorized</title>#012</head><body>#012<h1>Unauthorized</h1>#012<p>This server could not verify that you#012are authorized to access the document#012requested. Either you supplied the wrong#012credentials (e.g., bad password), or your#012browser doesn't understand how to supply#012the credentials required.</p>#012</body></html>#012 Unauthorized]
Nov 13 12:27:02 shadow zmc_m2[2011]: DB2 [Sending request: GET /mjpg/video.mjpg HTTP/1.0#015#012User-Agent: ZoneMinder/1.28.1#015#012Host: 10.0.32.2#015#012Connection: Keep-Alive#015#012Authorization: Digest username="viewonly", realm="AXIS_ACCC8E45256A", nonce="ulLY33EkBQA", uri="/mjpg/video.mjpg", qop=auth, nc=00000001, cnonce=0a4f113b, response="671972a69a42a2ffe1f64090a9deadb9"#015#012#015#012]
However, I am able to connect successfully using wget, browser, and VLC. I have meticulously copied the settings from VLC into the source tab in ZM with no success.

I have attached a screenshot of my "Source" tab for the camera (with the user/password obfuscated).

I'm running version 1.28.1 on Ubuntu 14.04 with all the latest updates.

Thanks in advance for any help!

-Sean

Re: HTTP auth failing

Posted: Wed Nov 18, 2015 1:15 pm
by knight-of-ni
The P33 series are mentioned in the Wiki so someone has likely had this camera working:
https://wiki.zoneminder.com/Axis

If I recall, I think we added digest authentication support before we released 1.28.1

To help isolate the problem, try both and report back:
- turn off authentication if you can
- change authentication from digest to basic

Re: HTTP auth failing

Posted: Wed Nov 18, 2015 10:25 pm
by imnoboist
How strange. The auth settings were set for "Basic and Digest" so I forced it to just "Basic" and now it works... The logs do show that digest was attempted, but maybe it's buggy?

Thanks for your help and I love your avatar and handle! Best movie ever!

-Sean