简体   繁体   English

带有Node.js的Cloud9和Couchdb ::无法打开文件

[英]Cloud9 and Couchdb with Node.js: : Could not open file

I will repost an issue I had with Cloud9 and CouchDB. 我将重新发布与Cloud9和CouchDB有关的问题。 Original post is still in Cloud9 Support forum without a decent answer. 原始帖子仍在Cloud9支持论坛中,但没有合适的答案。

So I followed the CouchDB installation . 所以我跟随了CouchDB的安装

Couchdb starts ok and I can connect to it with CURL. Couchdb正常运行,我可以使用CURL连接到它。

BUT

When I try to insert stuff using node I get errors (below). 当我尝试使用节点插入内容时,出现错误(如下)。

Apache CouchDB 1.5.0 (LogLevel=info) is starting. Apache CouchDB 1.5.0(LogLevel = info)已启动。
Apache CouchDB has started. Apache CouchDB已启动。 Time to relax. 是时候放松。
[info] [<0.32.0>] Apache CouchDB has started on http://127.0.0.1:5984/ [info] [<0.32.0>] Apache CouchDB已从http://127.0.0.1:5984/启动
[info] [<0.111.0>] 127.0.0.1 - - GET / 200 [信息] [<0.111.0>] 127.0.0.1--GET / 200
[error] [<0.586.0>] Could not open file /var/lib/couchdb/test_db.couch: no such file or directory [错误] [<0.586.0>]无法打开文件/var/lib/couchdb/test_db.couch:无此类文件或目录
[info] [<0.121.0>] 127.0.0.1 - - PUT /test_db/unique_id 404 [信息] [<0.121.0>] 127.0.0.1--PUT / test_db / unique_id 404
[error] [<0.656.0>] Could not open file /var/lib/couchdb/test_db.couch: no such file or directory [错误] [<0.656.0>]无法打开文件/var/lib/couchdb/test_db.couch:没有这样的文件或目录
[info] [<0.585.0>] 127.0.0.1 - - PUT /test_db/unique_id 404 [信息] [<0.585.0>] 127.0.0.1--PUT / test_db / unique_id 404

So db_file is missing? 那么db_file丢失了吗? Where should I specify this? 我应该在哪里指定?

I already tried to create the db file manually but that causes CouchDB to crash. 我已经尝试过手动创建db文件,但这会导致CouchDB崩溃。 Any help would be appreciated? 任何帮助,将不胜感激?

I just tried the cloud9 couchdb getting started link you posted and it works for me on a fresh workspace for nodejs. 我刚刚尝试了您发布的cloud9 benchdb入门链接,它在新的nodejs工作区中对我有用。

can you check for the correct folder setup like this? 您可以检查这样的正确文件夹设置吗?

ls -ld /var/lib/couchdb/ should give you ls -ld / var / lib / couchdb /应该给你
drwxr-x--- 3 couchdb couchdb 4096 Feb 18 13:05 /var/lib/couchdb// drwxr-x --- 3沙发床沙发床4096 2月18日13:05 / var / lib / couchdb //

the problem should not have anything to do with if you use curl or node, so i assume you just did a get with curl to see if couchdb is running but tried the put actions with node? 如果您使用curl或node,问题应该没有任何关系,所以我假设您只是使用curl进行了一次获取,以查看ouchdb是否正在运行,但是尝试了node的put操作?

also make sure couchdb is running as the correct user 还要确保ouchdb以正确的用户身份运行

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM