Kibana: Beats Central Management - Enrollment Issue - Throws 403

Created on 25 Feb 2019  路  7Comments  路  Source: elastic/kibana

Kibana version: 6.6.1
Elasticsearch version: 6.6.1

Elastic Cloud Deployment

Tried different browsers same issue

macOS 10.13.6

Describe the bug: When trying to enroll a new beats central management via UI in 6.6.1 it throws a 403 on the POST call to enrollment_tokens

Steps to reproduce:

  1. Click on Management
  2. Click on Beats Central Management
  3. Click on Enroll Beats

Expected behavior:
Should show the enrollment option with token generation.

screen shot 2019-02-24 at 10 09 10 pm

beats-cm Beats bug

Most helpful comment

We just upgraded to 6.6.1 and we get a 500 error when trying to get an enrollment token. Here's the error message from the Kibana logs:

{
    "type": "error",
    "@timestamp": "2019-02-27T19:25:45Z",
    "tags": [],
    "pid": 17466,
    "level": "error",
    "error": {
        "message": "Cannot read property 'log' of undefined",
        "name": "TypeError",
        "stack": "TypeError: Cannot read property 'log' of undefined\n    at BackendFrameworkLib.log (/usr/share/kibana/node_modules/x-pack/plugins/beats_management/server/lib/adapters/framework/kibana_framework_adapter.js:86:21)\n    at handler (/usr/share/kibana/node_modules/x-pack/plugins/beats_management/server/rest_api/tokens/create.js:37:28)"
    },
    "url": {
        "protocol": null,
        "slashes": null,
        "auth": null,
        "host": null,
        "port": null,
        "hostname": null,
        "hash": null,
        "search": null,
        "query": {},
        "pathname": "/api/beats/enrollment_tokens",
        "path": "/api/beats/enrollment_tokens",
        "href": "/api/beats/enrollment_tokens"
    },
    "message": "Cannot read property 'log' of undefined"
}

All 7 comments

Pinging @elastic/beats

We just upgraded to 6.6.1 and we get a 500 error when trying to get an enrollment token. Here's the error message from the Kibana logs:

{
    "type": "error",
    "@timestamp": "2019-02-27T19:25:45Z",
    "tags": [],
    "pid": 17466,
    "level": "error",
    "error": {
        "message": "Cannot read property 'log' of undefined",
        "name": "TypeError",
        "stack": "TypeError: Cannot read property 'log' of undefined\n    at BackendFrameworkLib.log (/usr/share/kibana/node_modules/x-pack/plugins/beats_management/server/lib/adapters/framework/kibana_framework_adapter.js:86:21)\n    at handler (/usr/share/kibana/node_modules/x-pack/plugins/beats_management/server/rest_api/tokens/create.js:37:28)"
    },
    "url": {
        "protocol": null,
        "slashes": null,
        "auth": null,
        "host": null,
        "port": null,
        "hostname": null,
        "hash": null,
        "search": null,
        "query": {},
        "pathname": "/api/beats/enrollment_tokens",
        "path": "/api/beats/enrollment_tokens",
        "href": "/api/beats/enrollment_tokens"
    },
    "message": "Cannot read property 'log' of undefined"
}

@mattapperson Can you take a look, I think that might be fixed in 6.7 buts maybe we could have simple fix for 6.6.x

This issue is fixed in 7.0, however the fix will just allow the console to output the error (this is a bug with logging). The real error is that there is an issue with SSL configurations for ES. I am still working on this issue and will report back as soon as I have more information as to the exact cause and a fix.

Just to report that I have a freshly created 7.3.1 cluster on cloud.elastic.co (AWS hosted and marketplace invoiced) and I still get this same error in developer console when trying to enroll via Kibana (or via CLI)
Screenshot 2019-09-05 at 15 04 30

```
metricbeat enroll https://XXX.eu-central-1.aws.cloud.es.io:9243 --username beats_enroll --password env:BEATS_ENROLL_PW --force -e -v
2019-09-05T12:00:38.631Z INFO instance/beat.go:606 Home path: [/usr/share/metricbeat] Config path: [/etc/metricbeat] Data path: [/var/lib/metricbeat] Logs path: [/var/log/metricbeat]
2019-09-05T12:00:38.631Z INFO instance/beat.go:614 Beat ID: a1ab1a0c-6ff1-47ef-aa94-5e1cb600e32b
2019-09-05T12:00:38.632Z INFO kibana/client.go:117 Kibana url: https://XXXX.eu-central-1.aws.cloud.es.io:9243
2019-09-05T12:00:41.634Z INFO add_cloud_metadata/add_cloud_metadata.go:347 add_cloud_metadata: hosting provider type not detected.
Error creating a new enrollment token: Cannot read property 'log' of undefined
````

Any workaround how to fix it?

Apparently .beats index was missing or something like that, they (as in elastic cloud support) fixed it for me when they finally figured out what's wrong.

Was this page helpful?
0 / 5 - 0 ratings