APM Server: error when executing setup --index-management

Hi!

I'm getting the following error while executing:

apm-server setup --index-management

Error:

Exiting: unpacking template config failed: missing field accessing 'fields' (source:'/etc/apm-server/apm-server.yml')

If I try to start the APM Server, the error is similar:

apm-server[4433]: {"log.level":"error","@timestamp":"2021-02-26T13:20:52.862-0300","log.origin":{"file.name":"instance/beat.go","file.line":971},"message":"Exiting: unpacking template config failed: missing field accessing 'fields' (source:'/etc/apm-server/apm-server.yml')","ecs.version":"1.6.0"}

This started happening recently from un upgrade from Elastic + Kibana + APM Server from version 7.9.3 to 7.11.1.

Regards,
Fede

@FedeOmoto welcome to the forum! Sorry you're experiencing this issue.

I think this is likely related to something in your config. Can you please supply the contents of /etc/apm-server/apm-server.yml (with sensitive details redacted)?

Hi Andrew, and thank you for your help!

These are the contents of the config file:

[root@waspueobedesa1 ~]# grep -v '#' /etc/apm-server/apm-server.yml | egrep -v '^$' | sed 's/\(username: \)\(.*\)/\1****/' | sed 's/\(password: \)\(.*\)/\1****/'
apm-server:
  host: "0.0.0.0:8200"
  api_key:
    enabled: true
    limit: 100
    elasticsearch:
      hosts: ["https://waspueobedesa1.ar.bsch:9200"]
      ssl.verification_mode: none
  rum:
    enabled: true
    event_rate:
      limit: 1200
  kibana:
    enabled: true
    host: "https://waspueobedesa1.ar.bsch:5601"
    username: ****
    password: ****
    ssl.verification_mode: none
queue:
  mem:
    events: 10240
setup.template.overwrite: true
setup.template.append_fields:
- name: http.request.body.original
  type: keyword
- name: http.request.headers
  type: object
  enabled: true
- name: http.request.headers.X-Correlation-Id
  type: keyword
- name: http.request.headers.X-Request-Id
  type: keyword
- name: span.http.method
  type: keyword
- name: span.http.response.status_code
  type: long
- name: span.http.url.original
  type: keyword
output.elasticsearch:
  hosts: ["https://waspueobedesa1.ar.bsch:9200"]
  username: ****
  password: ****
  worker: 1
  bulk_max_size: 5120
  ssl.verification_mode: none
  worker: 1
  ssl.verification_mode: none
  worker: 1
  ssl.verification_mode: none
path.data: /aplicaciones/nb/data/apm-server
logging.level: error
monitoring.enabled: true
monitoring.elasticsearch:
  username: ****
  password: ****
  hosts: ["https://waspueobedesa1.ar.bsch:9200"]
  bulk_max_size: 5120
  ssl.verification_mode: none

Regards,
Fede

Unfortunately I've been unable to reproduce the issue with 7.11.1 so far.

If you can supply the full log debug output for when you run apm-server setup --index-management then perhaps we'll be able to spot something.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.