# Kibana server.host "0.0.0.0" hostname" must be a valid hostname

**URL:** <https://discuss.elastic.co/t/kibana-server-host-0-0-0-0-hostname-must-be-a-valid-hostname/204458>\
**Category:** Kibana\
**Created:** [October 21, 2019, 12:06pm UTC](https://discuss.elastic.co/t/kibana-server-host-0-0-0-0-hostname-must-be-a-valid-hostname/204458 "2019-10-21T12:06:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bharath\_venkat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bharath_venkat/32/48504_2.png) [@Bharath\_venkat](https://discuss.elastic.co/u/Bharath_venkat)\
**Post date:** [October 21, 2019, 12:06pm UTC](https://discuss.elastic.co/t/kibana-server-host-0-0-0-0-hostname-must-be-a-valid-hostname/204458/1 "2019-10-21T12:06:50Z")

</div>

I am trying to create SAML SSO authentication and secure elk with TLS/SSL on kubernetes . Following the [post](https://blogs.msdn.microsoft.com/atverma/2018/10/09/azure-kubernetes-service-aks-azure-ad-saml-based-single-sign-on-to-secure-elasticsearch-and-kibana-and-securing-communications-in-elk/). I got stuck while deploying kibana . Part of config file looks as below  
data:  
kibana.yml: |  
server.name: sample-kibana  
server.host: "0.0.0.0"  
elasticsearch.url: [https://sample-elasticsearch:9200](https://sample-elasticsearch:9200)

after deploying kibana the container crashes with below error

$ kubectl logs sample-kibana-769977668c-crdxf -n elasticsearch  
{"type":"log","@timestamp":"2019-10-21T11:24:27Z","tags":["plugin","warning"],"pid":1,"path":"/usr/share/kibana/src/legacy/core\_plugins/ems\_util","message":"Skipping non-plugin directory at /usr/share/kibana/src/legacy/core\_plugins/ems\_util"}  
{"type":"log","@timestamp":"2019-10-21T11:24:27Z","tags":["fatal","root"],"pid":1,"message":"{ ValidationError: child "xpack" fails because [child "security" fails because [child "public" fails because [child "hostname" fails because ["hostname" must be a valid hostname]]]]\n at Object.exports.process (/usr/share/kibana/node\_modules/joi/lib/errors.js:196:19)\n at internals.Object.\_validateWithOptions (/usr/share/kibana/node\_modules/joi/lib/types/any/index.js:675:31)\n at module.exports.internals.Any.root.validate (/usr/share/kibana/node\_modules/joi/lib/index.js:146:23)\n at Config.\_commit (/usr/share/kibana/src/server/config/config.js:139:35)\n at Config.set (/usr/share/kibana/src/server/config/config.js:108:10)\n at Config.extendSchema (/usr/share/kibana/src/server/config/config.js:81:10)\n at extendConfigService (/usr/share/kibana/src/plugin\_discovery/plugin\_config/extend\_config\_service.js:45:10) name: 'ValidationError' }"}

FATAL ValidationError: child "xpack" fails because [child "security" fails because [child "public" fails because [child "hostname" fails because ["hostname" must be a valid hostname]]]]

I am not sure what i am missing here . I would highly appreciate some help here.

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [October 21, 2019, 12:34pm UTC](https://discuss.elastic.co/t/kibana-server-host-0-0-0-0-hostname-must-be-a-valid-hostname/204458/2 "2019-10-21T12:34:01Z")

</div>

Judging from the blog post you didn't specify a valid hostname in the `xpack.security` section:  
The post shows this:

```auto
xpack.security.public:
      protocol: https
      hostname: KIBANA_URL

```

`KIBANA_URL` has to be replaced with your hostname, but you have to make sure it's just the hostname (not the port, not the protocol). Maybe you used `https://your.kibana.domain.com` or `your.kibana.domain.com:5601`? You have to put just `your.kibana.domain.com` in there

---

<div class="post-metadata">

**Author:** ![Bharath\_venkat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bharath_venkat/32/48504_2.png) [@Bharath\_venkat](https://discuss.elastic.co/u/Bharath_venkat)\
**Post date:** [October 21, 2019, 3:55pm UTC](https://discuss.elastic.co/t/kibana-server-host-0-0-0-0-hostname-must-be-a-valid-hostname/204458/3 "2019-10-21T15:55:47Z")

</div>

Thanks for your quick reply . I tried by giving the kibana url . But still container fails with same error . Below is the config with the changes

apiVersion: v1  
kind: ConfigMap  
metadata:  
name: sample-kibana-configmap  
namespace: elasticsearch  
data:  
kibana.yml: |  
server.name: sample-kibana  
server.host: "0.0.0.0"  
elasticsearch.url: [https://sample-elasticsearch:9200](https://sample-elasticsearch:9200)  
xpack.monitoring.ui.container.elasticsearch.enabled: true  
elasticsearch.username: kibana  
elasticsearch.password: password1$  
xpack.security.encryptionKey: "something\_at\_least\_32\_characters"  
elasticsearch.ssl.certificateAuthorities: "/usr/share/kibana/config/elastic-stack-ca.pem"  
server.ssl.enabled: true  
server.ssl.key: "/usr/share/kibana/config/instance.key"  
server.ssl.certificate: "/usr/share/kibana/config/instance.crt"  
xpack.monitoring.elasticsearch.ssl.verificationMode: certificate  
elasticsearch.ssl.verificationMode: certificate  
xpack.security.authProviders: [saml, basic]  
server.xsrf.whitelist: [/api/security/v1/saml]  
xpack.security.public:  
protocol: https  
hostname: [https://saml-aad.elastictest.co](https://saml-aad.elastictest.co)

---

<div class="post-metadata">

**Author:** ![Bharath\_venkat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bharath_venkat/32/48504_2.png) [@Bharath\_venkat](https://discuss.elastic.co/u/Bharath_venkat)\
**Post date:** [October 21, 2019, 3:58pm UTC](https://discuss.elastic.co/t/kibana-server-host-0-0-0-0-hostname-must-be-a-valid-hostname/204458/4 "2019-10-21T15:58:21Z")

</div>

sorry . Had to remove https from the kibana\_url . It worked. Thank you

---

<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:** [November 18, 2019, 3:58pm UTC](https://discuss.elastic.co/t/kibana-server-host-0-0-0-0-hostname-must-be-a-valid-hostname/204458/5 "2019-11-18T15:58:22Z")

</div>

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