Rhy*_*hys 9 amazon-ec2 amazon-web-services neo4j
我正在尝试从命令行访问在aws ec2实例上运行的neo4j,在那里我收到授权错误.我已经启用org.neo4j.server.webserver.address=0.0.0.0并在第一个语句上获得503错误,并使用ec2主机名获得相同的错误.
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"
} ]
Run Code Online (Sandbox Code Playgroud)
我是否正确登录或者我错过了某个地方?
任何帮助表示赞赏.
Mic*_*ech 11
您需要在请求中提供授权标头
Authorization: Basic bmVvNGo6bmVvNGo=
curl --header "Authorization: Basic bmVvNGo6bmVvNGo=" http://localhost:7474
bmVvNGo6bmVvNGo= is default Neo4j password: neo4j
Run Code Online (Sandbox Code Playgroud)
来自@ michael-hunger
注意:对于auth API,您仍需要授权.
curl -u neo4j:password http://localhost:7474
Run Code Online (Sandbox Code Playgroud)
或者在Neo4j配置中关闭授权
CONF/neo4j-server.properties
# Disable authorization
dbms.security.auth_enabled=false
Run Code Online (Sandbox Code Playgroud)
这里有更多相关信息
http://neo4j.com/docs/stable/rest-api-security.html
| 归档时间: |
|
| 查看次数: |
4709 次 |
| 最近记录: |