When I try start kibana after install x-pack
I get a following error,
{"type":"error","@timestamp":"2018-05-10T19:28:18Z","tags":["fatal"],"pid":29046,"level":"fatal","error":{"message":"Cannot read property 'type' of undefined","name":"TypeError","stack":"TypeError: Cannot read property 'type' of undefined\n at screenshotsObservableFactory (/usr/share/kibana/plugins/x-pack/plugins/reporting/export_types/printable_pdf/server/lib/screenshots.js:19:53)\n at generatePdfObservableFn (/usr/share/kibana/plugins/x-pack/plugins/reporting/export_types/printable_pdf/server/lib/generate_pdf.js:12:33)\n at /usr/share/kibana/plugins/x-pack/plugins/reporting/server/lib/once_per_server.js:24:15\n at memoized (/usr/share/kibana/plugins/x-pack/node_modules/lodash/index.js:7912:27)\n at Object.executeJobFn (/usr/share/kibana/plugins/x-pack/plugins/reporting/export_types/printable_pdf/server/execute_job.js:17:33)\n at Object.<anonymous> (/usr/share/kibana/plugins/x-pack/plugins/reporting/server/lib/once_per_server.js:24:15)\n at Object.memoized [as executeJobFactory] (/usr/share/kibana/plugins/x-pack/node_modules/lodash/index.js:7912:27)\n at createWorkers (/usr/share/kibana/plugins/x-pack/plugins/reporting/server/lib/create_workers.js:16:37)\n at createQueueFn (/usr/share/kibana/plugins/x-pack/plugins/reporting/server/lib/create_queue.js:26:3)\n at /usr/share/kibana/plugins/x-pack/plugins/reporting/server/lib/once_per_server.js:24:15\n at memoized (/usr/share/kibana/plugins/x-pack/node_modules/lodash/index.js:7912:27)\n at Plugin.<anonymous> (/usr/share/kibana/plugins/x-pack/plugins/reporting/index.js:152:30)\n at next (native)\n at step (/usr/share/kibana/plugins/x-pack/plugins/reporting/index.js:37:191)\n at /usr/share/kibana/plugins/x-pack/plugins/reporting/index.js:37:361"},"message":"Cannot read property 't`ype' of undefined"}
Which version of Kibana are you using and what's your install process look like? Can you share your operating system too? Are you using reporting? Any reporting related configuration in kibana.yml?
It looks like reporting is trying to generate a PDF and it's having possibly having issues creating a container for the screenshot.
Thank you for your reply.
My Kibana on VirtualBox Machine
Kibana version is 6.2.4,
Operating System : CentOS Linux release 7.5.1804
Linux localhost.localdomain 3.10.0-693.el7.x86_64 #1 SMP Tue Aug 22 21:09:27 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Where are the PDF reporting preferences in kibana.yml?
My Kibana.yml file
# 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: "172.16.0.27"
# Enables you to specify a path to mount Kibana at if you are running behind a proxy. This only affects
# the URLs generated by Kibana, your proxy is expected to remove the basePath value before forwarding requests
# to Kibana. This setting cannot end in a slash.
#server.basePath: ""
# 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: "your-hostname"
# The URL of the Elasticsearch instance to use for all your queries.
elasticsearch.url: "http://172.16.0.27: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: "elastic"
elasticsearch.password: "password"
# 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: 0
Thanks for the info, I believe I was able to track this down. Reporting installs phantomjs, and if there's any issues during installation it looks like this could happen.
Can you try reinstalling x-pack-kibana? There should be a phantomjs installation at /var/lib/kibana. Alternatively if you don't need reporting you can remove it with xpack.reporting.enabled: false kibana.yml
Just want to chime in with my own report on this problem. I'm using the official Docker image (docker.elastic.co/kibana/kibana:6.2.4) and get this error on launch using the default configs.
Setting XPACK_REPORTING_ENABLED=false did the trick.
Hey, I gave this a try and was able to get the server started. By default configs do you mean no changes to kibana.yml/have you made any kibana.yml changes?
My minimal test case was docker run --rm docker.elastic.co/kibana/kibana:6.2.4
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.