# Kibana service giving "FATAL Error: \[config validation of \[server\].host\]: value must be a valid hostname (see RFC 1123)" error

**URL:** <https://discuss.elastic.co/t/kibana-service-giving-fatal-error-config-validation-of-server-host-value-must-be-a-valid-hostname-see-rfc-1123-error/351913>\
**Category:** Kibana\
**Created:** [January 27, 2024, 9:35am UTC](https://discuss.elastic.co/t/kibana-service-giving-fatal-error-config-validation-of-server-host-value-must-be-a-valid-hostname-see-rfc-1123-error/351913 "2024-01-27T09:35:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vikas.shirke](https://avatars.discourse-cdn.com/v4/letter/v/b5a626/32.png) [@vikas.shirke](https://discuss.elastic.co/u/vikas.shirke)\
**Post date:** [January 27, 2024, 9:35am UTC](https://discuss.elastic.co/t/kibana-service-giving-fatal-error-config-validation-of-server-host-value-must-be-a-valid-hostname-see-rfc-1123-error/351913/1 "2024-01-27T09:35:55Z")

</div>

On the VM where we have installed Elasticsearch and Kibana service, Kibana service is giving "FATAL Error: [config validation of [server].host]: value must be a valid hostname (see RFC 1123)" error. After troubleshooting we found that, VM host name is started with integer. e.g. 123-VM-01 and we have given it to server.host in kibana.yml file.

After changing host name to starting with alphabet e.g. A123-VM-01 then Kibana service started sucessfully. Strangly Elasticsearch service worked with integer host name.

I tried multiple combination of host name and found out that Kibana service gives above error where host name is started with integer. But as per RFC 1123 mentioned in the error, host name starting with integer is valid.

Is it right to say that host name starting with integer is not valid for Kibana service?

---

<div class="post-metadata">

**Author:** ![jsanz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsanz/32/53734_2.png) [@jsanz](https://discuss.elastic.co/u/jsanz)\
**Post date:** [February 1, 2024, 2:47pm UTC](https://discuss.elastic.co/t/kibana-service-giving-fatal-error-config-validation-of-server-host-value-must-be-a-valid-hostname-see-rfc-1123-error/351913/2 "2024-02-01T14:47:20Z")

</div>

Run a minimal docker command to start Kibana on a server with a hostname starting with a number and got the same error

```bash
docker run --rm --name 1kibana -e SERVER_HOST=1kibana \
  docker.elastic.co/kibana/kibana:8.12.0

```

```plaintext
Kibana is currently running with legacy OpenSSL providers enabled! For details and instructions on how to disable see https://www.elastic.co/guide/en/kibana/8.12/production.html#openssl-legacy-provider
{"log.level":"info","@timestamp":"2024-02-01T14:31:09.235Z","log.logger":"elastic-apm-node","ecs.version":"8.10.0","agentVersion":"4.2.0","env":{"pid":7,"proctitle":"/usr/share/kibana/bin/../node/bin/node","os":"linux 6.1.0-1029-oem","arch":"x64","host":"277d918d5177","timezone":"UTC+00","runtime":"Node.js v18.18.2"},"config":{"active":{"source":"start","value":true},"breakdownMetrics":{"source":"start","value":false},"captureBody":{"source":"start","value":"off","commonName":"capture_body"},"captureHeaders":{"source":"start","value":false},"centralConfig":{"source":"start","value":false},"contextPropagationOnly":{"source":"start","value":true},"environment":{"source":"start","value":"production"},"globalLabels":{"source":"start","value":[["git_rev","b4a0b5001fc923c868e6b9e1b6e004d280488d49"]],"sourceValue":{"git_rev":"b4a0b5001fc923c868e6b9e1b6e004d280488d49"}},"logLevel":{"source":"default","value":"info","commonName":"log_level"},"metricsInterval":{"source":"start","value":120,"sourceValue":"120s"},"serverUrl":{"source":"start","value":"https://kibana-cloud-apm.apm.us-east-1.aws.found.io/","commonName":"server_url"},"transactionSampleRate":{"source":"start","value":0.1,"commonName":"transaction_sample_rate"},"captureSpanStackTraces":{"source":"start","sourceValue":false},"secretToken":{"source":"start","value":"[REDACTED]","commonName":"secret_token"},"serviceName":{"source":"start","value":"kibana","commonName":"service_name"},"serviceVersion":{"source":"start","value":"8.12.1-SNAPSHOT","commonName":"service_version"}},"activationMethod":"require","message":"Elastic APM Node.js Agent v4.2.0"}
[2024-02-01T14:31:09.897+00:00][INFO][root] Kibana is starting
[2024-02-01T14:31:09.930+00:00][INFO][root] Kibana is shutting down
[2024-02-01T14:31:09.933+00:00][FATAL][root] Reason: [config validation of [server].host]: value must be a valid hostname (see RFC 1123).
Error: [config validation of [server].host]: value must be a valid hostname (see RFC 1123).
    at ObjectType.validate (/usr/share/kibana/node_modules/@kbn/config-schema/src/types/type.js:94:13)
    at ConfigService.validateAtPath (/usr/share/kibana/node_modules/@kbn/config/src/config_service.js:253:19)
    at /usr/share/kibana/node_modules/@kbn/config/src/config_service.js:263:204
    at /usr/share/kibana/node_modules/rxjs/dist/cjs/internal/operators/map.js:10:37
    at OperatorSubscriber._this._next (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js:33:21)
    at OperatorSubscriber.Subscriber.next (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/Subscriber.js:51:18)
    at /usr/share/kibana/node_modules/rxjs/dist/cjs/internal/operators/distinctUntilChanged.js:18:28
    at OperatorSubscriber._this._next (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js:33:21)
    at OperatorSubscriber.Subscriber.next (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/Subscriber.js:51:18)
    at /usr/share/kibana/node_modules/rxjs/dist/cjs/internal/operators/map.js:10:24
    at OperatorSubscriber._this._next (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js:33:21)
    at OperatorSubscriber.Subscriber.next (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/Subscriber.js:51:18)
    at ReplaySubject._subscribe (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/ReplaySubject.js:54:24)
    at ReplaySubject.Observable._trySubscribe (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/Observable.js:41:25)
    at ReplaySubject.Subject._trySubscribe (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/Subject.js:123:47)
    at /usr/share/kibana/node_modules/rxjs/dist/cjs/internal/Observable.js:35:31
    at Object.errorContext (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/util/errorContext.js:22:9)
    at ReplaySubject.Observable.subscribe (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/Observable.js:26:24)
    at /usr/share/kibana/node_modules/rxjs/dist/cjs/internal/operators/share.js:66:18
    at OperatorSubscriber.<anonymous> (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/util/lift.js:14:28)
    at /usr/share/kibana/node_modules/rxjs/dist/cjs/internal/Observable.js:30:30
    at Object.errorContext (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/util/errorContext.js:22:9)
    at Observable.subscribe (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/Observable.js:26:24)
    at /usr/share/kibana/node_modules/rxjs/dist/cjs/internal/operators/map.js:9:16
    at OperatorSubscriber.<anonymous> (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/util/lift.js:14:28)
    at /usr/share/kibana/node_modules/rxjs/dist/cjs/internal/Observable.js:30:30
    at Object.errorContext (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/util/errorContext.js:22:9)
    at Observable.subscribe (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/Observable.js:26:24)
    at /usr/share/kibana/node_modules/rxjs/dist/cjs/internal/operators/distinctUntilChanged.js:13:16
    at OperatorSubscriber.<anonymous> (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/util/lift.js:14:28)
    at /usr/share/kibana/node_modules/rxjs/dist/cjs/internal/Observable.js:30:30
    at Object.errorContext (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/util/errorContext.js:22:9)
    at Observable.subscribe (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/Observable.js:26:24)
    at /usr/share/kibana/node_modules/rxjs/dist/cjs/internal/operators/map.js:9:16
    at SafeSubscriber.<anonymous> (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/util/lift.js:14:28)
    at /usr/share/kibana/node_modules/rxjs/dist/cjs/internal/Observable.js:30:30
    at Object.errorContext (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/util/errorContext.js:22:9)
    at Observable.subscribe (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/Observable.js:26:24)
    at /usr/share/kibana/node_modules/rxjs/dist/cjs/internal/firstValueFrom.js:24:16
    at new Promise (<anonymous>)
    at firstValueFrom (/usr/share/kibana/node_modules/rxjs/dist/cjs/internal/firstValueFrom.js:8:12)
    at EnvironmentService.preboot (/usr/share/kibana/node_modules/@kbn/core-environment-server-internal/src/environment_service.js:50:169)
    at Server.preboot (/usr/share/kibana/node_modules/@kbn/core-root-server-internal/src/server.js:146:55)
    at Root.preboot (/usr/share/kibana/node_modules/@kbn/core-root-server-internal/src/root/index.js:47:32)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at bootstrap (/usr/share/kibana/node_modules/@kbn/core-root-server-internal/src/bootstrap.js:97:9)
    at Command.<anonymous> (/usr/share/kibana/src/cli/serve/serve.js:241:5)

 FATAL Error: [config validation of [server].host]: value must be a valid hostname (see RFC 1123).

```

I've opened an issue about this for my colleagues to review

> <https://github.com/elastic/kibana/issues/176077>
>
> \*\*Kibana version:\*\*
> Tested on 8.12.0
> 
> \*\*Server OS version:\*\*
> Using docker im…age
> 
> \*\*Original install method (e.g. download page, yum, from source, etc.):\*\*
> Docker
> 
> \*\*Describe the bug:\*\*
> The initialization of Kibana prevents running the service on a host with a digit as the first character, complaining about RFC113, but \[RFC113\](https://www.rfc-editor.org/rfc/rfc1123#section-2) seems to allow hosts to start with a digit.
> 
> \*\*Steps to reproduce:\*\*
> The easiest way to test this is using docker:
> 
> \`\`\`bash
> docker run --rm --name 1kibana -e SERVER\_HOST=1kibana \\
> docker.elastic.co/kibana/kibana:8.12.0
> \`\`\`
> 
> The execution ends failing with:
> 
> \`\`\`
> FATAL Error: \[config validation of \[server\].host\]: value must be 
> a valid hostname (see RFC 1123).
> \`\`\`
> 
> \*\*Expected behavior:\*\*
> Kibana starts without issues.
> 
> \*\*Provide logs and/or server output (if relevant):\*\*
> 
> \<details\>\<summary\>Full output\</summary\>
> 
> \`\`\`
> Kibana is currently running with legacy OpenSSL providers enabled! For details and instructions on how to disable see https://www.elastic.co/guide/en/kibana/8.12/production.html#openssl-legacy-provider
> {"log.level":"info","@timestamp":"2024-02-01T14:39:25.396Z","log.logger":"elastic-apm-node","ecs.version":"8.10.0","agentVersion":"4.2.0","env":{"pid":6,"proctitle":"/usr/share/kibana/bin/../node/bin/node","os":"linux 6.1.0-1029-oem","arch":"x64","host":"a7f6f2fcb248","timezone":"UTC+00","runtime":"Node.js v18.18.2"},"config":{"active":{"source":"start","value":true},"breakdownMetrics":{"source":"start","value":false},"captureBody":{"source":"start","value":"off","commonName":"capture\_body"},"captureHeaders":{"source":"start","value":false},"centralConfig":{"source":"start","value":false},"contextPropagationOnly":{"source":"start","value":true},"environment":{"source":"start","value":"production"},"globalLabels":{"source":"start","value":\[\["git\_rev","e9092c0a17923f4ed984456b8a5db619b0a794b3"\]\],"sourceValue":{"git\_rev":"e9092c0a17923f4ed984456b8a5db619b0a794b3"}},"logLevel":{"source":"default","value":"info","commonName":"log\_level"},"metricsInterval":{"source":"start","value":120,"sourceValue":"120s"},"serverUrl":{"source":"start","value":"https://kibana-cloud-apm.apm.us-east-1.aws.found.io/","commonName":"server\_url"},"transactionSampleRate":{"source":"start","value":0.1,"commonName":"transaction\_sample\_rate"},"captureSpanStackTraces":{"source":"start","sourceValue":false},"secretToken":{"source":"start","value":"\[REDACTED\]","commonName":"secret\_token"},"serviceName":{"source":"start","value":"kibana","commonName":"service\_name"},"serviceVersion":{"source":"start","value":"8.12.0","commonName":"service\_version"}},"activationMethod":"require","message":"Elastic APM Node.js Agent v4.2.0"}
> \[2024-02-01T14:39:26.068+00:00\]\[INFO \]\[root\] Kibana is starting
> \[2024-02-01T14:39:26.101+00:00\]\[INFO \]\[root\] Kibana is shutting down
> \[2024-02-01T14:39:26.102+00:00\]\[FATAL\]\[root\] Reason: \[config validation of \[server\].host\]: value must be a valid hostname (see RFC 1123).
> Error: \[config validation of \[server\].host\]: value must be a valid hostname (see RFC 1123).
> at ObjectType.validate (/usr/share/kibana/node\_modules/@kbn/config-schema/src/types/type.js:94:13)
> at ConfigService.validateAtPath (/usr/share/kibana/node\_modules/@kbn/config/src/config\_service.js:253:19)
> at /usr/share/kibana/node\_modules/@kbn/config/src/config\_service.js:263:204
> at /usr/share/kibana/node\_modules/rxjs/dist/cjs/internal/operators/map.js:10:37
> at OperatorSubscriber.\_this.\_next (/usr/share/kibana/node\_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js:33:21)
> at OperatorSubscriber.Subscriber.next (/usr/share/kibana/node\_modules/rxjs/dist/cjs/internal/Subscriber.js:51:18)
> at /usr/share/kibana/node\_modules/rxjs/dist/cjs/internal/operators/distinctUntilChanged.js:18:28
> at OperatorSubscriber.\_this.\_next (/usr/share/kibana/node\_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js:33:21)
> at OperatorSubscriber.Subscriber.next (/usr/share/kibana/node\_modules/rxjs/dist/cjs/internal/Subscriber.js:51:18)
> at /usr/share/kibana/node\_modules/rxjs/dist/cjs/internal/operators/map.js:10:24
> at OperatorSubscriber.\_this.\_next (/usr/share/kibana/node\_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js:33:21)
> at OperatorSubscriber.Subscriber.next (/usr/share/kibana/node\_modules/rxjs/dist/cjs/internal/Subscriber.js:51:18)
> at ReplaySubject.\_subscribe (/usr/share/kibana/node\_modules/rxjs/dist/cjs/internal/ReplaySubject.js:54:24)
> at ReplaySubject.Observable.\_trySubscribe (/usr/share/kibana/node\_modules/rxjs/dist/cjs/internal/Observable.js:41:25)
> at ReplaySubject.Subject.\_trySubscribe (/usr/share/kibana/node\_modules/rxjs/dist/cjs/internal/Subject.js:123:47)
> at /usr/share/kibana/node\_modules/rxjs/dist/cjs/internal/Observable.js:35:31
> at Object.errorContext (/usr/share/kibana/node\_modules/rxjs/dist/cjs/internal/util/errorContext.js:22:9)
> at ReplaySubject.Observable.subscribe (/usr/share/kibana/node\_modules/rxjs/dist/cjs/internal/Observable.js:26:24)
> at /usr/share/kibana/node\_modules/rxjs/dist/cjs/internal/operators/share.js:66:18
> at OperatorSubscriber.\<anonymous\> (/usr/share/kibana/node\_modules/rxjs/dist/cjs/internal/util/lift.js:14:28)
> at /usr/share/kibana/node\_modules/rxjs/dist/cjs/internal/Observable.js:30:30
> at Object.errorContext (/usr/share/kibana/node\_modules/rxjs/dist/cjs/internal/util/errorContext.js:22:9)
> at Observable.subscribe (/usr/share/kibana/node\_modules/rxjs/dist/cjs/internal/Observable.js:26:24)
> at /usr/share/kibana/node\_modules/rxjs/dist/cjs/internal/operators/map.js:9:16
> at OperatorSubscriber.\<anonymous\> (/usr/share/kibana/node\_modules/rxjs/dist/cjs/internal/util/lift.js:14:28)
> at /usr/share/kibana/node\_modules/rxjs/dist/cjs/internal/Observable.js:30:30
> at Object.errorContext (/usr/share/kibana/node\_modules/rxjs/dist/cjs/internal/util/errorContext.js:22:9)
> at Observable.subscribe (/usr/share/kibana/node\_modules/rxjs/dist/cjs/internal/Observable.js:26:24)
> at /usr/share/kibana/node\_modules/rxjs/dist/cjs/internal/operators/distinctUntilChanged.js:13:16
> at OperatorSubscriber.\<anonymous\> (/usr/share/kibana/node\_modules/rxjs/dist/cjs/internal/util/lift.js:14:28)
> at /usr/share/kibana/node\_modules/rxjs/dist/cjs/internal/Observable.js:30:30
> at Object.errorContext (/usr/share/kibana/node\_modules/rxjs/dist/cjs/internal/util/errorContext.js:22:9)
> at Observable.subscribe (/usr/share/kibana/node\_modules/rxjs/dist/cjs/internal/Observable.js:26:24)
> at /usr/share/kibana/node\_modules/rxjs/dist/cjs/internal/operators/map.js:9:16
> at SafeSubscriber.\<anonymous\> (/usr/share/kibana/node\_modules/rxjs/dist/cjs/internal/util/lift.js:14:28)
> at /usr/share/kibana/node\_modules/rxjs/dist/cjs/internal/Observable.js:30:30
> at Object.errorContext (/usr/share/kibana/node\_modules/rxjs/dist/cjs/internal/util/errorContext.js:22:9)
> at Observable.subscribe (/usr/share/kibana/node\_modules/rxjs/dist/cjs/internal/Observable.js:26:24)
> at /usr/share/kibana/node\_modules/rxjs/dist/cjs/internal/firstValueFrom.js:24:16
> at new Promise (\<anonymous\>)
> at firstValueFrom (/usr/share/kibana/node\_modules/rxjs/dist/cjs/internal/firstValueFrom.js:8:12)
> at EnvironmentService.preboot (/usr/share/kibana/node\_modules/@kbn/core-environment-server-internal/src/environment\_service.js:50:169)
> at Server.preboot (/usr/share/kibana/node\_modules/@kbn/core-root-server-internal/src/server.js:146:55)
> at Root.preboot (/usr/share/kibana/node\_modules/@kbn/core-root-server-internal/src/root/index.js:47:32)
> at processTicksAndRejections (node:internal/process/task\_queues:95:5)
> at bootstrap (/usr/share/kibana/node\_modules/@kbn/core-root-server-internal/src/bootstrap.js:97:9)
> at Command.\<anonymous\> (/usr/share/kibana/src/cli/serve/serve.js:241:5)
> 
> FATAL Error: \[config validation of \[server\].host\]: value must be a valid hostname (see RFC 1123).
> \`\`\`
> \</details\>
> 
> 
> \*\*Any additional context:\*\*
> \[Community discussion\](https://discuss.elastic.co/t/kibana-service-giving-fatal-error-config-validation-of-server-host-value-must-be-a-valid-hostname-see-rfc-1123-error/351913) that triggered this report.

---

<div class="post-metadata">

**Author:** ![vikas.shirke](https://avatars.discourse-cdn.com/v4/letter/v/b5a626/32.png) [@vikas.shirke](https://discuss.elastic.co/u/vikas.shirke)\
**Post date:** [February 2, 2024, 4:02am UTC](https://discuss.elastic.co/t/kibana-service-giving-fatal-error-config-validation-of-server-host-value-must-be-a-valid-hostname-see-rfc-1123-error/351913/3 "2024-02-02T04:02:00Z")

</div>

Thank you for opening an issue.

I have modified hostname to start with alphabet for time being as it was in production.

---

<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:** [March 1, 2024, 4:02am UTC](https://discuss.elastic.co/t/kibana-service-giving-fatal-error-config-validation-of-server-host-value-must-be-a-valid-hostname-see-rfc-1123-error/351913/4 "2024-03-01T04:02:25Z")

</div>

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