ElasticSearch doesn't start after installing 5.6.4

0

I just installed ElasticSearch 5.6.4 from https://www.elastic.co/downloads/elasticsearch via DEB (I use Debian 9) package using these commands:

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.4.deb
dpkg -i elasticsearch-5.6.4.deb
apt-get install openjdk-8-jre-headless
update-rc.d elasticsearch defaults 95 10
service elasticsearch start

But ElasticSearch won't start, this is log:

● elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2017-11-13 16:59:24 UTC; 13min ago
Docs: http://www.elastic.co
Process: 16503 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid --quiet -Edefault.path.logs=${LOG_DIR} -Edefault.path.data=${DATA_DIR} -Edefault.path.conf=${CONF_DIR} (code=exited, statu
Process: 16500 ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec (code=exited, status=0/SUCCESS)
Main PID: 16503 (code=exited, status=1/FAILURE)

Nov 13 16:59:12 Mysite systemd[1]: Starting Elasticsearch...
Nov 13 16:59:12 Mysite systemd[1]: Started Elasticsearch.
Nov 13 16:59:24 Mysite systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Nov 13 16:59:24 Mysite systemd[1]: elasticsearch.service: Unit entered failed state.
Nov 13 16:59:24 Mysite systemd[1]: elasticsearch.service: Failed with result 'exit-code'.

But it doesn't say anything useful.

In config file I just changed this:

network.host: 51.15.212.76
http.port: 9200
cluster.name: elasticsearch
node.name: "db-master"
node.master: true
node.data: true

UPDATE:

I just used default settings and it works, problem is here:

Caused by: java.net.BindException: Cannot assign requested address

Why? I am using my IP adress (I copied it). I don't want to bind it to localhost, because I want to be able to connect it from different machine.

Result from ifconfig -a

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.5.85.149  netmask 255.255.255.254  broadcast 10.5.85.149
        inet6 fe80::207:cbff:fe0b:4d8c  prefixlen 64  scopeid 0x20<link>
        ether 00:07:cb:0b:4d:8c  txqueuelen 1000  (Ethernet)
        RX packets 18975397  bytes 14313412446 (13.3 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 61630671  bytes 85441277828 (79.5 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device memory 0x80000000-8001ffff

ip6_vti0: flags=128<NOARP>  mtu 1500
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 1  (UNSPEC)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ip6tnl0: flags=128<NOARP>  mtu 1452
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 1  (UNSPEC)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 26883466  bytes 4169327225 (3.8 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 26883466  bytes 4169327225 (3.8 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

sit0: flags=128<NOARP>  mtu 1480
        sit  txqueuelen 1  (IPv6-in-IPv4)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
elasticsearch
start
asked on Server Fault Nov 13, 2017 by tomsk • edited Nov 13, 2017 by tomsk

3 Answers

2

I saw your update. You cannot use this configuration:

network.host: 51.15.212.76

because you have no network interface with this ip address.

You could use this 10.5.85.149 from eth0, for example.

answered on Server Fault Nov 13, 2017 by Denis Marques
2

The issue is you don't have 51.15.212.76 on your server. Your provider might map 51.15.212.76 -> 10.5.85.149

So try this instead

network.host: 10.5.85.149

Or better to bind to all interfaces

network.host: 0.0.0.0
answered on Server Fault Nov 13, 2017 by Mike
0

You need to change from

network.host: 51.15.212.76

to

network.host: 0.0.0.0

And also add the following configuration in the elasticsearch.yml file

transport.host: localhost
transport.tcp.port: 9300
answered on Server Fault Aug 16, 2019 by Siddhartha Chowdhury

User contributions licensed under CC BY-SA 3.0