As you can see in the attached log, it took me 108 request to reproduce this error. The relevant error is the HTTPError with the 401 status and 'x-lazr-oopsid': 'OOPS-1157EB154', I will report another bug for the 404 I get when I try to get the mugshot of a user who uses the default one.
(Side Note: yes I'm running this code in a multithreaded environment, but all launchpadlib related things *should* be excecuted in one thread, because I'm not sure how threadsafe launchpadlib/httplib2/... is)
********** HTTPError **********
{'status': '401', 'x-lazr-oopsid': 'OOPS-1157EB154', 'via': '1.1 wildcard.edge.launchpad.net', 'x-powered-by': 'Zope (www.zope.org), Python (www.python.org)', 'content-length': '678', 'server': 'zope.server.http (HTTP)', 'date': 'Mon, 02 Mar 2009 21:28:11 GMT', 'content-type': 'text/plain'}
Invalid nonce/timestamp: This nonce has been used already.
Traceback (most recent call last):
File "/srv/edge.launchpad.net/edge/launchpad/lib/zope/publisher/publish.py", line 127, in publish
publication.beforeTraversal(request)
File "/srv/edge.launchpad.net/edge/launchpad/utilities/../lib/canonical/launchpad/webapp/publication.py", line 177, in beforeTraversal
principal = self.getPrincipal(request)
File "/srv/edge.launchpad.net/edge/launchpad/utilities/../lib/canonical/launchpad/webapp/servers.py", line 1296, in getPrincipal
raise Unauthorized('Invalid nonce/timestamp: %s' % e)
Unauthorized: Invalid nonce/timestamp: This nonce has been used already.
As you can see in the attached log, it took me 108 request to reproduce this error. The relevant error is the HTTPError with the 401 status and 'x-lazr-oopsid': 'OOPS-1157EB154', I will report another bug for the 404 I get when I try to get the mugshot of a user who uses the default one.
(Side Note: yes I'm running this code in a multithreaded environment, but all launchpadlib related things *should* be excecuted in one thread, because I'm not sure how threadsafe launchpadlib/ httplib2/ ... is)
I Think this is the relevant part:
send: 'GET /beta/~dholbach HTTP/1.1\r\nHost: api.edge. launchpad. net:443\ r\nAccept- Encoding: identity\ r\nAuthorizatio n: OAuth realm="https:/ /api.launchpad. net", oauth_nonce= "42765000" , oauth_timestamp ="1236029288" , oauth_consumer_ key="just testing", oauth_signature _method= "PLAINTEXT" , oauth_version= "1.0", oauth_token= "XXXXXXXXXXXXXX XXXXXX" , oauth_signature ="&YYYYY" \r\nif- none-match: "18ccbcd26d4e61 b6042fc8feb0035 4707f6d25d3" \r\nte: deflate, gzip\r\naccept: application/ json\r\ nuser-agent: Python- httplib2/ $Rev: 259 $\r\n\r\n'
reply: 'HTTP/1.1 200 Ok\r\n'
header: Date: Mon, 02 Mar 2009 21:28:09 GMT
header: Server: zope.server.http (HTTP)
header: X-Powered-By: Zope (www.zope.org), Python (www.python.org)
header: Content-Type: application/json
header: Content-Length: 2683
header: Etag: "deeb9afb4132b3 4a911c54a536a32 6a31773cb9e"
header: Vary: Cookie, Authorization, Accept
header: Via: 1.1 wildcard. edge.launchpad. net
send: 'GET /beta/people/+me HTTP/1.1\r\nHost: api.edge. launchpad. net:443\ r\nAccept- Encoding: identity\r\nte: deflate, gzip\r\ nAuthorization: OAuth realm="https:/ /api.launchpad. net", oauth_nonce= "77356919" , oauth_timestamp ="1236029288" , oauth_consumer_ key="just testing", oauth_signature _method= "PLAINTEXT" , oauth_version= "1.0", oauth_token= "XXXXXXXXXXXXXX XXXXXX" , oauth_signature ="&YYYYY" \r\naccept: application/ json\r\ nuser-agent: Python- httplib2/ $Rev: 259 $\r\n\r\n'
reply: 'HTTP/1.1 303 See Other\r\n'
header: Date: Mon, 02 Mar 2009 21:28:09 GMT
header: Server: zope.server.http (HTTP)
header: X-Powered-By: Zope (www.zope.org), Python (www.python.org)
header: X-Content- Type-Warning: guessed from content
header: Content-Length: 0
header: Location: https:/ /api.edge. launchpad. net/beta/ ~thekorn
header: Vary: Cookie, Authorization, Accept
header: Content-Type: text/plain; charset= utf-8
header: Via: 1.1 wildcard. edge.launchpad. net
send: 'GET /beta/~thekorn HTTP/1.1\r\nHost: api.edge. launchpad. net:443\ r\nAccept- Encoding: identity\r\naccept: application/ json\r\ nuser-agent: Python- httplib2/ $Rev: 259 $\r\nif-none-match: "2d6b4bf1278e7c b5c11187e097d83 fad62957e12" \r\nte: deflate, gzip\r\ nAuthorization: OAuth realm="https:/ /api.launchpad. net", oauth_nonce= "63277318" , oauth_timestamp ="1236029289" , oauth_consumer_ key="just testing", oauth_signature _method= "PLAINTEXT" , oauth_version= "1.0", oauth_token= "XXXXXXXXXXXXXX XXXXXX" , oauth_signature ="&YYYYY" \r\n\r\ n'
reply: 'HTTP/1.1 304 Not Modified\r\n'
header: Date: Mon, 02 Mar 2009 21:28:09 GMT
header: Server: zope.server.http (HTTP)
header: Etag: "2d6b4bf1278e7c b5c11187e097d83 fad62957e12"
header: Vary: Cookie, Authorization, Accept
send: 'GET /beta/~ dholbach/ mugshot HTTP/1.1\r\nHost: api.edge. launchpad. net:443\ r\nAccept- Encoding: identity\r\nte: deflate, gzip\r\ nAuthorization: OAuth realm="https:/ /api.launchpad. net", oauth_nonce= "17704968" , oauth_timestamp ="1236029290" , oauth_consumer_ key="just testing", oauth_signature _method= "PLAINTEXT" , oauth_version= "1.0", oauth_token= "XXXXXXXXXXXXXX XXXXXX" , oauth_signature ="&YYYYY" \r\naccept: application/ json\r\ nuser-agent: Python- httplib2/ $Rev: 259 $\r\n\r\n' dholbach/ mugshot HTTP/1.1\r\nHost: api.edge. launchpad. net:443\ r\nAccept- Encoding: identity\r\nte: deflate, gzip\r\ nAuthorization: OAuth realm="https:/ /api.launchpad. net", oauth_nonce= "17704968" , oauth_timestamp ="1236029290" , oauth_consumer_ key="just testing", oauth_signature _method= "PLAINTEXT" , oauth_version= "1.0", oauth_token= "XXXXXXXXXXXXXX XXXXXX" , oauth_signature ="&YYYYY" \r\naccept: application/ json\r\ nuser-agent: Python- httplib2/ $Rev: 259 $\r\n\r\n'
send: 'GET /beta/~
CannotSendRequest, retry
use saved state
reply: 'HTTP/1.1 401 Unauthorized\r\n'
header: Date: Mon, 02 Mar 2009 21:28:11 GMT
header: Server: zope.server.http (HTTP)
header: X-Powered-By: Zope (www.zope.org), Python (www.python.org)
header: X-Lazr-Oopsid: OOPS-1157EB154
header: Content-Type: text/plain
header: Content-Length: 678
header: Via: 1.1 wildcard. edge.launchpad. net
********** HTTPError ********** edge.launchpad. net', 'x-powered-by': 'Zope (www.zope.org), Python (www.python.org)', 'content-length': '678', 'server': 'zope.server.http (HTTP)', 'date': 'Mon, 02 Mar 2009 21:28:11 GMT', 'content-type': 'text/plain'}
{'status': '401', 'x-lazr-oopsid': 'OOPS-1157EB154', 'via': '1.1 wildcard.
Invalid nonce/timestamp: This nonce has been used already.
Traceback (most recent call last): launchpad. net/edge/ launchpad/ lib/zope/ publisher/ publish. py", line 127, in publish .beforeTraversa l(request) launchpad. net/edge/ launchpad/ utilities/ ../lib/ canonical/ launchpad/ webapp/ publication. py", line 177, in beforeTraversal al(request) launchpad. net/edge/ launchpad/ utilities/ ../lib/ canonical/ launchpad/ webapp/ servers. py", line 1296, in getPrincipal 'Invalid nonce/timestamp: %s' % e)
File "/srv/edge.
publication
File "/srv/edge.
principal = self.getPrincip
File "/srv/edge.
raise Unauthorized(
Unauthorized: Invalid nonce/timestamp: This nonce has been used already.
******* ******* ******* ******* ** dholbach/ +archive/ ppa HTTP/1.1\r\nHost: api.edge. launchpad. net:443\ r\nAccept- Encoding: identity\ r\nAuthorizatio n: OAuth realm="https:/ /api.launchpad. net", oauth_nonce= "14654693" , oauth_timestamp ="1236029291" , oauth_consumer_ key="just testing", oauth_signature _method= "PLAINTEXT" , oauth_version= "1.0", oauth_token= "XXXXXXXXXXXXXX XXXXXX" , oauth_signature ="&YYYYY" \r\nif- none-match: "ba856284c03e42 f7dced4207f3437 c18a6a64ed9" \r\nte: deflate, gzip\r\naccept: application/ json\r\ nuser-agent: Python- httplib2/ $Rev: 259 $\r\n\r\n'
send: 'GET /beta/~
reply: 'HTTP/1.1 200 Ok\r\n'
header: Date: Mon, 02 Mar 2009 21:28:11 GMT
header: Server: zope.server.http (HTTP)
header: X-Powered-By: Zope (www.zope.org), Python (www.python.org)
header: Content-Type: application/json
header: Content-Length: 496
header: Etag: "8c0f23e82aa533 7007363ac8736ee bdcd1d97829"
header: Vary: Cookie, Authorization, Accept
header: Via: 1.1 wildcard. edge.launchpad. net
send: 'get /beta/~ dholbach/ +archive/ ppa?ws. op=getPublished Sources HTTP/1.1\r\nHost: api.edge. launchpad. net:443\ r\nAccept- Encoding: identity\ r\nAuthorizatio n: OAuth realm="https:/ /api.launchpad. net", oauth_nonce= "20834170" , oauth_timestamp ="1236029291" , oauth_consumer_ key="just testing", oauth_signature _method= "PLAINTEXT" , oauth_version= "1.0", oauth_token= "XXXXXXXXXXXXXX XXXXXX" , oauth_signature ="&YYYYY" \r\naccept: application/ json\r\ nuser-agent: Python- httplib2/ $Rev: 259 $\r\n\r\n'
reply: 'HTTP/1.1 200 Ok\r\n'
header: Date: Mon, 02 Mar 2009 21:28:11 GMT
header: Server: zope.server.http (HTTP)
header: X-Powered-By: Zope (www.zope.org), Python (www.python.org)
header: Content-Type: application/json
header: Content-Length: 8384
header: Vary: Cookie, Authorization, Accept
header: Via: 1.1 wildcard. edge.launchpad. net
CLOSE