### 启动失败,报 ``` [1] bootstrap checks failed [1]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured ``` 修改配置文件elasticsearch.yml文件,至少一项配置放开即可discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes,这里修改cluster.initial_master_nodes: : ["node-1"] ### 往es中写数据,报 ``` curl -XPUT 127.0.0.1:9200/item/es/1?pretty -d '{"name": "wang", "age": 25}' { "error" : "Content-Type header [application/x-www-form-urlencoded] is not supported", "status" : 406 } ``` 写入数据时,加上-H 'content-Type:application/json' 即可,如下 ``` curl -XPUT 127.0.0.1:9200/item/es/1?pretty -H 'content-Type:application/json' -d '{"name": "wang", "age": 25}' ```