简体   繁体   English

ArangoDB:发送“statusCode:0”

[英]ArangoDB: sends “statusCode: 0”

Have anyone encountered this Error message, when trying to connect to ArangoDB from a React application [See first attached photo]?有没有人在尝试从 React 应用程序连接到 ArangoDB 时遇到此错误消息 [参见第一张附图]? It seemed like, it could be an issue related to authentication... but I've tried using "_system" and my own databases, with booth "root" as username and with "root" as password as well as setting the password to "null".看起来,这可能是与身份验证有关的问题......但我尝试使用“_system”和我自己的数据库,将展位“root”作为用户名,将“root”作为密码,并将密码设置为“无效的”。 I've tried to create new users and tried to connect to the database... Nothing works... (what am I doing wrong? - I've gone through the documentation a billion times at this point).我尝试创建新用户并尝试连接到数据库...没有任何效果...(我做错了什么?-此时我已经阅读了十亿次文档)。 I will attach a photo of my code as well.我也会附上我的代码照片。 Image of error , Image of my code错误图片,我的代码图片

Here is a link to the list of error codes .这是 错误代码列表的链接。 Unfortunately, "error 0" is extremely unhelpful.不幸的是,“错误 0”是非常无用的。 However, I see two potential issues.但是,我看到了两个潜在的问题。

First is with your use of HTTPS - normally, you use would use HTTP to connect to port 8529. One caveat would be TLS (like --server.endpoint "http+tcp://127.0.0.1:8529" with arangosh ), but that's not the same as HTTPS.首先是您使用 HTTPS - 通常,您将使用 HTTP 连接到端口 8529。需要注意的是 TLS(如--server.endpoint "http+tcp://127.0.0.1:8529"arango但这与 HTTPS 不同。

Second, your AQL query seems to be attempting to return an entire collection, which is not how AQL works .其次,您的 AQL 查询似乎试图返回整个集合,这不是 AQL 的工作方式 Try returning a static like RETURN 'yes' or use the format:尝试返回 static,如RETURN 'yes'或使用以下格式:

FOR doc IN collection
   RETURN doc

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

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