Apm 无法连接到退避(elasticsearch 401未经授权:未经授权)

Apm 无法连接到退避(elasticsearch 401未经授权:未经授权),apm,elasticsearch-opendistro,Apm,Elasticsearch Opendistro,我最近在一台专用主机上安装了opendistro elasticsearch,并在另一台主机上设置了APM服务器 当通过systemctl启动apm服务器时,我有以下错误响应 apm apm-server[3220]: 2021-05-14T13:42:24.221Z#011ERROR#011[publisher_pipeline_output]#011pipeline/output.go:154#011Failed to connect to backoff(elasticsearch(htt

我最近在一台专用主机上安装了opendistro elasticsearch,并在另一台主机上设置了APM服务器

当通过systemctl启动apm服务器时,我有以下错误响应

apm apm-server[3220]: 2021-05-14T13:42:24.221Z#011ERROR#011[publisher_pipeline_output]#011pipeline/output.go:154#011Failed to connect to backoff(elasticsearch(http://192.168.56.XXX:9200)): 401 Unauthorized: Unauthorized
在我的apm服务器配置中有以下2个基本配置

apm-server:
  # Defines the host and port the server is listening on. Use "unix:/path/to.sock" to listen on a unix domain socket.
  host: "0.0.0.0:8200"

output.elasticsearch:
  hosts: ["elasticserver:9200"]
我查过:

  • 凹痕等,看起来还可以
  • 在我的opendistro弹性主机安全配置文件/usr/share/elasticsearch/plugins/opendistro_security/securityconfig/config.yml上
我有以下部分,默认情况下设置为true,其他部分(如LDAP、kerberos等)设置为false

     basic_internal_auth_domain:
        description: "Authenticate via HTTP Basic against internal users database"
        http_enabled: true
        transport_enabled: true
        order: 4
        http_authenticator:
          type: basic
          challenge: true
        authentication_backend:
          type: intern
  • 当我使用来自apm服务器的超级用户管理员帐户执行curl命令时,我还得到了以下类似的错误
这听起来像是我需要创建一个内部用户,并为其分配一些后端角色(具有apm索引的权限)。我很想看看你们的想法


我期待您的回复,非常感谢。

对于基本身份验证,您确实需要创建一个内部用户,使用主节点上的脚本对密码进行散列,然后将其映射到“所有访问”角色

谢谢,这非常有效。
curl -U admin:admin http://elasticserver:9200
Unauthorizedroot@apm