elasticsearch can't start service in ubuntu 15.10 -
i trying setup elasticsearch on system.i installed seems process not starting. cant response via curl. read problem regarding pid owner not correctly setup, tried steps still isnt working. if put "set -x" in /etc/init.d/elasticsearch , try
/etc/init.d/elasticsearch restart
i output
root@sid-laptop:/etc/init.d# /etc/init.d/elasticsearch restart + id -u + [ 0 -ne 0 ] + . /lib/lsb/init-functions + run-parts --lsbsysinit --list /lib/lsb/init-functions.d + [ -r /lib/lsb/init-functions.d/01-upstart-lsb ] + . /lib/lsb/init-functions.d/01-upstart-lsb + unset upstart_session + _rc_script=/etc/init.d/elasticsearch + [ -r /etc/init//etc/init.d/elasticsearch.conf ] + _upstart_job=elasticsearch + [ -r /etc/init/elasticsearch.conf ] + [ -r /lib/lsb/init-functions.d/20-left-info-blocks ] + . /lib/lsb/init-functions.d/20-left-info-blocks + [ -r /lib/lsb/init-functions.d/40-systemd ] + . /lib/lsb/init-functions.d/40-systemd + _use_systemctl=0 + [ -d /run/systemd/system ] + [ -n ] + [ 6714 -ne 1 ] + [ -z ] + [ -z ] + readlink -f /etc/init.d/elasticsearch + _use_systemctl=1 + prog=elasticsearch + service=elasticsearch.service + systemctl -p canreload show elasticsearch.service + [ canreload=no = canreload=no ] + [ restart = reload ] + [ 1 = 1 ] + set +e + set +u + [ xrestart = xstart -o xrestart = xstop -o xrestart = xrestart -o xrestart = xreload -o xrestart = xforce-reload -o xrestart = xstatus ] + systemctl_redirect /etc/init.d/elasticsearch restart + local s + local rc + local prog=elasticsearch + local command=restart + s=restarting elasticsearch (via systemctl) + service=elasticsearch.service + systemctl -p loadstate show elasticsearch.service + state=loadstate=loaded + [ loadstate=loaded = loadstate=masked ] + systemctl is-system-running + out=running + [ restart = status ] + log_daemon_msg restarting elasticsearch (via systemctl) elasticsearch.service + [ -z restarting elasticsearch (via systemctl) ] + log_daemon_msg_pre restarting elasticsearch (via systemctl) elasticsearch.service + log_use_fancy_output + tput=/usr/bin/tput + expr=/usr/bin/expr + [ -t 1 ] + [ xxterm-256color != x ] + [ xxterm-256color != xdumb ] + [ -x /usr/bin/tput ] + [ -x /usr/bin/expr ] + /usr/bin/tput hpa 60 + /usr/bin/tput setaf 1 + [ -z ] + fancytty=1 + true + /bin/echo -n [....] [....] + [ -z elasticsearch.service ] + echo -n restarting elasticsearch (via systemctl): elasticsearch.service restarting elasticsearch (via systemctl): elasticsearch.service+ log_daemon_msg_post restarting elasticsearch (via systemctl) elasticsearch.service + : + /bin/systemctl restart elasticsearch.service warning: elasticsearch.service changed on disk. run 'systemctl daemon-reload' reload units. + rc=0 + [ restart = status ] + log_end_msg 0 + [ -z 0 ] + local retval + retval=0 + log_end_msg_pre 0 + log_use_fancy_output + tput=/usr/bin/tput + expr=/usr/bin/expr + [ -t 1 ] + [ xxterm-256color != x ] + [ xxterm-256color != xdumb ] + [ -x /usr/bin/tput ] + [ -x /usr/bin/expr ] + /usr/bin/tput hpa 60 + /usr/bin/tput setaf 1 + [ -z 1 ] + true + true + /usr/bin/tput setaf 1 + red= + /usr/bin/tput setaf 2 + green= + /usr/bin/tput setaf 3 + yellow= + /usr/bin/tput op + normal= + /usr/bin/tput civis + /usr/bin/tput sc + /usr/bin/tput hpa 0 + [ 0 -eq 0 ] + /bin/echo -ne [ ok [ ok + /usr/bin/tput rc + /usr/bin/tput cnorm + log_use_fancy_output + tput=/usr/bin/tput + expr=/usr/bin/expr + [ -t 1 ] + [ xxterm-256color != x ] + [ xxterm-256color != xdumb ] + [ -x /usr/bin/tput ] + [ -x /usr/bin/expr ] + /usr/bin/tput hpa 60 + /usr/bin/tput setaf 1 + [ -z 1 ] + true + true + /usr/bin/tput setaf 1 + red= + /usr/bin/tput setaf 3 + yellow= + /usr/bin/tput op + normal= + [ 0 -eq 0 ] + echo . . + log_end_msg_post 0 + : + return 0 + return 0 + exit 0
been trying whole day , still cant figure out.
"ps -a" shows no elasticsearch process. please help.
more info:
tried
sudo -u elasticsearch /usr/share/elasticsearch/bin/elasticsearch -d -p /var/run/elasticsearch.pid --default.config=/etc/elasticsearch/elasticsearch.yml --default.path.home=/usr/share/elasticsearch --default.path.logs=/var/log/elasticsearch --default.path.data=/var/lib/elasticsearch --default.path.work=/tmp/elasticsearch --default.path.conf=/etc/elasticsearch
/gives:
sid@sid-laptop:/etc/init.d$ sudo -u elasticsearch /usr/share/elasticsearch/bin/elasticsearch -d -p /var/run/elasticsearch.pid --default.config=/etc/elasticsearch/elasticsearch.yml --default.path.home=/usr/share/elasticsearch --default.path.logs=/var/log/elasticsearch --default.path.data=/var/lib/elasticsearch --default.path.work=/tmp/elasticsearch --default.path.conf=/etc/elasticsearch [sudo] password sid: sid@sid-laptop:/etc/init.d$ {1.6.2}: pid failed ... - filenotfoundexception[/var/run/elasticsearch.pid (permission denied)] java.io.filenotfoundexception: /var/run/elasticsearch.pid (permission denied) @ java.io.fileoutputstream.open0(native method) @ java.io.fileoutputstream.open(fileoutputstream.java:270) @ java.io.fileoutputstream.(fileoutputstream.java:213) @ java.io.fileoutputstream.(fileoutputstream.java:162) @ org.elasticsearch.bootstrap.bootstrap.main(bootstrap.java:194) @ org.elasticsearch.bootstrap.elasticsearch.main(elasticsearch.java:32
ubuntu don't allow other users admins write /var/run , happen reasons.
has can notice elasticsearch launched "elasticsearch" user elasticsearch creates on install:
sudo -u elasticsearch....
so instead of change /var/run permissions users or try give admin permissions elasticsearch user believe best solution created new folder inside /var/run folder
sudo mkdir /var/run/elasticsearch/
and give elasticsearch user permissions it
sudo chown elasticsearch:elasticsearch /var/run/elasticsearch
after need change elasticsearch init script write pid file new folder
sudo vim /etc/init.d/elasticsearch
updating property pid_file to
pid_file=/var/run/elasticsearch/$name.pid
this has worked me. hope works ;)
Comments
Post a Comment