You must address the points described in the following [1] lines before starting Elasticsearch.
最近在使用新版本ES7.15.0时遇到启动报错,错误日志显示需要指定ES节点地址。在elasticsearch.yml中未配置地址的情况下,启动ES时会报错。解决方案包括:1)通过启动命令-E "discovery.type=single-node"指定单节点模式;2)在elasticsearch.yml中配置discovery.seedhosts、cluster.initialmaster_nodes等参数。通过这两种方法均可成功启动ES。此外,分享了ES7.0.1和ES7.15版本的启动成功截图,展示了问题解决后的效果。
最近在尝试使用新版本ES7.15.0的时候,启动报错,此处记录一下报错日志:
    ERROR: [1] bootstrap checks failed. You must address the points described in the following [1] lines before starting Elasticsearch.
        此处同时记录下帮助他人安装ES7.1的时候的错误日志如下:
    ERROR: [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
        通过查看错误日志,我们可以推断出需要指定ES节点的地址。在配置elasticsearch.yml时,我确实没有指定ES节点的地址。单节点的ES通常会默认使用本地IP地址和端口。那么,如果我们选择将ES作为单节点运行,应该可以通过启用默认配置来实现。在启动时添加启动配置项,尝试一下。同时,可以参考命令文档了解如何通过命令添加启动配置项。
输入./elasticsearch --help查看启动命令帮助如下:
    Option                Description                                               
    ------                -----------                                               
    -E <KeyValuePair>     Configure a setting                                       
    -V, --version         Prints Elasticsearch version information and exits        
    -d, --daemonize       Starts Elasticsearch in the background                    
    -h, --help            Show help                                                 
    -p, --pidfile <Path>  Creates a pid file in the specified path on start         
    -q, --quiet           Turns off standard output/error streams logging in console
    -s, --silent          Show minimal output                                       
    -v, --verbose         Show verbose output
        方案1:
方案2:
在elasticsearch的config目录中,配置elasticsearch.yml文件,以设置单节点或多个节点的配置方案。访问discovery.seed_hosts、discovery.seed_providers或cluster.initial_master_nodes中的至少一个配置项即可。默认设置通常有效,但用户可以根据需求进行调整。
在多节点配置时,可以为每个节点加入对应的IP地址。
    cluster.initial_master_nodes: ["node-1", "node-2"] #“node-1”,""node-2""为两个节点的名字
    #discovery.seed_hosts: ["host1", "host2"]
    #discovery.seed_hosts: ["host1", "host2"]
        此处记录ES7.0.1的部分启动日志:

ES7.0.1版本的成功截图:、

ES7.15版本的成功截图:

如果这个对你们有帮助的话,记得点个赞关注一波再走哦_
