1.報錯關鍵代碼如下:
Exception in thread "main" 2019-04-28 03:53:04,339 main ERROR No log4j2 configuration file found. SettingsException[Failed to load settings from [elasticsearch.yml]]; nested: ParsingException[Failed to parse object: expecting token of type [START_OBJECT] but found [VALUE_STRING]]; Caused by: ParsingException[Failed to parse object: expecting token of type [START_OBJECT] but found [VALUE_STRING]]
報錯原因:是你的elasticsearch.yml文件中的key/value值寫錯了,重新檢查或者將其他可以正常啟動的機器中的文件發送到報錯機器,並修改節點名、ip等即可
2.報錯關鍵代碼如下:
failed to send join request to master nested: IllegalArgumentException[can't add node found existing node
報錯原因:這是啟動從節點時報錯,可以看出提示報錯找到存在節點,原因是本人先安裝了ES的單節點模式,然后將主節點的ES目錄發送到了從節點,導致ES目錄下的data目錄中存儲的數據是主節點的,所以刪除dasa目錄下的nodes文件集,重啟從節點即可。