腾讯云主机elasticsearch起不来的问题解决 [[email protected]_58_118_centos elasticsearch]# vim /usr/lib/systemd/system/elasticsearch.service [Unit] Description=Elasticsearch [Service] User=elasticsearch Group=elasticsearch LimitNOFILE=100000 LimitNPROC=100000 ExecStart=/usr/share/elasticsearch/bin/elasticsearch [Install] WantedBy=multi-user.target [[email protected]_58_118_centos elasticsearch]# systemctl daemon-reload [[email protected]_58_118_centos elasticsearch]# cat /etc/passwd |grep elasticsearch elasticsearch:x:984:988:elasticsearch user:/home/elasticsearch:/sbin/nologin 修改为 elasticsearch:x:984:988:elasticsearch user:/home/elasticsearch:/bin/bash [[email protected]_58_118_centos elasticsearch]# mkdir -p /home/elasticsearch [[email protected]_58_118_centos elasticsearch]# chmod -R 755 /home/elasticsearch su - elasticsearch /usr/share/elasticsearch/bin/elasticsearch -d exit [[email protected]_58_118_centos elasticsearch]# ./plugins/search-guard-2/tools/sgadmin.sh -cn syhuo -h 127.0.0.1 -cd plugins/search-guard-2/sgconfig -ks plugins/search-guard-2/sgconfig/syhuo-keystore.jks -kspass 86337898 -ts plugins/search-guard-2/sgconfig/truststore.jks -tspass 86337898 -nhnv [[email protected]_58_118_centos elasticsearch]# ps -ef |grep elasticsearch [[email protected]_58_118_centos elasticsearch]# kill -9 xxxx [[email protected]_58_118_centos elasticsearch]# systemctl restart elasticsearch [[email protected]_58_118_centos elasticsearch]# systemctl restart status [[email protected]_58_118_centos elasticsearch]# netstat -anop|grep 9300 [[email protected]_58_118_centos elasticsearch]# cat /etc/passwd |grep elasticsearch elasticsearch:x:984:988:elasticsearch user:/home/elasticsearch:/bin/bash 修改为 elasticsearch:x:984:988:elasticsearch user:/home/elasticsearch:/sbin/nologin [[email protected]_58_118_centos elasticsearch]# systemctl enable elasticsearch [[email protected]_58_118_centos elasticsearch]# systemctl list-unit-files |grep enable |grep elasticsearch
原文地址:https://www.cnblogs.com/hnhycnlc888/p/12124833.html
时间: 2024-11-08 10:58:52