【问题标题】:Cloud9 and Couchdb with Node.js: : Could not open fileCloud9 和 Couchdb 与 Node.js: : 无法打开文件
【发布时间】:2017-11-26 21:31:12
【问题描述】:

我将重新发布我在使用 Cloud9 和 CouchDB 时遇到的问题。原始帖子仍在 Cloud9 支持论坛中,没有一个像样的答案。

所以我关注了 CouchDB installation。

Couchdb 启动正常,我可以使用 CURL 连接到它。

但是

当我尝试使用节点插入内容时出现错误(如下)。

Apache CouchDB 1.5.0 (LogLevel=info) 正在启动。
Apache CouchDB 已经启动。是时候放松一下了。
[info] [] Apache CouchDB 已在 http://127.0.0.1:5984/
上启动 [信息] [] 127.0.0.1 - - 获取 / 200
[错误] [] 无法打开文件 /var/lib/couchdb/test_db.couch:没有这样的文件或目录
[信息] [] 127.0.0.1 - - PUT /test_db/unique_id 404
[错误] [] 无法打开文件 /var/lib/couchdb/test_db.couch:没有这样的文件或目录
[信息] [] 127.0.0.1 - - PUT /test_db/unique_id 404

所以db_file 不见了?我应该在哪里指定?

我已经尝试手动创建 db 文件,但这会导致 CouchDB 崩溃。任何帮助将不胜感激?

【问题讨论】:

    标签: node.js couchdb


    【解决方案1】:

    我刚刚尝试了您发布的 cloud9 couchdb 入门链接,它适用于 nodejs 的新工作区。

    你能像这样检查正确的文件夹设置吗?

    ls -ld /var/lib/couchdb/ 应该给你
    drwxr-x--- 3 couchdb couchdb 4096 Feb 18 13:05 /var/lib/couchdb//

    如果你使用 curl 或 node,这个问题应该没有任何关系,所以我假设你只是用 curl 做了一个 get 来查看 couchdb 是否正在运行,但尝试了用 node 的 put 操作?

    还要确保 couchdb 以正确的用户身份运行

    【讨论】:

      猜你喜欢
      • 2013-08-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-02-14
      • 2015-11-14
      • 2019-01-06
      • 2023-03-26
      相关资源
      最近更新 更多