Comment 12 for bug 318112

Revision history for this message
Markus Korn (thekorn) wrote :

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\nAuthorization: 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="XXXXXXXXXXXXXXXXXXXX", oauth_signature="&YYYYY"\r\nif-none-match: "18ccbcd26d4e61b6042fc8feb00354707f6d25d3"\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: "deeb9afb4132b34a911c54a536a326a31773cb9e"

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="XXXXXXXXXXXXXXXXXXXX", 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: "2d6b4bf1278e7cb5c11187e097d83fad62957e12"\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="XXXXXXXXXXXXXXXXXXXX", 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: "2d6b4bf1278e7cb5c11187e097d83fad62957e12"

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="XXXXXXXXXXXXXXXXXXXX", oauth_signature="&YYYYY"\r\naccept: application/json\r\nuser-agent: Python-httplib2/$Rev: 259 $\r\n\r\n'
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="XXXXXXXXXXXXXXXXXXXX", oauth_signature="&YYYYY"\r\naccept: application/json\r\nuser-agent: Python-httplib2/$Rev: 259 $\r\n\r\n'
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 **********
{'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.

******************************
send: 'GET /beta/~dholbach/+archive/ppa HTTP/1.1\r\nHost: api.edge.launchpad.net:443\r\nAccept-Encoding: identity\r\nAuthorization: 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="XXXXXXXXXXXXXXXXXXXX", oauth_signature="&YYYYY"\r\nif-none-match: "ba856284c03e42f7dced4207f3437c18a6a64ed9"\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: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: "8c0f23e82aa5337007363ac8736eebdcd1d97829"

header: Vary: Cookie,Authorization,Accept

header: Via: 1.1 wildcard.edge.launchpad.net

send: 'get /beta/~dholbach/+archive/ppa?ws.op=getPublishedSources HTTP/1.1\r\nHost: api.edge.launchpad.net:443\r\nAccept-Encoding: identity\r\nAuthorization: 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="XXXXXXXXXXXXXXXXXXXX", 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