【问题标题】:Couchdb illegal_database_name after ubuntu upgradeubuntu 升级后的 Couchdb 非法数据库名称
【发布时间】:2013-11-10 17:35:24
【问题描述】:

最近我将我的 Ubuntu 从 13.04 升级到 13.10。一切都很顺利,但升级几天后,我意识到我的 CouchDB 实例出现了问题。

升级前创建的数据库有前缀:“1.2.0/”,所以现在它看起来像“1.2.0/_users”,我无法使用 CURL 或 Futon 打开它。当我尝试时,在 Futon 中出现错误:

Error: illegal_database_name

Name: '120/_users'. Only lowercase characters (a-z), digits (0-9), and any of the characters _, $, (, ), +, -, and / are allowed. Must begin with a letter.

如何恢复我的数据库?

添加:

当我在文件系统中复制数据库时,出现以下错误:

Error: {{case_clause,{{badmatch,{error,eacces}},
           [{couch_file,init,1,[{file,"couch_file.erl"},{line,314}]},
            {gen_server,init_it,6,[{file,"gen_server.erl"},{line,304}]},
            {proc_lib,init_p_do_apply,3,
                      [{file,"proc_lib.erl"},{line,239}]}]}},
 [{couch_server,handle_info,2,[{file,"couch_server.erl"},{line,437}]},
 {gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,604}]},
 {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]}

{gen_server,call,
[couch_server,
 {open,<<"eksploracja">>,
     [{user_ctx,
          {user_ctx,null,
              [<<"_admin">>],
              <<"{couch_httpd_auth, default_authentication_handler}">>}}]},
 infinity]}

【问题讨论】:

    标签: ubuntu couchdb couchdb-futon


    【解决方案1】:

    您可以尝试重命名数据库文件。在 Ubuntu 上,它们存储在 /var/lib/couchdb/ 路径下。

    【讨论】:

    • 你得到的错误是“错误:{{case_clause,{{badmatch,{error,eacces}}”,对吧?这很可能表明该文件不属于 couchdb:couchdb。试试 chown couchdb:couchdb /var/lib/couchdb/eksploracja.couch
    【解决方案2】:

    我从 12.04 升级到 14.04 时遇到了同样的问题。数据库出现在 Futon 中,前缀为 1.0.1。 在文件夹“/var/lib/couchdb/”中,我在我的数据库中找到了另一个名为“1.0.1”的文件夹(作为出现在 Futon 中的前缀)。 我将文件夹“/var/lib/couchdb/”中的数据库文件向上移动(向上一级),然后 Futon 识别了它。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-10-31
      • 2016-09-07
      • 1970-01-01
      • 1970-01-01
      • 2016-08-23
      • 1970-01-01
      • 1970-01-01
      • 2013-01-12
      相关资源
      最近更新 更多