Hello,
I've not been able to find a similar problem or a working answer so I'm opening a new topic.
I've installed Kibana through the apt repository to see what happens in my elastic search database. I've been using ES for a while now and it's working fine on a magento 2 website.
When I try to start Kibana by sudo /etc/init.d/kibana
start I have the following error in my kibana stderr log file :
FATAL [class_cast_exception] class java.lang.String cannot be cast to class java.util.Map (java.lang.String and java.util.Map are in module java.base of loader 'bootstrap') :: {"path":"/.kibana_task_manager_1","query":{},"body":"{\"mappings\":{\"dynamic\":\"strict\",\"properties\":{\"config\":{\"dynamic\":\"true\",\"properties\":{\"buildNum\":{\"type\":\"keyword\"}}},\"migrationVersion\":{\"dynamic\":\"true\",\"type\":\"object\"},\"type\":{\"type\":\"keyword\"},\"namespace\":{\"type\":\"keyword\"},\"updated_at\":{\"type\":\"date\"},\"references\":{\"type\":\"nested\",\"properties\":{\"name\":{\"type\":\"keyword\"},\"type\":{\"type\":\"keyword\"},\"id\":{\"type\":\"keyword\"}}},\"task\":{\"properties\":{\"taskType\":{\"type\":\"keyword\"},\"scheduledAt\":{\"type\":\"date\"},\"runAt\":{\"type\":\"date\"},\"startedAt\":{\"type\":\"date\"},\"retryAt\":{\"type\":\"date\"},\"interval\":{\"type\":\"text\"},\"attempts\":{\"type\":\"integer\"},\"status\":{\"type\":\"keyword\"},\"params\":{\"type\":\"text\"},\"state\":{\"type\":\"text\"},\"user\":{\"type\":\"keyword\"},\"scope\":{\"type\":\"keyword\"},\"ownerId\":{\"type\":\"keyword\"}}}},\"_meta\":{\"migrationMappingPropertyHashes\":{\"config\":\"87aca8fdb053154f11383fce3dbf3edf\",\"migrationVersion\":\"4a1746014a75ade3a714e1db5763276f\",\"type\":\"2f4316de49999235636386fe51dc06c1\",\"namespace\":\"2f4316de49999235636386fe51dc06c1\",\"updated_at\":\"00da57df13e94e9d98437d13ace4bfe0\",\"references\":\"7997cf5a56cc02bdc9c93361bde732b0\",\"task\":\"a7206eba37aaea59ba083a079fd80b65\"}}},\"settings\":{\"number_of_shards\":1,\"auto_expand_replicas\":\"0-1\"}}","statusCode":500,"response":"{\"error\":{\"root_cause\":[{\"type\":\"class_cast_exception\",\"reason\":\"class java.lang.String cannot be cast to class java.util.Map (java.lang.String and java.util.Map are in module java.base of loader 'bootstrap')\"}],\"type\":\"class_cast_exception\",\"reason\":\"class java.lang.String cannot be cast to class java.util.Map (java.lang.String and java.util.Map are in module java.base of loader 'bootstrap')\"},\"status\":500}"}
Elastic search is up as you can see :
/usr/share/kibana$ ps aux | grep -i elas sebasti+ 8545 2.6 9.9 9193528 1618584 pts/3 Sl 10:51 2:11 /bin/java -Xms1g -Xmx1g -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -Des.networkaddress.cache.ttl=60 -Des.networkaddress.cache.negative.ttl=10 -XX:+AlwaysPreTouch -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -XX:-OmitStackTraceInFastThrow -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Djava.io.tmpdir=/tmp/elasticsearch-2859441201120843636 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=data -XX:ErrorFile=logs/hs_err_pid%p.log -Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m -Djava.locale.providers=COMPAT -XX:UseAVX=2 -Des.path.home=/opt/elasticsearch/elasticsearch-6.8.3 -Des.path.conf=/opt/elasticsearch/elasticsearch-6.8.3/config -Des.distribution.flavor=default -Des.distribution.type=tar -cp /opt/elasticsearch/elasticsearch-6.8.3/lib/* org.elasticsearch.bootstrap.Elasticsearch -d
By enabling the verbose log, I also have the following more detailed exception :
{"type":"log","@timestamp":"2019-12-13T11:05:21Z","tags":["debug","elasticsearch","admin","query"],"pid":17351,"message":"500\nPUT /.kibana_task_manager_1\n{\"mappings\":{\"dynamic\":\"strict\",\"properties\":{\"config\":{\"dynamic\":\"true\",\"properties\":{\"buildNum\":{\"type\":\"keyword\"}}},\"migrationVersion\":{\"dynamic\":\"true\",\"type\":\"object\"},\"type\":{\"type\":\"keyword\"},\"namespace\":{\"type\":\"keyword\"},\"updated_at\":{\"type\":\"date\"},\"references\":{\"type\":\"nested\",\"properties\":{\"name\":{\"type\":\"keyword\"},\"type\":{\"type\":\"keyword\"},\"id\":{\"type\":\"keyword\"}}},\"task\":{\"properties\":{\"taskType\":{\"type\":\"keyword\"},\"scheduledAt\":{\"type\":\"date\"},\"runAt\":{\"type\":\"date\"},\"startedAt\":{\"type\":\"date\"},\"retryAt\":{\"type\":\"date\"},\"interval\":{\"type\":\"text\"},\"attempts\":{\"type\":\"integer\"},\"status\":{\"type\":\"keyword\"},\"params\":{\"type\":\"text\"},\"state\":{\"type\":\"text\"},\"user\":{\"type\":\"keyword\"},\"scope\":{\"type\":\"keyword\"},\"ownerId\":{\"type\":\"keyword\"}}}},\"_meta\":{\"migrationMappingPropertyHashes\":{\"config\":\"87aca8fdb053154f11383fce3dbf3edf\",\"migrationVersion\":\"4a1746014a75ade3a714e1db5763276f\",\"type\":\"2f4316de49999235636386fe51dc06c1\",\"namespace\":\"2f4316de49999235636386fe51dc06c1\",\"updated_at\":\"00da57df13e94e9d98437d13ace4bfe0\",\"references\":\"7997cf5a56cc02bdc9c93361bde732b0\",\"task\":\"a7206eba37aaea59ba083a079fd80b65\"}}},\"settings\":{\"number_of_shards\":1,\"auto_expand_replicas\":\"0-1\"}}"}
Configuration file is the default one in /etc/kibana/config.yml
, except for the two debug rows :
elasticsearch.logQueries: true
logging.verbose: true
A curl request on ES returns the json :
/usr/share/kibana$ curl "127.0.0.1:9200/_nodes/settings?pretty=true" { "_nodes" : { "total" : 1, "successful" : 1, "failed" : 0 }, "cluster_name" : "elastic_cluster1", "nodes" : { "hmNYtPd2S7SGBIJp7YJBEw" : { "name" : "node-2", "transport_address" : "127.0.0.1:9300", "host" : "localhost", "ip" : "127.0.0.1", "version" : "6.8.3", "build_flavor" : "default", "build_type" : "tar", "build_hash" : "0c48c0e", "roles" : [ "master", "data", "ingest" ], "attributes" : { "ml.machine_memory" : "16578093056", "xpack.installed" : "true", "ml.max_open_jobs" : "20", "ml.enabled" : "true" }, "settings" : { "cluster" : { "name" : "elastic_cluster1" }, "node" : { "attr" : { "xpack" : { "installed" : "true" }, "ml" : { "machine_memory" : "16578093056", "max_open_jobs" : "20", "enabled" : "true" } }, "data" : "true", "name" : "node-2" }, "path" : { "logs" : "/opt/elasticsearch/elasticsearch-6.8.3/logs", "home" : "/opt/elasticsearch/elasticsearch-6.8.3" }, "client" : { "type" : "node" }, "http" : { "type" : "security4", "port" : "9200", "type.default" : "netty4" }, "transport" : { "host" : "localhost", "tcp" : { "port" : "9300" }, "features" : { "x-pack" : "true" }, "type" : "security4", "type.default" : "netty4" }, "network" : { "host" : "0.0.0.0" } } } } }
I've no password set up on my ES instance
As you can see in the curl request I'm using http and not https
I'm using debian buster up to date
java version :
/usr/share/kibana$ java --version openjdk 11.0.5 2019-10-15 OpenJDK Runtime Environment (build 11.0.5+10-post-Debian-1deb10u1) OpenJDK 64-Bit Server VM (build 11.0.5+10-post-Debian-1deb10u1, mixed mode, sharing)
Maybe I've missed something but I'm not even able to start kibana and I have no clue of what is going on.
Have you any idea of something I could be doing wrong ??
Thanks for your help!