Metricbeat Error while enrolling: fail to execute the HTTP POST request: Post https://kibana

Pier,

Sorry for my delay but I appreciate your response awhile back. I just got back around to troubleshooting this as some other projects took precedence over this one for the time being. I was able to work around this issue by pointing the autogenerated token link to a specific server within our Kibana cluster and remvoing the kiban.gov part. Our setup like many has a VIP that directs data to one of the three Kibana servers in the pool. So we have kibana-test.gov with abc.gov, def.gov and ghi.gov servers and once I took out the kibana-test.gov from the link and put in abc.gov with the username and password it worked. For this example, metricbeat on Windows Server 2016 pointing to RPM Linux Kibana, the below command worked.

 .\metricbeat.exe enroll -username elastic --password stdin --force http://abc.gov 14axxxxxxxxxxxxxxxxxxxxxxxxx
Saving a copy of current settings to metricbeat.yml.bak
Enrolled and ready to retrieve settings from Kibana

One of the other issues that popped up was that due to the fact that our Kibana servers sit behind the VIP I had to remove the https part and change it to http. The error message that I got with https was:

Error while enrolling: fail to execute the HTTP POST request: Post https://abc.gov:5601/api/beats/agent
/60ce4282-8666-480c-b088-c2208799c0ef: http: server gave HTTP response to HTTPS client

Overall removal of the link that Kibana generated and inputting a specific server within our DNS pool worked. Thanks for the help and hopefully this helps some others out as well. Enjoy the rest of your day.

1 Like