Opened 16 years ago
Closed 15 years ago
#330 closed defect (fixed)
digest auth failed on some situation
Reported by: | dlin@… | Owned by: | osimons |
---|---|---|---|
Priority: | major | Milestone: | 0.6 |
Component: | General | Version: | dev |
Keywords: | Cc: | remy.blank@… | |
Operating System: | BSD |
Description
I've setup my apache to let it pass digest auth on https://192.168.1.3/trac/prj/builds location. I don't know why the initial POST request are successful. But following POST request maybe failed. Then the bitten-slave directly leave, and can't report the compile result back.
Here is the bitten-slave's log
2008-10-22 10:29:07,860 [bitten.slave] DEBUG: Sending POST request to 'https://192.168.1.3/trac/prj/builds' 2008-10-22 10:29:09,261 [bitten.slave] INFO: No pending builds ... 2008-10-22 10:49:59,670 [bitten.slave] DEBUG: Sending POST request to 'https://192.168.1.3/trac/prj/builds' 2008-10-22 10:49:59,731 [bitten.slave] WARNING: Server returned error 401: digest auth failed 2008-10-22 10:49:59,732 [bitten.slave] ERROR: HTTP Error 401: digest auth failed
my trac.ini
[bitten] build_all = no slave_timeout = 10800 stabilize_wait = 10800
Some config in my apache conf file
Timeout 300 KeepAliveTimeout 5 SSLSessionCacheTimeout 300
Attachments (1)
Change History (10)
comment:1 Changed 16 years ago by anonymous
comment:2 Changed 16 years ago by dlin@…
I just found my bitten is use the 'python setup.py develop' to build. I've use 'svn update' to update to newest version. And I don't use the 'python setup.py develop' again.
After I run the command 'python setup.py develop' again. It workable now.
comment:3 Changed 16 years ago by Remy Blank <remy.blank@…>
- Cc remy.blank@… added
I have the same issue here on OS X with Python 2.3 and trunk at r602. The first few requests work, and then I get 401 errors (I have commented out the raise ExitSlave(EX_UNAVAILABLE) for HTTP errors).
[INFO ] No pending builds [INFO ] No pending builds [INFO ] No pending builds [INFO ] No pending builds [INFO ] No pending builds [INFO ] No pending builds [WARNING ] Server returned error 401: digest auth failed [ERROR ] HTTP Error 401: digest auth failed [WARNING ] Server returned error 401: digest auth failed [ERROR ] HTTP Error 401: digest auth failed [WARNING ] Server returned error 401: digest auth failed [ERROR ] HTTP Error 401: digest auth failed [WARNING ] Server returned error 401: digest auth failed [ERROR ] HTTP Error 401: digest auth failed [WARNING ] Server returned error 401: digest auth failed [ERROR ] HTTP Error 401: digest auth failed
The Apache configuration should be ok, as I'm building Trac from t.e.o.
comment:4 follow-up: ↓ 5 Changed 15 years ago by osimons
- Cc osimons added
- Keywords needinfo added
Is it perhaps a Python 2.3 issue? A quick web search reveals quite a few hits with discussions and various patches for problems in urllib2.
Original reporter, what version of Python was used by your build-slave?
comment:5 in reply to: ↑ 4 Changed 15 years ago by rblank
Replying to osimons:
Is it perhaps a Python 2.3 issue?
I don't think so. I observe the same issue on my 2.4 and 2.5 build slaves. All on OS X, though, so this may be BSD-related.
comment:6 Changed 15 years ago by osimons
- Cc osimons removed
- Owner changed from cmlenz to osimons
Got it. I just set up digest auth to test #208, and after a while my Python 2.4 slave produced the exact same output (also OSX). At least I have a failing configuration - that's a good start. I'll look into it.
comment:7 Changed 15 years ago by osimons
- Keywords needinfo removed
Heh. Tried bitten-slave --interval=1 to speed things up, and just like other examples above it fails after exactly 7 requests. No more, no less. So, this is no doubt an issue with the nonce and request counters used as part of digest authentication not being handled correctly - at least this is how it manifests itself using Apache digest auth. Seeing that No pending builds is actually the result of a raised 204 No response error, perhaps the opener don't get a chance to keep track of authentication?
To work around this, attachment:t330-digest_auth-r641.diff creates a new urllib2 opener for each request instead of reusing the same opener for the life of the slave.
rblank, could you apply the patch and test it for t.e.o builds? Changes are just related to the slave code, so hopefully it should just make things work as it should.
comment:8 Changed 15 years ago by rblank
14 POST requests, and no 401 error. Looks good!
comment:9 Changed 15 years ago by osimons
- Resolution set to fixed
- Status changed from new to closed
Patch committed in [643].
Look into your Apache's log and setup debug level if you are the only one sending traffic to this server.
Guess it's not a Bitten issue, but without your Apache's log it stays a guess...