ELK笔记

1. elasticsearch异常报错:{"error":"Content-Type header [application/x-www-form-urlencoded] is not supported

   解决:

   curl -H "Content-Type: application/json" -XPOST http://localhost:9200/tracy/fulltext/_mapping -d'
   {
        "properties": {
            "content": {
                "type": "text",
                "analyzer": "ik_max_word",
                "search_analyzer": "ik_max_word"
            }
        }

    }'

   原因:es6.0之后官方部分调整,需要指定传输数据格式。参见:https://blog.csdn.net/u012551524/article/details/79289072?utm_source=blogxgwz0

2. npm 是JavaScript 世界的包管理工具,并且是Node.js 平台的默认包管理工具。通过npm 可以安装、共享、分发代码,管理项目依赖关系。

   参见:http://www.voidcn.com/article/p-akvavdbd-bch.html

3. Elasticsearch 5.1.1 head插件安装指南:参见:http://www.voidcn.com/article/p-akvavdbd-bch.html

4. Elasticsearch 后台启动 ./elasticsearch -d 

   参见:https://blog.csdn.net/dufufd/article/details/79414692

5. failed to obtainnode locks, tried [[/home/user1/elasticsearch-5.6.1/data/elasticsearch]] withlock id [0]; maybe these locations are not writable or multiple nodes werestarted without increasing [node.max_local_storage_nodes:

   出现这种情况是应为配置文件设置为单节点,而elasticsearch在一台服务器上多启动。需要把多余的elasticsearch 进程杀死即可

   ps -ef | grepelastic  

   kill -9 -进程号(7472)
   参见:https://blog.csdn.net/qq_38977441/article/details/80406126

6. head 正常的话可以看到已经连接了ES,但是ES社区中很多人反映都配置好了,但是看不到连接信息,这时候需要在在 es 的 elasticsearch.ym 里添加如下配置:

  http.cors.enabled: true

  http.cors.allow-origin: "*" 

  参见:https://www.jianshu.com/p/dc1eee5a82ef

            https://www.cnblogs.com/aubin/p/8018081.html

7. grunt sever 启动JS项目

   参见:https://www.gruntjs.net/        参见:https://www.cnblogs.com/front-end-1149980941/p/6275770.html

8.  

  

猜你喜欢

转载自www.cnblogs.com/Jtianlin/p/9858948.html
elk