FATAL CLI ERROR YAMLException: can not read a block mapping entry; a multiline key may not be an implicit key at line 9, column 1: # Enables you to specify a path

Buen dia
tengo el error
FATAL CLI ERROR YAMLException: can not read a block mapping entry; a multiline key may not be an implicit key at line 9, column 1:
# Enables you to specify a path ...

at generateError (/usr/share/kibana/node_modules/js-yaml/lib/js-yaml/loader.js:160:10)
at throwError (/usr/share/kibana/node_modules/js-yaml/lib/js-yaml/loader.js:166:9)
at readBlockMapping (/usr/share/kibana/node_modules/js-yaml/lib/js-yaml/loader.js:1027:9)
at composeNode (/usr/share/kibana/node_modules/js-yaml/lib/js-yaml/loader.js:1315:12)
at readDocument (/usr/share/kibana/node_modules/js-yaml/lib/js-yaml/loader.js:1478:3)
at loadDocuments (/usr/share/kibana/node_modules/js-yaml/lib/js-yaml/loader.js:1538:5)
at load (/usr/share/kibana/node_modules/js-yaml/lib/js-yaml/loader.js:1555:19)
at safeLoad (/usr/share/kibana/node_modules/js-yaml/lib/js-yaml/loader.js:1573:10)
at files.map.path (/usr/share/kibana/src/cli/serve/read_yaml_config.js:69:56)
at Array.map ()

y kibana no me carga aparece esto al abrir localhost:5601

It appears you're running the oss-only distribution of Elasticsearch.

To use the full set of free features in this distribution of Kibana, please update Elasticsearch to the default distribution.

por otro lado el archivo de configuracion kibana.yml en la ruta etc/kibana/ es:

Kibana is served by a back end server. This setting specifies the port to use.

server.port: 5601

Specifies the address to which the Kibana server will bind. IP addresses and host names are both valid values.

The default is 'localhost', which usually means remote machines will not be able to connect.

To allow connections from remote users, set this parameter to a non-loopback address.

server.host:"localhost"

Enables you to specify a path to mount Kibana at if you are running behind a proxy.

Use the server.rewriteBasePath setting to tell Kibana if it should remove the basePath

from requests it receives, and to prevent a deprecation warning at startup.

This setting cannot end in a slash.

#server.basePath: ""

Specifies whether Kibana should rewrite requests that are prefixed with

server.basePath or require that they are rewritten by your reverse proxy.

This setting was effectively always false before Kibana 6.3 and will

default to true starting in Kibana 7.0.

#server.rewriteBasePath: false

The maximum payload size in bytes for incoming server requests.

#server.maxPayloadBytes: 1048576

The Kibana server's name. This is used for display purposes.

#server.name: "kibana"

The URL of the Elasticsearch instance to use for all your queries.

elasticsearch.url: "http://localhost:9200"

When this setting's value is true Kibana uses the hostname specified in the server.host

setting. When the value of this setting is false, Kibana uses the hostname of the host

that connects to this Kibana instance.

#elasticsearch.preserveHost: true

Kibana uses an index in Elasticsearch to store saved searches, visualizations and

dashboards. Kibana creates a new index if the index doesn't already exist.

#kibana.index: ".kibana"

The default application to load.

#kibana.defaultAppId: "home"

If your Elasticsearch is protected with basic authentication, these settings provide

the username and password that the Kibana server uses to perform maintenance on the Kibana

index at startup. Your Kibana users still need to authenticate with Elasticsearch, which

is proxied through the Kibana server.

#elasticsearch.username: "user"
#elasticsearch.password: "pass"

Enables SSL and paths to the PEM-format SSL certificate and SSL key files, respectively.

These settings enable SSL for outgoing requests from the Kibana server to the browser.

#server.ssl.enabled: false
#server.ssl.certificate: /path/to/your/server.crt
#server.ssl.key: /path/to/your/server.key

Optional settings that provide the paths to the PEM-format SSL certificate and key files.

These files validate that your Elasticsearch backend uses the same key files.

#elasticsearch.ssl.certificate: /path/to/your/client.crt
#elasticsearch.ssl.key: /path/to/your/client.key

Optional setting that enables you to specify a path to the PEM file for the certificate

authority for your Elasticsearch instance.

#elasticsearch.ssl.certificateAuthorities: [ "/path/to/your/CA.pem" ]

To disregard the validity of SSL certificates, change this setting's value to 'none'.

#elasticsearch.ssl.verificationMode: full

Time in milliseconds to wait for Elasticsearch to respond to pings. Defaults to the value of

the elasticsearch.requestTimeout setting.

List of Kibana client-side headers to send to Elasticsearch. To send no client-side

headers, set this value to (an empty list).

#elasticsearch.requestHeadersWhitelist: [ authorization ]

Header names and values that are sent to Elasticsearch. Any custom headers cannot be overwritten

by client-side headers, regardless of the elasticsearch.requestHeadersWhitelist configuration.

#elasticsearch.customHeaders: {}

Time in milliseconds for Elasticsearch to wait for responses from shards. Set to 0 to disable.

#elasticsearch.shardTimeout: 30000

Time in milliseconds to wait for Elasticsearch at Kibana startup before retrying.

#elasticsearch.startupTimeout: 5000

Logs queries sent to Elasticsearch. Requires logging.verbose set to true.

#elasticsearch.logQueries: false

Specifies the path where Kibana creates the process ID file.

#pid.file: /var/run/kibana.pid

Enables you specify a file where Kibana stores log output.

#logging.dest: stdout

Set the value of this setting to true to suppress all logging output.

#logging.silent: false

Set the value of this setting to true to suppress all logging output other than error messages.

#logging.quiet: false

Set the value of this setting to true to log all events, including system usage information

and all requests.

The default locale. This locale can be used in certain circumstances to substitute any missing

translations.

#i18n.defaultLocale: "en"

Hello,

It looks like you have an error in one of the settings in Kibana.yml?

Can you please check it?

Thanks,
Bhavya

1 Like

En que parte esta el error?

@tiagocosta this looks like an ops bug. Can you please grab it?

Thanks,
Bhavya

le quite las modificaciones al archivo Kibana.yml lo deje tal como lo descarge y ejecute y me sale esto :frowning:
root@localhost bin]# sudo ./kibana
log [19:30:40.409] [info][status][plugin:kibana@6.4.0] Status changed from uninitialized to green - Ready
log [19:30:40.486] [info][status][plugin:elasticsearch@6.4.0] Status changed from uninitialized to yellow - Waiting for Elasticsearch
log [19:30:40.488] [info][status][plugin:xpack_main@6.4.0] Status changed from uninitialized to yellow - Waiting for Elasticsearch
log [19:30:40.492] [info][status][plugin:searchprofiler@6.4.0] Status changed from uninitialized to yellow - Waiting for Elasticsearch
log [19:30:40.494] [info][status][plugin:ml@6.4.0] Status changed from uninitialized to yellow - Waiting for Elasticsearch
log [19:30:40.537] [info][status][plugin:tilemap@6.4.0] Status changed from uninitialized to yellow - Waiting for Elasticsearch
log [19:30:40.539] [info][status][plugin:watcher@6.4.0] Status changed from uninitialized to yellow - Waiting for Elasticsearch
log [19:30:40.555] [info][status][plugin:license_management@6.4.0] Status changed from uninitialized to green - Ready
log [19:30:40.557] [info][status][plugin:index_management@6.4.0] Status changed from uninitialized to yellow - Waiting for Elasticsearch
log [19:30:41.284] [info][status][plugin:timelion@6.4.0] Status changed from uninitialized to green - Ready
log [19:30:41.287] [info][status][plugin:graph@6.4.0] Status changed from uninitialized to yellow - Waiting for Elasticsearch
log [19:30:41.298] [info][status][plugin:monitoring@6.4.0] Status changed from uninitialized to green - Ready
log [19:30:41.301] [warning][security] Generating a random key for xpack.security.encryptionKey. To prevent sessions from being invalidated on restart, please set xpack.security.encryptionKey in kibana.yml
log [19:30:41.305] [warning][security] Session cookies will be transmitted over insecure connections. This is not recommended.
log [19:30:41.312] [info][status][plugin:security@6.4.0] Status changed from uninitialized to yellow - Waiting for Elasticsearch
log [19:30:41.337] [info][status][plugin:grokdebugger@6.4.0] Status changed from uninitialized to yellow - Waiting for Elasticsearch
log [19:30:41.343] [info][status][plugin:dashboard_mode@6.4.0] Status changed from uninitialized to green - Ready
log [19:30:41.346] [info][status][plugin:logstash@6.4.0] Status changed from uninitialized to yellow - Waiting for Elasticsearch
log [19:30:41.363] [info][status][plugin:apm@6.4.0] Status changed from uninitialized to green - Ready
log [19:30:41.367] [info][status][plugin:console@6.4.0] Status changed from uninitialized to green - Ready
log [19:30:41.369] [info][status][plugin:console_extensions@6.4.0] Status changed from uninitialized to green - Ready
log [19:30:41.372] [info][status][plugin:notifications@6.4.0] Status changed from uninitialized to green - Ready
log [19:30:41.375] [info][status][plugin:metrics@6.4.0] Status changed from uninitialized to green - Ready
log [19:30:44.029] [warning][reporting] Generating a random key for xpack.reporting.encryptionKey. To prevent pending reports from failing on restart, please set xpack.reporting.encryptionKey in kibana.yml
log [19:30:44.031] [info][status][plugin:reporting@6.4.0] Status changed from uninitialized to yellow - Waiting for Elasticsearch
error [19:30:44.164] [error][root] Error: listen EADDRINUSE 127.0.0.1:5601
at Object._errnoException (util.js:992:11)
at _exceptionWithHostPort (util.js:1014:20)
at Server.setupListenHandle [as _listen2] (net.js:1355:14)
at listenInCluster (net.js:1396:12)
at GetAddrInfoReqWrap.doListen (net.js:1505:7)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:97:10)
log [19:30:44.165] [info][server][http] stopping http server
log [19:30:44.166] [info][server][http][redirect] stopping HTTPS redirect server
error [19:30:44.167] [warning][process] UnhandledPromiseRejectionWarning: Error: listen EADDRINUSE 127.0.0.1:5601
at Object._errnoException (util.js:992:11)
at _exceptionWithHostPort (util.js:1014:20)
at Server.setupListenHandle [as _listen2] (net.js:1355:14)
at listenInCluster (net.js:1396:12)
at GetAddrInfoReqWrap.doListen (net.js:1505:7)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:97:10)
at emitWarning (internal/process/promises.js:65:17)
at emitPendingUnhandledRejections (internal/process/promises.js:109:11)
at process._tickCallback (internal/process/next_tick.js:189:7)
error [19:30:44.167] [warning][process] Error: listen EADDRINUSE 127.0.0.1:5601
at Object._errnoException (util.js:992:11)
at _exceptionWithHostPort (util.js:1014:20)
at Server.setupListenHandle [as _listen2] (net.js:1355:14)
at listenInCluster (net.js:1396:12)
at GetAddrInfoReqWrap.doListen (net.js:1505:7)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:97:10)
log [19:30:44.170] [fatal] Port 5601 is already in use. Another instance of Kibana may be running!
FATAL Port 5601 is already in use. Another instance of Kibana may be running!

@eribeltran19 it looks like you have 2 different kind of errors here.
The first one you posted looks like it's related with your configuration into the kibana.yml file. Can you please share with us your kibana.yml file in use please?

For the second one it looks like you already have some application using the port 5601. In order to kill the process using that port, and assuming you are using an unix shell, something like this would work: kill -9 $(lsof -t -i :5601)

1 Like

Hola Tiago el archivo inicial lo tenia asi: "Lo modifique le quite en algunos el numeral"

Kibana is served by a back end server. This setting specifies the port to use.

server.port: 5601

Specifies the address to which the Kibana server will bind. IP addresses and host names are both valid values.

The default is 'localhost', which usually means remote machines will not be able to connect.

To allow connections from remote users, set this parameter to a non-loopback address.

server.host:"localhost"

Enables you to specify a path to mount Kibana at if you are running behind a proxy.

Use the server.rewriteBasePath setting to tell Kibana if it should remove the basePath

from requests it receives, and to prevent a deprecation warning at startup.

This setting cannot end in a slash.

server.basePath: ""

Specifies whether Kibana should rewrite requests that are prefixed with

server.basePath or require that they are rewritten by your reverse proxy.

This setting was effectively always false before Kibana 6.3 and will

default to true starting in Kibana 7.0.

server.rewriteBasePath: false

The maximum payload size in bytes for incoming server requests.

server.maxPayloadBytes: 1048576

The Kibana server's name. This is used for display purposes.

server.name: "kibana"

The URL of the Elasticsearch instance to use for all your queries.

elasticsearch.url: "http://localhost:9200"

When this setting's value is true Kibana uses the hostname specified in the server.host

setting. When the value of this setting is false, Kibana uses the hostname of the host

that connects to this Kibana instance.

elasticsearch.preserveHost: true

Kibana uses an index in Elasticsearch to store saved searches, visualizations and

dashboards. Kibana creates a new index if the index doesn't already exist.

kibana.index: ".kibana"

The default application to load.

kibana.defaultAppId: "home"

If your Elasticsearch is protected with basic authentication, these settings provide

the username and password that the Kibana server uses to perform maintenance on the Kibana

index at startup. Your Kibana users still need to authenticate with Elasticsearch, which

is proxied through the Kibana server.

elasticsearch.username: "user"
elasticsearch.password: "pass"

Enables SSL and paths to the PEM-format SSL certificate and SSL key files, respectively.

These settings enable SSL for outgoing requests from the Kibana server to the browser.

server.ssl.enabled: false
server.ssl.certificate: /path/to/your/server.crt
server.ssl.key: /path/to/your/server.key

Optional settings that provide the paths to the PEM-format SSL certificate and key files.

These files validate that your Elasticsearch backend uses the same key files.

elasticsearch.ssl.certificate: /path/to/your/client.crt
elasticsearch.ssl.key: /path/to/your/client.key

Optional setting that enables you to specify a path to the PEM file for the certificate

authority for your Elasticsearch instance.

elasticsearch.ssl.certificateAuthorities: [ "/path/to/your/CA.pem" ]

To disregard the validity of SSL certificates, change this setting's value to 'none'.

elasticsearch.ssl.verificationMode: full

Time in milliseconds to wait for Elasticsearch to respond to pings. Defaults to the value of

the elasticsearch.requestTimeout setting.

Time in milliseconds to wait for responses from the back end or Elasticsearch. This value

must be a positive integer.

elasticsearch.requestTimeout: 30000

List of Kibana client-side headers to send to Elasticsearch. To send no client-side

headers, set this value to (an empty list).

elasticsearch.requestHeadersWhitelist: [ authorization ]

Header names and values that are sent to Elasticsearch. Any custom headers cannot be overwritten

by client-side headers, regardless of the elasticsearch.requestHeadersWhitelist configuration.

elasticsearch.customHeaders: {}

Time in milliseconds for Elasticsearch to wait for responses from shards. Set to 0 to disable.

elasticsearch.shardTimeout: 30000

Time in milliseconds to wait for Elasticsearch at Kibana startup before retrying.

elasticsearch.startupTimeout: 5000

Logs queries sent to Elasticsearch. Requires logging.verbose set to true.

elasticsearch.logQueries: false

Specifies the path where Kibana creates the process ID file.

#pid.file: /var/run/kibana.pid

Enables you specify a file where Kibana stores log output.

#logging.dest: stdout

Set the value of this setting to true to suppress all logging output.

#logging.silent: false

Set the value of this setting to true to suppress all logging output other than error messages.

#logging.quiet: false

Set the value of this setting to true to suppress all logging output.

#logging.silent: false

Set the value of this setting to true to suppress all logging output other than error messages.

#logging.quiet: false

Set the value of this setting to true to log all events, including system usage information

and all requests.

#logging.verbose: false

Set the interval in milliseconds to sample system and process performance

metrics. Minimum is 100ms. Defaults to 5000.

#ops.interval: 5000

The default locale. This locale can be used in certain circumstances to substitute any missing

translations.

#i18n.defaultLocale: "en"

@eribeltran19 Can you just post your raw kibana.yml content here inside double backticks `` so I can read the entire code file formatted ?

Additionally, post the last CLI error you're having after killing the process already running into the port 5601

`# Kibana is served by a back end server. This setting specifies the port to use.
server.port: 5601

Specifies the address to which the Kibana server will bind. IP addresses and host names are both valid values.

The default is 'localhost', which usually means remote machines will not be able to connect.

To allow connections from remote users, set this parameter to a non-loopback address.

server.host:"localhost"

Enables you to specify a path to mount Kibana at if you are running behind a proxy.

Use the server.rewriteBasePath setting to tell Kibana if it should remove the basePath

from requests it receives, and to prevent a deprecation warning at startup.

This setting cannot end in a slash.

#server.basePath: ""

Specifies whether Kibana should rewrite requests that are prefixed with

server.basePath or require that they are rewritten by your reverse proxy.

This setting was effectively always false before Kibana 6.3 and will

default to true starting in Kibana 7.0.

#server.rewriteBasePath: false

The maximum payload size in bytes for incoming server requests.

#server.maxPayloadBytes: 1048576

The Kibana server's name. This is used for display purposes.

#server.name: "kibana"

The URL of the Elasticsearch instance to use for all your queries.

elasticsearch.url: "http://localhost:9200"

When this setting's value is true Kibana uses the hostname specified in the server.host

setting. When the value of this setting is false, Kibana uses the hostname of the host

that connects to this Kibana instance.

#elasticsearch.preserveHost: true

Kibana uses an index in Elasticsearch to store saved searches, visualizations and

dashboards. Kibana creates a new index if the index doesn't already exist.

#kibana.index: ".kibana"

The default application to load.

#kibana.defaultAppId: "home"

If your Elasticsearch is protected with basic authentication, these settings provide

the username and password that the Kibana server uses to perform maintenance on the Kibana

index at startup. Your Kibana users still need to authenticate with Elasticsearch, which

is proxied through the Kibana server.

#elasticsearch.username: "user"
#elasticsearch.password: "pass"

Enables SSL and paths to the PEM-format SSL certificate and SSL key files, respectively.

These settings enable SSL for outgoing requests from the Kibana server to the browser.

#server.ssl.enabled: false
#server.ssl.certificate: /path/to/your/server.crt
#server.ssl.key: /path/to/your/server.key

Optional settings that provide the paths to the PEM-format SSL certificate and key files.

These files validate that your Elasticsearch backend uses the same key files.

#elasticsearch.ssl.certificate: /path/to/your/client.crt
#elasticsearch.ssl.key: /path/to/your/client.key

Optional setting that enables you to specify a path to the PEM file for the certificate

authority for your Elasticsearch instance.

#elasticsearch.ssl.certificateAuthorities: [ "/path/to/your/CA.pem" ]

To disregard the validity of SSL certificates, change this setting's value to 'none'.

#elasticsearch.ssl.verificationMode: full

Time in milliseconds to wait for Elasticsearch to respond to pings. Defaults to the value of

the elasticsearch.requestTimeout setting.

#elasticsearch.pingTimeout: 1500

Time in milliseconds to wait for responses from the back end or Elasticsearch. This value

must be a positive integer.

#elasticsearch.requestTimeout: 30000

List of Kibana client-side headers to send to Elasticsearch. To send no client-side

headers, set this value to (an empty list).

#elasticsearch.requestHeadersWhitelist: [ authorization ]

Header names and values that are sent to Elasticsearch. Any custom headers cannot be overwritten

by client-side headers, regardless of the elasticsearch.requestHeadersWhitelist configuration.

#elasticsearch.customHeaders: {}

Time in milliseconds for Elasticsearch to wait for responses from shards. Set to 0 to disable.

#elasticsearch.shardTimeout: 30000

Time in milliseconds to wait for Elasticsearch at Kibana startup before retrying.

#elasticsearch.startupTimeout: 5000

Logs queries sent to Elasticsearch. Requires logging.verbose set to true.

#elasticsearch.logQueries: false

Specifies the path where Kibana creates the process ID file.

#pid.file: /var/run/kibana.pid

Enables you specify a file where Kibana stores log output.

#logging.dest: stdout

Set the value of this setting to true to suppress all logging output.

#logging.silent: false

Set the value of this setting to true to suppress all logging output other than error messages.

#logging.quiet: false

Set the value of this setting to true to log all events, including system usage information

and all requests.

#logging.verbose: false

Set the interval in milliseconds to sample system and process performance

metrics. Minimum is 100ms. Defaults to 5000.

#ops.interval: 5000

The default locale. This locale can be used in certain circumstances to substitute any missing

translations.

#i18n.defaultLocale: "en"`

No puedo subirlo asi es lo unico por lo que al comienzo tienen caracteres #

@eribeltran19 reading the config file that way is not easy. Can you share it with me, at least, in https://gist.github.com/ ?

Also, please share the current error stack trace you're having, after killing the old process u had running on :5601

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