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

标签 amazon-web-services amazon-ec2 neo4j

我正在尝试从出现授权错误的命令行访问在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/

相关文章:

amazon-web-services - 使用 http post flutter web 时出现 XMLHttpRequest 错误

amazon-web-services - 模板验证错误:模板格式错误:无法识别的资源类型:[AWS::EC2::KeyPair::KeyName]

java - 映射的子错误:AWS EMR实例终止

neo4j - Spring Data Neo4j - 如何让 WrappingNeoServerBootstrapper 监听 0.0.0.0

amazon-web-services - 如何通过 kubectl 连接在私有(private) PVC 上运行的 AWS RDS 数据库实例

amazon-web-services - 根据参数值创建AWS资源

python - AWS Elastic Beanstalk CLI 使用错误的 Python 版本

.net - 是否可以使用 AWS Elastic Beanstalk 部署到现有的 EC2 实例? 。网

neo4j - 如何从neo4j中的2种不同关系获取出发时间和到达时间

Neo4j 3.0.0 数据迁移