Elastic search doesn't start


(raghu) #1

i have Elasticsearch 2.2 in my instance. It was working fine. recently i found the service stoped. So tried restarting, but it's stoping again by throughing below log.
can any one help me here plz?


[2017-04-27 06:05:08,495][INFO ][node ] [Graydon Creed] version[2.4.4], pid[18868], build[fcbb46d/2017-01-03T11:33:16Z]
[2017-04-27 06:05:08,496][INFO ][node ] [Graydon Creed] initializing ...
[2017-04-27 06:05:08,895][INFO ][plugins ] [Graydon Creed] modules [reindex, lang-expression, lang-groovy], plugins [], sites []
[2017-04-27 06:05:08,912][INFO ][env ] [Graydon Creed] using [1] data paths, mounts [[/ (/dev/sda1)]], net usable_space [23.7gb], net total_space [28.8gb], spins? [possibly], types [ext4]
[2017-04-27 06:05:08,912][INFO ][env ] [Graydon Creed] heap size [1007.3mb], compressed ordinary object pointers [true]
[2017-04-27 06:05:10,402][INFO ][node ] [Graydon Creed] initialized
[2017-04-27 06:05:10,402][INFO ][node ] [Graydon Creed] starting ...
[2017-04-27 06:05:10,498][ERROR][bootstrap ] [Graydon Creed] Exception
BindTransportException[Failed to bind to [9300-9400]]; nested: ChannelException[Failed to bind to: localhost/52.176.50.111:9400]; nested: BindException[Cannot assign requested address];
at org.elasticsearch.transport.netty.NettyTransport.bindToPort(NettyTransport.java:489)
at org.elasticsearch.transport.netty.NettyTransport.bindServerBootstrap(NettyTransport.java:451)
at org.elasticsearch.transport.netty.NettyTransport.doStart(NettyTransport.java:332)
at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:68)
at org.elasticsearch.transport.TransportService.doStart(TransportService.java:182)
at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:68)
at org.elasticsearch.node.Node.start(Node.java:278)
at org.elasticsearch.bootstrap.Bootstrap.start(Bootstrap.java:222)
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:288)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:45)
Caused by: org.jboss.netty.channel.ChannelException: Failed to bind to: localhost/52.176.50.111:9400
at org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:272)
at org.elasticsearch.transport.netty.NettyTransport$1.onPortNumber(NettyTransport.java:471)
at org.elasticsearch.common.transport.PortsRange.iterate(PortsRange.java:69)
at org.elasticsearch.transport.netty.NettyTransport.bindToPort(NettyTransport.java:467)
... 9 more
Caused by: java.net.BindException: Cannot assign requested address
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at org.jboss.netty.channel.socket.nio.NioServerBoss$RegisterTask.run(NioServerBoss.java:193)
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:391)
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:315)
at org.jboss.netty.channel.socket.nio.NioServerBoss.run(NioServerBoss.java:42)
at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
[2017-04-27 06:05:10,508][INFO ][node ] [Graydon Creed] stopping ...
[2017-04-27 06:05:10,509][INFO ][node ] [Graydon Creed] stopped
[2017-04-27 06:05:10,509][INFO ][node ] [Graydon Creed] closing ...
[2017-04-27 06:05:10,513][INFO ][node ] [Graydon Creed] closed


Also can any one suggest what versions of elasticsearch, kibana and logstash I can work collectively in elk stack?


(Pablo) #2

Hi,
have you probably changed your ip address?

Check your elasticsearch.yml and play with the config until you get it right

If you have the chance move to ELK 5.3.


(raghu) #3

@Pablo

thanks for you swift reply

i have just added below line in the yml file. apart from this everything was commented and was working from last 2 weeks.

network.host: localhost


(Pablo) #4

no problem @raghuvarma

From the documentation:
https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html#common-network-settings
you can probably use local or just comment it out to test.
Also check your /etc/hosts to see where localhost is poiting to.


(raghu) #5

@pablosan

Meanwhile I was trying to uninstall elasticsearch and reinstall it. when i remove it with below command it was showing following error.

$ apt-get --purge autoremove elasticsearch

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
elasticsearch*
0 upgraded, 0 newly installed, 1 to remove and 2 not upgraded.
After this operation, 30.5 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 37152 files and directories currently installed.)
Removing elasticsearch (2.4.5) ...
Stopping elasticsearch service...Failed to issue method call: Unit elasticsearch.service not loaded.
dpkg: error processing package elasticsearch (--purge):
subprocess installed pre-removal script returned error exit status 5

NOT starting on installation, please execute the following statements to configure elasticsearch service to start automatically using systemd

sudo systemctl daemon-reload
sudo systemctl enable elasticsearch.service

You can start elasticsearch service by executing

sudo systemctl start elasticsearch.service
Errors were encountered while processing:
** elasticsearch**
E: Sub-process /usr/bin/dpkg returned an error code (1)

So I removed below dir's with "rm -rf" cmd
/etc/elasticsearch /usr/share/elasticsearch
After that it's not getting reinstalled properly along with elasticsearch.yaml file


(system) #6

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.