gpt4 book ai didi

amazon-web-services - neo4j产生 "No authorization header supplied"错误

转载 作者:行者123 更新时间:2023-12-04 03:43:14 28 4
gpt4 key购买 nike

我正在尝试从出现授权错误的命令行访问在aws ec2实例上运行的neo4j。我启用了org.neo4j.server.webserver.address=0.0.0.0并使用ec2主机名在第一条语句上获得503错误,而在其余语句上获得相同的错误。

ubuntu@ip-10-0-0-192:/etc/neo4j$ curl http://localhost:7474/
{
"management" : "http://localhost:7474/db/manage/",
"data" : "http://localhost:7474/db/data/"
}ubuntu@ip-10-0-0-192:/etc/neo4j$ curl http://localhost:7474/db/data/
{
"errors" : [ {
"message" : "No authorization header supplied.",
"code" : "Neo.ClientError.Security.AuthorizationFailed"
} ]
}ubuntu@ip-10-0-0-192:/etc/neo4j$ curl http://localhost:7474/user/neo4j/
{
"errors" : [ {
"message" : "No authorization header supplied.",
"code" : "Neo.ClientError.Security.AuthorizationFailed"
} ]
ubuntu@ip-10-0-0-192:/etc/neo4j$ curl http://localhost:7474/user/neo4j/password
{
"errors" : [ {
"message" : "No authorization header supplied.",
"code" : "Neo.ClientError.Security.AuthorizationFailed"
} ]

我是否正确登录还是错过了某个地方的步骤?

任何帮助表示赞赏。

最佳答案

您需要在请求中提供授权 header

Authorization: Basic bmVvNGo6bmVvNGo=

curl --header "Authorization: Basic bmVvNGo6bmVvNGo=" http://localhost:7474

bmVvNGo6bmVvNGo= is default Neo4j password: neo4j

通过@ michael-hunger

注意:对于auth API,您仍然需要授权。
curl -u neo4j:password http://localhost:7474

或在Neo4j配置中关闭授权

conf/neo4j-server.properties
# Disable authorization 
dbms.security.auth_enabled=false

这是有关此的更多信息

http://neo4j.com/docs/stable/rest-api-security.html

关于amazon-web-services - neo4j产生 "No authorization header supplied"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31966591/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com