replicating to ubuntuone failed after successfully pairing with it
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
desktopcouch |
Invalid
|
Undecided
|
Unassigned |
Bug Description
the pairing worked, but I don't think it replicated. I'm not sure how I can tell; is there a way I can see the couchdb stuff online In a raw way ?
Anyway, here's the log from desktopcouch attached.
Thomas Vander Stichele (thomasvs) wrote : | #1 |
Thomas Vander Stichele (thomasvs) wrote : | #2 |
Thomas Vander Stichele (thomasvs) wrote : | #3 |
With httplib2 0.5.0, I get this instead:
2009-11-24 17:17:43,148 DEBUG started replicating
2009-11-24 17:17:43,215 DEBUG replication of discovered hosts finished
2009-11-24 17:17:43,249 DEBUG static pairings are [('5d33b6ba-
2009-11-24 17:17:43,249 DEBUG Looking up prefix for service 'ubuntuone'
2009-11-24 17:17:43,249 DEBUG Looking up prefix for service 'ubuntuone'
2009-11-24 17:17:43,251 ERROR replication of services aborted
Traceback (most recent call last):
File "/usr/lib/
couchdb_
File "/usr/lib/
all_dbs = set([db_name for db_name in couchdb_server])
File "/usr/lib/
resp, data = self.resource.
File "/usr/lib/
return self._request(
File "/usr/lib/
resp, data = _make_request()
File "/usr/lib/
body=body, headers=headers)
File "/usr/lib/
(response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
File "/usr/lib/
(response, content) = self._conn_
File "/usr/lib/
response = conn.getresponse()
File "/usr/lib/
method=
File "/usr/lib/
self.fp = sock.makefile('rb', 0)
AttributeError: 'NoneType' object has no attribute 'makefile'
2009-11-24 17:17:43,254 DEBUG finished replicating
So I still don't have it working. Any idea ?
Thomas Vander Stichele (thomasvs) wrote : | #4 |
As Stuart asked me, went back to 0.4 which is what you guys deploy in ubuntu too.
After adding prints, it seems timeout is an 'object' (nothing more specific than that). Trying to figure out where it comes from.
Thomas Vander Stichele (thomasvs) wrote : | #5 |
Alright, adding a __setattr__ to the HTTPSConnection object gives me this:
THOMAS: __set__ timeout <object object at 0xb7879490>
File "/usr/lib/
self.
File "/usr/lib/
self.run()
File "/usr/lib/
self.
File "/usr/lib/
result = context.call(ctx, function, *args, **kwargs)
File "/usr/lib/
return self.currentCon
File "/usr/lib/
return func(*args,**kw)
File "/usr/lib/
urlinfo = urlparse.
File "/usr/lib/
resp, content = client.request(url, "GET", headers=
File "/usr/lib/
conn = self.connection
File "/usr/lib/
cert_
File "/usr/lib/
HTTPConnect
File "/usr/lib/
self.timeout = timeout
File "/usr/lib/
import traceback; traceback.
So, the culprit is my httplib.py, will now check there further.
Thomas Vander Stichele (thomasvs) wrote : | #6 |
Well, this is unexciting:
def __init__(self, host, port=None, strict=None,
even more unexciting, from socket.py
_GLOBAL_
I hope there is a good reason for this peculiar code in the standard Python library, or why httplib pokes into a private var, and what the point is.
Thomas Vander Stichele (thomasvs) wrote : | #7 |
ok well sigh now I figured out you guys carry a patch for httplib 0.4.0 that handles this. Fun.
Consider making it work with 0.5.0 as well, 0.4.0 predates python 2.6 hence your patching.
Thomas Vander Stichele (thomasvs) wrote : | #8 |
ok, with your patch, getting slightly further.
However, now I get:
2009-11-28 17:58:33,291 DEBUG asking 'http://
2009-11-28 18:07:05,704 ERROR can't replicate 'u/0a4/
Traceback (most recent call last):
File "/usr/lib/
content=record)
File "/usr/lib/
**params)
File "/usr/lib/
raise ServerError(
ServerError: (500, ('case_clause', '{error,\n {{{badmatch,\n {error,\n {http_request_
2009-11-28 18:07:05,706 DEBUG want to replipull 'gtd' from static host '1b67c630-
2009-11-28 18:07:05,732 DEBUG db exists, and we're ready to replicate
2009-11-28 18:07:05,739 DEBU...
Thomas Vander Stichele (thomasvs) wrote : | #9 |
Reproduced basically the same problem on my 64-bit desktop, with all packages I built installed there and no local modifications left.
2009-11-29 12:52:58,229 DEBUG found 1 self_identity records
2009-11-29 12:52:58,282 INFO starting advertising _couchdb_
2009-11-29 12:52:58,293 DEBUG started replicating
2009-11-29 12:52:58,326 DEBUG replication of discovered hosts finished
2009-11-29 12:52:58,355 DEBUG static pairings are [('94b91e6d-
2009-11-29 12:52:58,355 DEBUG Looking up prefix for service 'ubuntuone'
2009-11-29 12:52:58,389 DEBUG Looking up prefix for service 'ubuntuone'
2009-11-29 12:52:58,416 INFO No o.u.c key. Maybe there's uo.c key?
2009-11-29 12:52:58,797 DEBUG skipping record {'push_to_server': True, 'ctime': '2009-11-29 12:30', 'service_name': 'ubuntuone', '_rev': '1-325606fe9016
2009-11-29 12:52:58,797 DEBUG found 0 excluded_names records
2009-11-29 12:52:59,196 DEBUG want to replipull 'contacts' from static host '94b91e6d-
2009-11-29 12:52:59,222 DEBUG db exists, and we're ready to replicate
2009-11-29 12:52:59,232 DEBUG asking 'http://
2009-11-29 13:01:31,706 ERROR can't replicate 'u/0a4/
Traceback (most recent call last):
File "/usr/lib/
content=record)
File "/usr/lib/
**params)
File "/usr/lib/
raise ServerError(
ServerError: (500, ('case_clause', '{error,\n {{{badmatch,\n {error,\n {http_request_
Thomas Vander Stichele (thomasvs) wrote : | #10 |
with my couchdb set to debug, I see this:
[Sun, 29 Nov 2009 17:01:32 GMT] [debug] [<0.164.0>] 'POST' /_replicate {1,1}
Headers: [{'Accept'
[Sun, 29 Nov 2009 17:01:32 GMT] [debug] [<0.164.0>] OAuth Params: [{"oauth_
[Sun, 29 Nov 2009 17:01:33 GMT] [debug] [<0.166.0>] didn't find a replication log for https:/
[Sun, 29 Nov 2009 17:01:33 GMT] [debug] [<0.166.0>] didn't find a replication log for contacts
[Sun, 29 Nov 2009 17:01:33 GMT] [debug] [<0.170.0>] retrying couch_rep_httpc get request in 0.5 seconds due to {error, conn_failed}
[Sun, 29 Nov 2009 17:01:33 GMT] [debug] [<0.170.0>] retrying couch_rep_httpc get request in 1.0 seconds due to {error, worker_is_dead}
[Sun, 29 Nov 2009 17:01:34 GMT] [debug] [<0.170.0>] retrying couch_rep_httpc get request in 2.0 seconds due to {error, conn_failed}
[Sun, 29 Nov 2009 17:01:36 GMT] [debug] [<0.170.0>] retrying couch_rep_httpc get request in 4.0 seconds due to {error, worker_is_dead}
so something internally is failing, possibly the not finding the replication log.
How can I debug this further ?
Thomas Vander Stichele (thomasvs) wrote : | #11 |
It did work on my macbook btw:
[Sun, 29 Nov 2009 17:27:32 GMT] [debug] [<0.1845.0>] found a replication log for https:/
Where does it go look for these replication logs ?
Matt Griffin (mattgriffin) wrote : | #12 |
Here's one place you can find out more about CouchDB logs.
https:/
Sounds like this issue is resolved so I'm going to close it.
Changed in desktopcouch: | |
status: | New → Invalid |
This ,by the way, is with httplib2 0.4.0
Will now try with 0.5.0