/opt/module/kibana/node_modules/js-yaml/lib/js-yaml/loader.js:173
1、报错信息如下
/opt/module/kibana/node_modules/js-yaml/lib/js-yaml/loader.js:173
throw generateError(state, message);
^
YAMLException: can not read an implicit mapping pair; a colon is missed at line 178, column 66:
... ig/certs/elasticsearch-ca.pem" ]
^
at generateError (/opt/module/kibana/node_modules/js-yaml/lib/js-yaml/loader.js:167:10)
at throwError (/opt/module/kibana/node_modules/js-yaml/lib/js-yaml/loader.js:173:9)
at readBlockMapping (/opt/module/kibana/node_modules/js-yaml/lib/js-yaml/loader.js:1064:11)
at composeNode (/opt/module/kibana/node_modules/js-yaml/lib/js-yaml/loader.js:1359:12)
at readDocument (/opt/module/kibana/node_modules/js-yaml/lib/js-yaml/loader.js:1525:3)
at loadDocuments (/opt/module/kibana/node_modules/js-yaml/lib/js-yaml/loader.js:1588:5)
at load (/opt/module/kibana/node_modules/js-yaml/lib/js-yaml/loader.js:1614:19)
at safeLoad (/opt/module/kibana/node_modules/js-yaml/lib/js-yaml/loader.js:1637:10)
at readYaml (/opt/module/kibana/node_modules/@kbn/apm-config-loader/target_node/utils/read_config.js:25:47)
at getConfigFromFiles (/opt/module/kibana/node_modules/@kbn/apm-config-loader/target_node/utils/read_config.js:57:18) {
reason: 'can not read an implicit mapping pair; a colon is missed',
mark: Mark {
name: null,
buffer: '# For more configuration options see the configuration guide for Kibana in\n' +
'# https://www.elastic.co/guide/index.html\n' +
'\n' +
'# =================== System: Kibana Server ===================\n' +
'# Kibana is served by a back end server. This setting specifies the port to use.\n' +
'#server.port: 5601\n' +
'\n' +
'# Specifies the address to which the Kibana server will bind. IP addresses and host names are both valid values.\n' +
"# The default is 'localhost', which usually means remote machines will not be able to connect.\n" +
'# To allow connections from remote users, set this parameter to a non-loopback address.\n' +
'#server.host: "localhost"\n' +
'\n' +
'# Enables you to specify a path to mount Kibana at if you are running behind a proxy.\n' +
'# Use the `server.rewriteBasePath` setting to tell Kibana if it should remove the basePath\n' +
'# from requests it receives, and to prevent a deprecation warning at startup.\n' +
'# This setting cannot end in a slash.\n' +
'#server.basePath: ""\n' +
'\n' +
'# Specifies whether Kibana should rewrite requests that are prefixed with\n' +
'# `server.basePath` or require that they are rewritten by your reverse proxy.\n' +
'# Defaults to `false`.\n' +
'#server.rewriteBasePath: false\n' +
'\n' +
'# Specifies the public URL at which Kibana is available for end users. If\n' +
'# `server.basePath` is configured this URL should end with the same basePath.\n' +
'#server.publicBaseUrl: ""\n' +
'\n' +
'# The maximum payload size in bytes for incoming server requests.\n' +
'#server.maxPayload: 1048576\n' +
'\n' +
"# The Kibana server's name. This is used for display purposes.\n" +
'#server.name: "your-hostname"\n' +
'\n' +
'# =================== System: Kibana Server (Optional) ===================\n' +
'# Enables SSL and paths to the PEM-format SSL certificate and SSL key files, respectively.\n' +
'# These settings enable SSL for outgoing requests from the Kibana server to the browser.\n' +
'#server.ssl.enabled: false\n' +
'#server.ssl.certificate: /path/to/your/server.crt\n' +
'#server.ssl.key: /path/to/your/server.key\n' +
'\n' +
'# =================== System: Elasticsearch ===================\n' +
'# The URLs of the Elasticsearch instances to use for all your queries.\n' +
'#elasticsearch.hosts: ["http://localhost:9200"]\n' +
'\n' +
'# If your Elasticsearch is protected with basic authentication, these settings provide\n' +
'# the username and password that the Kibana server uses to perform maintenance on the Kibana\n' +
'# index at startup. Your Kibana users still need to authenticate with Elasticsearch, which\n' +
'# is proxied through the Kibana server.\n' +
'#elasticsearch.username: "kibana_system"\n' +
'#elasticsearch.password: "pass"\n' +
'\n' +
'# Kibana can also authenticate to Elasticsearch via "service account tokens".\n' +
'# Service account tokens are Bearer style tokens that replace the traditional username/password based configuration.\n' +
'# Use this token instead of a username/password.\n' +
'# elasticsearch.serviceAccountToken: "my_token"\n' +
'\n' +
'# Time in milliseconds to wait for Elasticsearch to respond to pings. Defaults to the value of\n' +
'# the elasticsearch.requestTimeout setting.\n' +
'#elasticsearch.pingTimeout: 1500\n' +
'\n' +
'# Time in milliseconds to wait for responses from the back end or Elasticsearch. This value\n' +
'# must be a positive integer.\n' +
'#elasticsearch.requestTimeout: 30000\n' +
'\n' +
'# Specifies whether Kibana should use compression for communications with elasticsearch\n' +
'# Defaults to `false`.\n' +
'#elasticsearch.compression: false\n' +
'\n' +
'# List of Kibana client-side headers to send to Elasticsearch. To send *no* client-side\n' +
'# headers, set this value to [] (an empty list).\n' +
'#elasticsearch.requestHeadersWhitelist: [ authorization ]\n' +
'\n' +
'# Header names and values that are sent to Elasticsearch. Any custom headers cannot be overwritten\n' +
'# by client-side headers, regardless of the elasticsearch.requestHeadersWhitelist configuration.\n' +
'#elasticsearch.customHeaders: {}\n' +
'\n' +
'# Time in milliseconds for Elasticsearch to wait for responses from shards. Set to 0 to disable.\n' +
'#elasticsearch.shardTimeout: 30000\n' +
'\n' +
'# =================== System: Elasticsearch (Optional) ===================\n' +
'# These files are used to verify the identity of Kibana to Elasticsearch and are required when\n' +
'# xpack.security.http.ssl.client_authentication in Elasticsearch is set to required.\n' +
'#elasticsearch.ssl.certificate: /path/to/your/client.crt\n' +
'#elasticsearch.ssl.key: /path/to/your/client.key\n' +
'\n' +
'# Enables you to specify a path to the PEM file for the certificate\n' +
'# authority for your Elasticsearch instance.\n' +
'#elasticsearch.ssl.certificateAuthorities: [ "/path/to/your/CA.pem" ]\n' +
'\n' +
"# To disregard the validity of SSL certificates, change this setting's value to 'none'.\n" +
'#elasticsearch.ssl.verificationMode: full\n' +
'\n' +
'# =================== System: Logging ===================\n' +
"# Set the value of this setting to off to suppress all logging output, or to debug to log everything. Defaults to 'info'\n" +
'#logging.root.level: debug\n' +
'\n' +
'# Enables you to specify a file where Kibana stores log output.\n' +
'#logging.appenders.default:\n' +
'# type: file\n' +
'# fileName: /var/logs/kibana.log\n' +
'# layout:\n' +
'# type: json\n' +
'\n' +
'# Logs queries sent to Elasticsearch.\n' +
'#logging.loggers:\n' +
'# - name: elasticsearch.query\n' +
'# level: debug\n' +
'\n' +
'# Logs http responses.\n' +
'#logging.loggers:\n' +
'# - name: http.server.response\n' +
'# level: debug\n' +
'\n' +
'# Logs system usage information.\n' +
'#logging.loggers:\n' +
'# - name: metrics.ops\n' +
'# level: debug\n' +
'\n' +
'# =================== System: Other ===================\n' +
'# The path where Kibana stores persistent data not saved in Elasticsearch. Defaults to data\n' +
'#path.data: data\n' +
'\n' +
'# Specifies the path where Kibana creates the process ID file.\n' +
'#pid.file: /run/kibana/kibana.pid\n' +
'\n' +
'# Set the interval in milliseconds to sample system and process performance\n' +
'# metrics. Minimum is 100ms. Defaults to 5000ms.\n' +
'#ops.interval: 5000\n' +
'\n' +
'# Specifies locale to be used for all localizable strings, dates and number formats.\n' +
'# Supported languages are the following: English - en , by default , Chinese - zh-CN .\n' +
'#i18n.locale: "en"\n' +
'\n' +
'# =================== Frequently used (Optional)===================\n' +
'\n' +
'# =================== Saved Objects: Migrations ===================\n' +
'# Saved object migrations run at startup. If you run into migration-related issues, you might need to adjust these settings.\n' +
'\n' +
'# The number of documents migrated at a time.\n' +
"# If Kibana can't start up or upgrade due to an Elasticsearch `circuit_breaking_exception`,\n" +
'# use a smaller batchSize value to reduce the memory pressure. Defaults to 1000 objects per batch.\n' +
'#migrations.batchSize: 1000\n' +
'\n' +
'# The maximum payload size for indexing batches of upgraded saved objects.\n' +
'# To avoid migrations failing due to a 413 Request Entity Too Large response from Elasticsearch.\n' +
'# This value should be lower than or equal to your Elasticsearch cluster’s `http.max_content_length`\n' +
'# configuration option. Default: 100mb\n' +
'#migrations.maxBatchSizeBytes: 100mb\n' +
'\n' +
'# The number of times to retry temporary migration failures. Increase the setting\n' +
'# if migrations fail frequently with a message such as `Unable to complete the [...] step after\n' +
'# 15 attempts, terminating`. Defaults to 15\n' +
'#migrations.retryAttempts: 15\n' +
'\n' +
'# =================== Search Autocomplete ===================\n' +
'# Time in milliseconds to wait for autocomplete suggestions from Elasticsearch.\n' +
'# This value must be a whole number greater than zero. Defaults to 1000ms\n' +
'#data.autocomplete.valueSuggestions.timeout: 1000\n' +
'\n' +
'# Maximum number of documents loaded by each shard to generate autocomplete suggestions.\n' +
'# This value must be a whole number greater than zero. Defaults to 100_000\n' +
'#data.autocomplete.valueSuggestions.terminateAfter: 100000\n' +
'#\n' +
'#\n' +
'# 服务端口\n' +
'server.port: 5601\n' +
'# 服务主机名\n' +
'server.host: "hadoop1"\n' +
'# 国际化 - 中文\n' +
'i18n.locale: "zh-CN"\n' +
'# ES 服务主机地址\n' +
'elasticsearch.hosts: ["https://hadoop1:9200"]\n' +
'# 访问 ES 服务的账号密码\n' +
'elasticsearch.username: "kibana"\n' +
'elasticsearch.password: "fnqIYLQGv81iyW5nWeZ-"\n' +
'elasticsearch.ssl.verificationMode: none\n' +
'elasticsearch.ssl.certificateAuthorities: \n' +
'[ "/opt/module/elasticsearch/config/certs/elasticsearch-ca.pem" ]\n' +
'server.ssl.enabled: true\n' +
'server.ssl.certificate: /opt/module/kibana/config/kibana.crt\n' +
'server.ssl.key: /opt/module/kibana/config/kibana.key\n' +
'\n' +
'\n' +
'\x00',
position: 7733,
line: 177,
column: 65
}
}
2、解决
检查这里的格式,我原来有各种空格