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
  • You tried start Elasticsearch with default elasticsearch.yml parameters? You saw if there are any errors on /var/log/elasticsearch log file? Please confirm Java version used by Elasticsearch on /var/log/elasticsearch.log file. I just installed the same Elasticsearch version on my Ubuntu LTS 16 with the following Java version and worked fine for me. > JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server > VM/1.8.0_144/25.144-b01] – Denis Marques Nov 13 '17 at 21:05
  • show the results of running ifconfig -a – Mike Nov 13 '17 at 21:14
  • I added it, but if I go to 51.15.212.76 in browser it works. – tomsk Nov 13 '17 at 21:17
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
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.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.