Issue 197 in couchdb-python: couchdb-load does not work with username and password: 'You are not a db or server admin.'

25 views
Skip to first unread message

couchdb...@googlecode.com

unread,
Sep 5, 2011, 10:58:09 AM9/5/11
to couchdb...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 197 by haa...@gmail.com: couchdb-load does not work with username
and password: 'You are not a db or server admin.'
http://code.google.com/p/couchdb-python/issues/detail?id=197

What steps will reproduce the problem?
1. Make a backup with couchdb-dump
2. Create a new database with Futon
3. Make sure you are not in admin-party, setup one or more admins
4. Issue the command "couchdb-load -u serveradminusername -p
serveradminpassword --input=backup20110530.bin
http://127.0.0.1:5984/databasename"

What is the expected output? What do you see instead?
- I was expecting a list of document ids while the documents are being
loaded.
- I did get instead:

---- start output ----
Loading document '_design/main'
Traceback (most recent call last):
File "/usr/bin/couchdb-load", line 5, in <module>
load.main()
File "/usr/lib/pymodules/python2.6/couchdb/tools/load.py", line 88, in
main
password=options.password, ignore_errors=options.ignore_errors)
File "/usr/lib/pymodules/python2.6/couchdb/tools/load.py", line 51, in
load_db
db[docid] = doc
File "/usr/lib/pymodules/python2.6/couchdb/client.py", line 327, in
__setitem__
resp, data = self.resource.put(id, content=content)
File "/usr/lib/pymodules/python2.6/couchdb/client.py", line 989, in put
**params)
File "/usr/lib/pymodules/python2.6/couchdb/client.py", line 1035, in
_request
raise ServerError((status_code, error))
couchdb.client.ServerError: (401, ('unauthorized', 'You are not a db or
server admin.'))
---- end output ----

What version of the product are you using?
python-couchdb 0.6.1
couchdb 1.0.1-0ubuntu3

On what operating system?
MoonOs (ubuntu-based)

Please provide any additional information below.


I also tried the command "couchdb-load --input=backup20110530.bin
http://admin:pass...@127.0.0.1:5984/databasename

This gives me another error message:
---- start output2 ----
Loading document '_design/main'
Traceback (most recent call last):
File "/usr/bin/couchdb-load", line 5, in <module>
load.main()
File "/usr/lib/pymodules/python2.6/couchdb/tools/load.py", line 88, in
main
password=options.password, ignore_errors=options.ignore_errors)
File "/usr/lib/pymodules/python2.6/couchdb/tools/load.py", line 51, in
load_db
db[docid] = doc
File "/usr/lib/pymodules/python2.6/couchdb/client.py", line 327, in
__setitem__
resp, data = self.resource.put(id, content=content)
File "/usr/lib/pymodules/python2.6/couchdb/client.py", line 989, in put
**params)
File "/usr/lib/pymodules/python2.6/couchdb/client.py", line 1014, in
_request
resp, data = _make_request()
File "/usr/lib/pymodules/python2.6/couchdb/client.py", line 1009, in
_make_request
body=body, headers=headers)
File "/usr/lib/python2.6/dist-packages/httplib2/__init__.py", line 1129,
in request
(response, content) = self._request(conn, authority, uri, request_uri,
method, body, headers, redirections, cachekey)
File "/usr/lib/python2.6/dist-packages/httplib2/__init__.py", line 901,
in _request
(response, content) = self._conn_request(conn, request_uri, method,
body, headers)
File "/usr/lib/python2.6/dist-packages/httplib2/__init__.py", line 865,
in _conn_request
raise ServerNotFoundError("Unable to find the server at %s" % conn.host)
httplib2.ServerNotFoundError: Unable to find the server at
admin:pass...@127.0.0.1
---- end output2 ----

couchdb...@googlecode.com

unread,
Sep 6, 2011, 7:37:45 AM9/6/11
to couchdb...@googlegroups.com

Comment #1 on issue 197 by kxepal: couchdb-load does not work with username
and password: 'You are not a db or server admin.'
http://code.google.com/p/couchdb-python/issues/detail?id=197

Have you tried to update couchdb-python to at least 0.8 release? 0.6.1 was
released two years ago and mostly out of dated. One of major changes was
removing httplib2 from dependencies and support. Latest release should work
for you, but you should known about issue 176 and issue 194 to work around
those problems.

couchdb...@googlecode.com

unread,
Sep 6, 2011, 7:41:46 AM9/6/11
to couchdb...@googlegroups.com

Comment #2 on issue 197 by kxepal: couchdb-load does not work with username
and password: 'You are not a db or server admin.'
http://code.google.com/p/couchdb-python/issues/detail?id=197

Have you tried to update couchdb-python to at least 0.8 release? 0.6.1 was
released two years ago and mostly out of dated. One of major changes was

removing httplib2 from dependencies and support modern features. Latest
release should work for you, but you should known about issue 179 and issue

couchdb...@googlecode.com

unread,
Sep 21, 2012, 4:13:27 AM9/21/12
to couchdb...@googlegroups.com
Updates:
Status: WorksForMe

Comment #3 on issue 197 by djc.ochtman: couchdb-load does not work with
username and password: 'You are not a db or server admin.'
http://code.google.com/p/couchdb-python/issues/detail?id=197

Looks like a WORKSFORME.

Reply all
Reply to author
Forward
0 new messages