# Filebeat config.hosts using url

**URL:** <https://discuss.elastic.co/t/filebeat-config-hosts-using-url/198911>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [September 10, 2019, 1:31pm UTC](https://discuss.elastic.co/t/filebeat-config-hosts-using-url/198911 "2019-09-10T13:31:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frank\_Wang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/frank_wang/32/53926_2.png) [@Frank\_Wang](https://discuss.elastic.co/u/Frank_Wang)\
**Post date:** [September 10, 2019, 1:31pm UTC](https://discuss.elastic.co/t/filebeat-config-hosts-using-url/198911/1 "2019-09-10T13:31:20Z")

</div>

I have a elasticSearch deployed on url "[hd-yfcs-es6.xxx.com](http://hd-yfcs-es6.xxx.com)". I can curl it and get result like following

```auto
[root@A04-R08-I198-70-1WLFTP2 conf]# curl CfsEs:CfsEs-es@hd-yfcs-es6.xxx.com:80 -v
* About to connect() to hd-yfcs-es6.xxx.com port 80 (#0)
< content-type: application/json; charset=UTF-8
< content-length: 523
< Connection: close
< 
{
  "name" : "A04-R08-I192-10-FTC4F22.xxx.COM",
  "cluster_name" : "yufa_en_tmp_test",
  "cluster_uuid" : "aMbdZAfSQKyAqLN6RlosHA",
  "version" : {
    "number" : "6.8.0",
    "build_flavor" : "default",
    "build_type" : "tar",
    "build_hash" : "65b6179",
    "build_date" : "2019-05-15T20:06:13.172855Z",
    "build_snapshot" : false,
    "lucene_version" : "7.7.0",
    "minimum_wire_compatibility_version" : "5.6.0",
    "minimum_index_compatibility_version" : "5.0.0"
  },
  "tagline" : "You Know, for Search"
}
* Closing connection 0

```

But when I use filebeat, I got error like this:

```auto
[root@A04-R08-I198-70-1WLFTP2 conf]# filebeat test output -c /export/xxx/conf/filebeat.yml -e           
2019-09-10T21:29:14.066+0800 INFO instance/beat.go:606 Home path: [/usr/share/filebeat] Config path: [/etc/filebeat] Data path: [/var/lib/filebeat] Logs path: [/var/log/filebeat]
2019-09-10T21:29:14.066+0800 INFO instance/beat.go:614 Beat ID: 9ddafba8-70c5-4961-8a20-c19e60d4c1452019-09-10T21:29:14.066+0800 INFO [index-management] idxmgmt/std.go:178 Set output.elasticsearch.index to 'filebeat-7.3.1' as ILM is enabled.
2019-09-10T21:29:14.067+0800 INFO elasticsearch/client.go:170 Elasticsearch url: http://hd-yfcs-es6.jdcloud.com:80
elasticsearch: http://hd-yfcs-es6.xxx.com:80... parse url... OK
  connection...
    parse host... OK
    dns lookup... OK
    addresses: 10.226.202.61
    dial up... OK
  TLS... WARN secure connection disabled
  talk to server... ERROR 503 Service Unavailable: <html><body><h1>503 Service Unavailable</h1>
No server is available to handle this request.
</body></html>

```

I think problem is about http-protocol. Can someone help me to finger it out?

---

<div class="post-metadata">

**Author:** ![Ryne\_Keel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ryne_keel/32/42827_2.png) [@Ryne\_Keel](https://discuss.elastic.co/u/Ryne_Keel)\
**Post date:** [September 11, 2019, 4:56pm UTC](https://discuss.elastic.co/t/filebeat-config-hosts-using-url/198911/2 "2019-09-11T16:56:09Z")

</div>

Can we see your elasticsearch config? Might be an issue with the node discovery settings or some such.

---

<div class="post-metadata">

**Author:** ![Frank\_Wang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/frank_wang/32/53926_2.png) [@Frank\_Wang](https://discuss.elastic.co/u/Frank_Wang)\
**Post date:** [September 19, 2019, 10:16am UTC](https://discuss.elastic.co/t/filebeat-config-hosts-using-url/198911/3 "2019-09-19T10:16:14Z")

</div>

Thank you， but I work around.

---

<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 17, 2019, 10:16am UTC](https://discuss.elastic.co/t/filebeat-config-hosts-using-url/198911/4 "2019-10-17T10:16:15Z")

</div>

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