I'm trying to setup an ELK instance to use as a winlogbeat output, and even though both the ELK stack and winlogbeat versions are the exact same, I'm getting this cryptic error:
Exiting: error connecting to Kibana: fail to get the Kibana version: fail to parse kibana version (): passed version is not semver:
I've linked both a full winlogbeat output when running winlogbeat setup -e and my ELK stack env file.
I generally see this error when the kibana URL provided is a valid address with something listening but it's not Kibana or it's https but kibana is actually not available over https.
curl w/ssl (passing --ignore too) returns the standard kibana json response (kibanastatus.json · GitHub)
curl without ssl returns: curl: (52) Empty reply from server
The error appears to indicate that winlogbeat is getting some sort of json response from kibana but that it is not finding any value for version in the json response.
Are you fronting kibana with a proxy or is there any other infrastructure between the Windows box and the kibana server?
Can you try setting up another beat on another device and see if you can perform kibana setup from that device?
Though documentation in the config says: # Scheme and port can be left out and will be set to the default (http and 5601), this is why I didn't add setup.kibana.protocol:
Scheme can be left out if you do not specify a port and if are using http.
If you specify a port then I do believe you need to specify the scheme.
Actually that's wrong. The documentation does say "However, if you specify a URL for host, the value of protocol is overridden by whatever scheme you specify in the URL." So your initial configuration was fine.
Im not able to reproduce this with a kibana install following the Elastic installation guide so if you are testing with the kibana scheme set to https in the winlogbeat config it might make sense to file an issue with that elastic quick start project on GitHub to see if they have done anything that would inhibit winlogbeat setting up Kibana.
You could also try to setup an SSL proxy so you can inspect the request winlogbeat is making and the exact contents of the response which might help figuring out what's going on.
You can still use kibana, all this setup does is a one time import of the default winlogbeat dashboard.
You could also try setting something like logging.verbose: true in the kibana.yml and see if you can get kibana to log the requests from winlogbeat and it's corresponding responses. That exact setting might be deprecated so if you go this route and have trouble let me know and I can go digging.
Done.
winlogbeats is now displaying a different error
{"log.level":"error","@timestamp":"2024-02-16T17:58:53.655+0100","log.origin":{"function":"github.com/elastic/beats/v7/libbeat/cmd/instance.handleError","file.name":"instance/beat.go","file.line":1312},"message":"Exiting: error connecting to Kibana: fail to get the Kibana version: HTTP GET request to https://192.168.1.119:5601/api/status fails: status=503. Response: {\"status\":{\"overall\":{\"level\":\"unavailable\"}}}","service.name":"winlogbeat","ecs.version":"1.6.0"}
Exiting: error connecting to Kibana: fail to get the Kibana version: HTTP GET request to https://192.168.1.119:5601/api/status fails: status=503. Response: {"status":{"overall":{"level":"unavailable"}}}
and from the kibana logs I'm getting [2024-02-16T17:00:37.520+00:00][DEBUG][http.server.response] GET /api/status 503 3ms - 46.0B
along with [2024-02-16T17:00:43.283+00:00][DEBUG][elasticsearch.query.data] [ConnectionError]: unable to verify the first certificate
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.