Yum command to install Elasticsearch 5.2.2 now that 5.3.0 is out


Now that Elasticsearch 5.3.0 is out,
sudo yum install Elasticsearch
will install 5.3.0 version.

I have to install version 5.2.2
I used this to query what is available.
yum --showduplicates list elasticsearch | expand *Note* Spacewalk repositories are not listed below. You must run this command as root to access Spacewalk repositories. Loaded plugins: langpacks, product-id, rhnplugin, search-disabled-repos, : subscription-manager Available Packages elasticsearch.noarch 5.0.0-1 elasticsearch-5.x elasticsearch.noarch 5.0.1-1 elasticsearch-5.x elasticsearch.noarch 5.0.2-1 elasticsearch-5.x elasticsearch.noarch 5.1.1-1 elasticsearch-5.x elasticsearch.noarch 5.1.2-1 elasticsearch-5.x elasticsearch.noarch 5.2.0-1 elasticsearch-5.x elasticsearch.noarch 5.2.1-1 elasticsearch-5.x elasticsearch.noarch 5.2.2-1 elasticsearch-5.x elasticsearch.noarch 5.3.0-1 elasticsearch-5.x

The command I used to install 5.2.2 then was
sudo yum install elasticsearch-5.2.2-1

Install went fine. But the startup failed.
org.elasticsearch.transport.BindTransportException: Failed to bind to [9300-9400] at org.elasticsearch.transport.TcpTransport.bindToPort(TcpTransport.java:729) ~[elasticsearch-5.2.2.jar:5.2.2] at org.elasticsearch.transport.TcpTransport.bindServer(TcpTransport.java:694) ~[elasticsearch-5.2.2.jar:5.2.2] .... ... blah ... ... at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:82) [elasticsearch-5.2.2.jar:5.2.2] Caused by: java.net.BindException: Cannot assign requested address

Funny thing is that when I install using sudo yum install elasticsearch the instance starts up fine. But it is 5.3.0 which i do not want at this point.

(Jason Tedor) #2

If Elasticsearch can not bind transport to the entire port range from 9300 to 9400 for your interface, I think that something is wrong with your configuration (for example, you configured an IP address that no interface on the machine has).


I am out of ideas here.
When I use sudo yum install elasticsearch it works. But when I use sudo yum install elasticsearch-5.2.2-1 I see this issue.
Is the command I am using to install the 5.2.2 version right?

(Jason Tedor) #4

Yes, it's fine but that's not the problem here. You need to check your network configuration.


It is really weird but but using IP address instead of host name in the network.host in elasticsearch.yml solved the issue. I have no idea if there was something wrong in the way server was setup.

(Jason Tedor) #6

If your DNS is resolving the hostname to an address that is no interface on the machine has, then you would see this exception (and your environment is broken).

(kishorereddy) #7

sudo yum install elasticsearch-5.2.2-1
are you able to install elatisearch 5.2.2 package with above command.
i am getting following message.
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile


Did you import the PGP key as listed here. Followed by creating the repo file as listed here.

(kishorereddy) #9

yep, i have installed PGP key using following command.
rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch

later created a new file elasticsearch.repo in the /etc/yum.repos.d/ directory
updated following content in file.
name=Elasticsearch repository for 5.x packages

elasticsearch 5.3 is upgrading instead of 5.2.2(my requirement)
sudo yum install elasticsearch

Note: i changed baseurl version from 5.x to 5.2.2, but no luck.
following error observed.
Loaded plugins: fastestmirror, langpacks
https://artifacts.elastic.co/packages/5.2.2/yum/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found


Can you try this command to see what is available?
yum --showduplicates list elasticsearch | expand


@jasontedor The environment indeed was broken. They had misspelt the hostnames in the /etc/hosts while setting up the server.

(system) #12

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