# Filebeat Connection to Elastic Search Error

**URL:** https://discuss.elastic.co/t/filebeat-connection-to-elastic-search-error/285733
**Category:** Kibana
**Created:** [October 2, 2021, 10:21am UTC](https://discuss.elastic.co/t/filebeat-connection-to-elastic-search-error/285733 "2021-10-02T10:21:51Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![siddhesh\_jadhav](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/siddhesh_jadhav/32/95367_2.png) [@siddhesh\_jadhav](https://discuss.elastic.co/u/siddhesh_jadhav)
#### Post date: [October 2, 2021, 10:21am UTC](https://discuss.elastic.co/t/filebeat-connection-to-elastic-search-error/285733/1 "2021-10-02T10:21:51Z")

</div>

HI, I tried installing filebeat on win10.  
used _' .\filebeat.exe -e test config'_ the output says Config OK.  
but while testing output of filebeat using _'.\filebeat.exe -e test output'_ it dsiplays the following error. please help in resolvinf this issue.

```auto
Windows PowerShell
Copyright (C) 2016 Microsoft Corporation. All rights reserved.

PS C:\WINDOWS\system32> cd 'C:\Program Files (x86)\ELK\filebeat'
PS C:\Program Files (x86)\ELK\filebeat> .\filebeat.exe -e test output
2021-10-02T15:37:11.570+0530 INFO instance/beat.go:665 Home path: [C:\Program Files (x86)\ELK\filebeat] Config
path: [C:\Program Files (x86)\ELK\filebeat] Data path: [C:\Program Files (x86)\ELK\filebeat\data] Logs path: [C:\Program
 Files (x86)\ELK\filebeat\logs]
2021-10-02T15:37:11.571+0530 INFO instance/beat.go:673 Beat ID: 96b66a2f-533c-4b43-b85f-1568a98aeb00
2021-10-02T15:37:11.756+0530 INFO [index-management] idxmgmt/std.go:184 Set output.elasticsearch.index t
o 'filebeat-7.15.0' as ILM is enabled.
2021-10-02T15:37:11.758+0530 INFO [esclientleg] eslegclient/connection.go:100 elasticsearch url: http://localh
ost:9200
elasticsearch: http://localhost:9200...
  parse url... OK
  connection...
    parse host... OK
    dns lookup... OK
    addresses: ::1, 127.0.0.1
    dial up... OK
  TLS... WARN secure connection disabled
2021-10-02T15:37:11.772+0530 INFO [esclientleg] eslegclient/connection.go:273 Attempting to connect to Elastic
search version 5.5.0
  talk to server... ERROR Connection marked as failed because the onConnect callback failed: could not connect to a comp
atible version of Elasticsearch: 400 Bad Request: {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":
"No endpoint or operation is available at [_license]"}],"type":"illegal_argument_exception","reason":"No endpoint or ope
ration is available at [_license]"},"status":400}
PS C:\Program Files (x86)\ELK\filebeat>

```

---

<div class="post-metadata">

### Author: ![zx8086](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zx8086/32/94917_2.png) [@zx8086](https://discuss.elastic.co/u/zx8086)
#### Post date: [October 2, 2021, 11:24am UTC](https://discuss.elastic.co/t/filebeat-connection-to-elastic-search-error/285733/2 "2021-10-02T11:24:37Z")

</div>

Welcome @siddhesh_jadhav

What is the configuration for the Elasticsearch Output in the Filebeat.yml ?

Are Elasticsearch and Filebeat on the same machine, if not, is Elasticsearch reachable from the filebeat machine.

---

<div class="post-metadata">

### Author: ![siddhesh\_jadhav](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/siddhesh_jadhav/32/95367_2.png) [@siddhesh\_jadhav](https://discuss.elastic.co/u/siddhesh_jadhav)
#### Post date: [October 2, 2021, 11:30am UTC](https://discuss.elastic.co/t/filebeat-connection-to-elastic-search-error/285733/3 "2021-10-02T11:30:39Z")

</div>

The output in filebeatyml is  
`hosts: ["localhost:9200"]`

---

<div class="post-metadata">

### Author: ![siddhesh\_jadhav](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/siddhesh_jadhav/32/95367_2.png) [@siddhesh\_jadhav](https://discuss.elastic.co/u/siddhesh_jadhav)
#### Post date: [October 2, 2021, 11:35am UTC](https://discuss.elastic.co/t/filebeat-connection-to-elastic-search-error/285733/4 "2021-10-02T11:35:07Z")

</div>

later I tried to connect Elastic cloud with settings :

```auto
cloud.id: "My_deployment:dXMtY2VudHJhbDEuZ2NwLmNsb3VkLmVzLmlvJDFmYmY1Zjc2YThiMzQwOWZiMTZhNWUwM2QwYzJhYzkzJDg5NDZmOWIwNzE2NTRiNTg5Y2FhZThkOTQwY2MxNDQ5"

cloud.auth: "filebeat_setup:$iddheshisFromj@dhavnagar"

```

**I got this error**

```auto
2021-10-02T16:55:35.306+0530 INFO [monitoring] log/log.go:193 Uptime: 1.5140761s
2021-10-02T16:55:35.309+0530 INFO [monitoring] log/log.go:160 Stopping metrics logging.
2021-10-02T16:55:35.317+0530 INFO instance/beat.go:479 filebeat stopped.
2021-10-02T16:55:35.319+0530 ERROR instance/beat.go:989 Exiting: Failed to start crawler: creating module reloader failed: error checking input configuration: No paths were defined for
 input accessing config
Exiting: Failed to start crawler: creating module reloader failed: error checking input configuration: No paths were defined for input accessing config

```

---

<div class="post-metadata">

### Author: ![zx8086](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zx8086/32/94917_2.png) [@zx8086](https://discuss.elastic.co/u/zx8086)
#### Post date: [October 2, 2021, 12:42pm UTC](https://discuss.elastic.co/t/filebeat-connection-to-elastic-search-error/285733/5 "2021-10-02T12:42:20Z")

</div>

Can you share your filebeat.yml config ? Have you configured any Inputs or Modules?

> [@siddhesh\_jadhav](#):
>
> hosts: ["localhost:9200"]

Are filebeat and elasticsearch on the same machine ? Also in your elasticsearch.yml, what do you have for the network host.

> network.host:

---

<div class="post-metadata">

### Author: ![siddhesh\_jadhav](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/siddhesh_jadhav/32/95367_2.png) [@siddhesh\_jadhav](https://discuss.elastic.co/u/siddhesh_jadhav)
#### Post date: [October 2, 2021, 1:17pm UTC](https://discuss.elastic.co/t/filebeat-connection-to-elastic-search-error/285733/6 "2021-10-02T13:17:06Z")

</div>

```auto

# ============================== Filebeat inputs ===============================

filebeat.input:

- type: log

 
  enabled: true

 
  paths:
- C:\Program Files (x86)\ELK\filebeat\logs\*.log
   
 setup.template.settings:
  index.number_of_shards: 2
 
# =============================== Elastic Cloud ================================

cloud.id: "My_deployment:dXMtY2VudHJhbDEuZ2NwLmNsb3VkLmVzLmlvJDFmYmY1Zjc2YThiMzQwOWZiMTZhNWUwM2QwYzJhYzkzJDg5NDZmOWIwNzE2NTRiNTg5Y2FhZThkOTQwY2MxNDQ5"

cloud.auth: "siddhesh:$iddheshisFromj@dhavnagar"

# ---------------------------- Elasticsearch Output ----------------------------
output.elasticsearch:
  # Array of hosts to connect to.
  hosts: ["localhost:9200"]
# ================================= Processors =================================
processors:
  - add_host_metadata:
      when.not.contains.tags: forwarded
  - add_cloud_metadata: ~
  - add_docker_metadata: ~
  - add_kubernetes_metadata: ~

```

---

<div class="post-metadata">

### Author: ![siddhesh\_jadhav](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/siddhesh_jadhav/32/95367_2.png) [@siddhesh\_jadhav](https://discuss.elastic.co/u/siddhesh_jadhav)
#### Post date: [October 2, 2021, 1:18pm UTC](https://discuss.elastic.co/t/filebeat-connection-to-elastic-search-error/285733/7 "2021-10-02T13:18:17Z")

</div>

No, I don't any idea about Elasticsearch.yml file . where I can find it and What configurations are needed.

---

<div class="post-metadata">

### Author: ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)
#### Post date: [October 2, 2021, 1:38pm UTC](https://discuss.elastic.co/t/filebeat-connection-to-elastic-search-error/285733/8 "2021-10-02T13:38:31Z")

</div>

First, where is your Elasticsearch running?

It is running in the same machine as filebeat or you are using elastic cloud? You can't have both outputs.

The `filebeat.yml` that you shared has 2 outputs enabled, the one for elastic cloud with `cloud.id` and `cloud.auth` and the one with the `output.elasticsearch`.

The first post you shared shows a bad request, that could mean that you have an Elasticsearch running on `127.0.0.1` on port `9200` but your request was wrong, in this case the error was with the `_license` endpoint. Are you running the OSS version or other fork in this machine?

You need to provide more information about where your Elasticsearch is running and which version it is.

Second, you shared your `cloud.id` and `cloud.auth`, do not share sensitive information on public forums, you should change your elastic cloud password now.

---

<div class="post-metadata">

### Author: ![siddhesh\_jadhav](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/siddhesh_jadhav/32/95367_2.png) [@siddhesh\_jadhav](https://discuss.elastic.co/u/siddhesh_jadhav)
#### Post date: [October 3, 2021, 8:53am UTC](https://discuss.elastic.co/t/filebeat-connection-to-elastic-search-error/285733/9 "2021-10-03T08:53:20Z")

</div>

I'm running OSS version. .msi file for windows its 5.5.0 version. I have disabled output for local host. could you guide me to send logs from filebeat to elastic cloud in windows.  
And Yes I have changed password before sending you file.

---

<div class="post-metadata">

### Author: ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)
#### Post date: [October 3, 2021, 1:36pm UTC](https://discuss.elastic.co/t/filebeat-connection-to-elastic-search-error/285733/10 "2021-10-03T13:36:14Z")

</div>

To send data to the elastic cloud using filebeat you just need to configure the `cloud.auth` and `cloud.id` setting, is describes in the [documentation](https://www.elastic.co/guide/en/beats/filebeat/current/configure-cloud-id.html).

In your first post you were sending data to a local Elasticsearch using filebeat version 7.15, since version 7.13, I think, filebeat can not output data to OSS versions of Elasticsearch as it will check the `_license` endpoint, also, Elasticsearch 5 is too old, I do not think filebeat 7.X is even compatible with this version.

If you want to send data to this 5.X local instance you need to use Filebeat version 5.X

---

<div class="post-metadata">

### Author: ![siddhesh\_jadhav](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/siddhesh_jadhav/32/95367_2.png) [@siddhesh\_jadhav](https://discuss.elastic.co/u/siddhesh_jadhav)
#### Post date: [October 3, 2021, 1:40pm UTC](https://discuss.elastic.co/t/filebeat-connection-to-elastic-search-error/285733/11 "2021-10-03T13:40:07Z")

</div>

ok I will follow the documentation and try to send data to cloud. I will get back if I have any problem regarding configuration.  
thanks for the support.  
and one more thing do we need to install Elasticsearch.exe install on our host to send data to cloud?

---

<div class="post-metadata">

### Author: ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)
#### Post date: [October 3, 2021, 1:48pm UTC](https://discuss.elastic.co/t/filebeat-connection-to-elastic-search-error/285733/12 "2021-10-03T13:48:41Z")

</div>

No, you do not a local Elasticsearch instance if you want to send data to elastic cloud, just filebeat is enough.

---

<div class="post-metadata">

### Author: ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)
#### Post date: [October 3, 2021, 3:12pm UTC](https://discuss.elastic.co/t/filebeat-connection-to-elastic-search-error/285733/13 "2021-10-03T15:12:37Z")

</div>

> [@siddhesh\_jadhav](#):
>
> ```auto
> paths:
> - C:\Program Files (x86)\ELK\filebeat\logs\*.log
>    
> 
> ```

That is malformed not indented correctly and windows path need a single quote to interpreted correctly

```auto
  paths:
    - 'C:\Program Files (x86)\ELK\filebeat\logs\*.log'
   

```

There are some tips [here](https://www.elastic.co/guide/en/beats/filebeat/7.15/yaml-tips.html)

---

<div class="post-metadata">

### Author: ![siddhesh\_jadhav](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/siddhesh_jadhav/32/95367_2.png) [@siddhesh\_jadhav](https://discuss.elastic.co/u/siddhesh_jadhav)
#### Post date: [October 3, 2021, 5:09pm UTC](https://discuss.elastic.co/t/filebeat-connection-to-elastic-search-error/285733/14 "2021-10-03T17:09:56Z")

</div>

ok I will let you know once I do the config.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [October 31, 2021, 5:10pm UTC](https://discuss.elastic.co/t/filebeat-connection-to-elastic-search-error/285733/15 "2021-10-31T17:10:34Z")

</div>

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