first commit
This commit is contained in:
commit
ba848e218d
1001 changed files with 152333 additions and 0 deletions
20
ELK/es学习记录02-异常处理.md
Normal file
20
ELK/es学习记录02-异常处理.md
Normal file
|
@ -0,0 +1,20 @@
|
|||
### 启动失败,报
|
||||
```
|
||||
[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}'
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue