CouchDB 2.1.1:内部服务器错误

时间:2018-02-09 17:19:27

标签: couchdb internal-server-error couchapp couchdb-2.0 fauxton

在安装CouchApp实用程序之前,the Sofa blog app and the sample DB myblogdbCouchDB 2.1.1一起,我的CouchDB正在查找,我从未见过任何Internal Server Error

在过去的两个小时里,一个木马将自己附加为CouchDB的进程。从那以后我删除了它,但它可能卡住了一些CouchDB的设置。

为什么我不能运行myblogdb?此错误是否与升级到CouchDB 2.1.1导致的重大更改有关?

首先,couchapp push myblogdb仅适用于第二次尝试(第一次尝试以Internal Server Error结束):

$ couchapp push . http://admin:password@www.example.com:5984/myblogdb 
2018-02-09 16:53:09 [CRITICAL] {"error":"error","reason":"internal_server_error"}
Traceback (most recent call last):
  File "/opt/bitnami/python/lib/python2.7/site-packages/Couchapp-1.0.2-py2.7.egg/couchapp/dispatch.py", line 45, in dispatch
    return _dispatch(args)
  File "/opt/bitnami/python/lib/python2.7/site-packages/Couchapp-1.0.2-py2.7.egg/couchapp/dispatch.py", line 92, in _dispatch
    return fun(conf, conf.app_dir, *args, **opts)
  File "/opt/bitnami/python/lib/python2.7/site-packages/Couchapp-1.0.2-py2.7.egg/couchapp/commands.py", line 72, in push
    dbs = conf.get_dbs(dest)
  File "/opt/bitnami/python/lib/python2.7/site-packages/Couchapp-1.0.2-py2.7.egg/couchapp/config.py", line 159, in get_dbs
    return [Database(dburl, use_proxy=use_proxy) for dburl in dburls]
  File "/opt/bitnami/python/lib/python2.7/site-packages/Couchapp-1.0.2-py2.7.egg/couchapp/client.py", line 229, in __init__
    self.res.put()
  File "/opt/bitnami/python/lib/python2.7/site-packages/restkit-4.2.2-py2.7.egg/restkit/resource.py", line 153, in put
    headers=headers, params_dict=params_dict, **params)
  File "/opt/bitnami/python/lib/python2.7/site-packages/Couchapp-1.0.2-py2.7.egg/couchapp/client.py", line 144, in request
    raise RequestFailed(str(e))
RequestFailed: {"error":"error","reason":"internal_server_error"}
$ couchapp push . http://admin:password@www.example.com:5984/myblogdb 
2018-02-09 16:53:29 [INFO] Visit your CouchApp here:
http://www.example.com:5984/myblogdb/_design/sofa/_list/index/recent-posts?descending=true&limit=10

其次,从网络浏览器运行myblogdb couchapp:

Internal Server Error in the browser

couchdb.log

[info] 2018-02-09T14:58:13.538108Z couchdb@127.0.0.1 <0.1196.0> -------- Opening index for db: shards/00000000-1fffffff/myblogdb.1518183029 idx: _design
/sofa sig: "0076c771c527a85eec3100fde6e69853"
[info] 2018-02-09T14:58:13.538160Z couchdb@127.0.0.1 <0.1197.0> -------- Opening index for db: shards/20000000-3fffffff/myblogdb.1518183029 idx: _design
/sofa sig: "0076c771c527a85eec3100fde6e69853"
[info] 2018-02-09T14:58:13.538194Z couchdb@127.0.0.1 <0.1198.0> -------- Opening index for db: shards/40000000-5fffffff/myblogdb.1518183029 idx: _design
/sofa sig: "0076c771c527a85eec3100fde6e69853"
[info] 2018-02-09T14:58:13.538241Z couchdb@127.0.0.1 <0.1199.0> -------- Opening index for db: shards/60000000-7fffffff/myblogdb.1518183029 idx: _design
/sofa sig: "0076c771c527a85eec3100fde6e69853"
[info] 2018-02-09T14:58:13.538294Z couchdb@127.0.0.1 <0.1200.0> -------- Opening index for db: shards/80000000-9fffffff/myblogdb.1518183029 idx: _design
/sofa sig: "0076c771c527a85eec3100fde6e69853"
[info] 2018-02-09T14:58:13.538347Z couchdb@127.0.0.1 <0.1201.0> -------- Opening index for db: shards/a0000000-bfffffff/myblogdb.1518183029 idx: _design
/sofa sig: "0076c771c527a85eec3100fde6e69853"
[info] 2018-02-09T14:58:13.538398Z couchdb@127.0.0.1 <0.1202.0> -------- Opening index for db: shards/c0000000-dfffffff/myblogdb.1518183029 idx: _design
/sofa sig: "0076c771c527a85eec3100fde6e69853"
[info] 2018-02-09T14:58:13.538516Z couchdb@127.0.0.1 <0.1204.0> -------- Opening index for db: shards/e0000000-ffffffff/myblogdb.1518183029 idx: _design
/sofa sig: "0076c771c527a85eec3100fde6e69853"
[notice] 2018-02-09T14:58:13.553289Z couchdb@127.0.0.1 <0.1144.0> 4852bad0c5 www.example.com:5984 24.134.87.25 undefined GET /myblogdb/_design/sofa/
_list/index/recent-posts?descending=true&limit=10 200 ok 83
[notice] 2018-02-09T14:58:13.633626Z couchdb@127.0.0.1 <0.1144.0> c80a6bd94f www.example.com:5984 24.134.87.25 undefined GET /myblogdb/_design/sofa/
style/screen.css 304 ok 2
[notice] 2018-02-09T14:58:13.680109Z couchdb@127.0.0.1 <0.1145.0> 3c55f8327b www.example.com:5984 24.134.87.25 undefined GET /_utils/script/json2.js
 404 ok 4
[notice] 2018-02-09T14:58:13.680338Z couchdb@127.0.0.1 <0.1146.0> 40f287a33e www.example.com:5984 24.134.87.25 undefined GET /_utils/script/jquery.j
s 404 ok 3
[notice] 2018-02-09T14:58:13.688782Z couchdb@127.0.0.1 <0.1144.0> f5f10f59e3 www.example.com:5984 24.134.87.25 undefined GET /myblogdb/_design/sofa/
vendor/couchapp/jquery.couch.app.util.js 304 ok 2
[notice] 2018-02-09T14:58:13.693473Z couchdb@127.0.0.1 <0.1147.0> 75b14f5d9c www.example.com:5984 24.134.87.25 undefined GET /_utils/script/jquery.c
ouch.js 404 ok 0
[notice] 2018-02-09T14:58:13.708853Z couchdb@127.0.0.1 <0.1148.0> 38ec74b4cc www.example.com:5984 24.134.87.25 undefined GET /_utils/script/sha1.js
404 ok 0
[notice] 2018-02-09T14:58:13.721734Z couchdb@127.0.0.1 <0.1149.0> 2171a940fb www.example.com:5984 24.134.87.25 undefined GET /myblogdb/_design/sofa/
vendor/couchapp/jquery.couch.app.js 304 ok 2
[notice] 2018-02-09T14:58:13.727197Z couchdb@127.0.0.1 <0.1144.0> 43ab936b5a www.example.com:5984 24.134.87.25 undefined GET /myblogdb/_design/sofa/
vendor/couchapp/jquery.mustache.js 304 ok 2
[notice] 2018-02-09T14:58:13.738777Z couchdb@127.0.0.1 <0.1145.0> 74a548f8bf www.example.com:5984 24.134.87.25 undefined GET /myblogdb/_design/sofa/
vendor/couchapp/jquery.evently.js 304 ok 2
[notice] 2018-02-09T14:58:13.745487Z couchdb@127.0.0.1 <0.1146.0> b9bc18f69a www.example.com:5984 24.134.87.25 undefined GET /myblogdb/_design/sofa/
script/app.js 304 ok 2
[notice] 2018-02-09T14:58:13.750103Z couchdb@127.0.0.1 <0.1147.0> 79cd8480f0 www.example.com:5984 24.134.87.25 undefined GET /myblogdb/_design/sofa/
script/md5.js 304 ok 2

第三,我在创建/删除任何数据库时也在Fauxton UI中收到Internal Server Error,但请求仍然执行:

Internal Server Error when creating/deleting databases

1 个答案:

答案 0 :(得分:2)

由于缺少群集仲裁,您似乎在数据库创建/删除方面遇到了问题:Issue 603Issue 1136

从2.0迁移到2.1.1可能会对您的节点成员资格产生影响,现在您必须为couchdb @ localhost注册一个节点,为couchdb@127.0.0.1注册另一个节点

Couchdb正在考虑将您的安装视为一个双节点群集,并且您面临着法定人数不足的问题。

您可以使用此网址http://<your-couchdb-host>:5984/_membership

进行检查

可以通过以下these说明删除配置中的错误节点。