# Yum command to install Elasticsearch 5.2.2 now that 5.3.0 is out

**URL:** <https://discuss.elastic.co/t/yum-command-to-install-elasticsearch-5-2-2-now-that-5-3-0-is-out/81479>\
**Category:** Elasticsearch\
**Created:** [April 6, 2017, 1:54pm UTC](https://discuss.elastic.co/t/yum-command-to-install-elasticsearch-5-2-2-now-that-5-3-0-is-out/81479 "2017-04-06T13:54:10Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![pk.241011](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pk.241011/32/86285_2.png) [@pk.241011](https://discuss.elastic.co/u/pk.241011)\
**Post date:** [April 6, 2017, 1:54pm UTC](https://discuss.elastic.co/t/yum-command-to-install-elasticsearch-5-2-2-now-that-5-3-0-is-out/81479/1 "2017-04-06T13:54:10Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [April 6, 2017, 2:41pm UTC](https://discuss.elastic.co/t/yum-command-to-install-elasticsearch-5-2-2-now-that-5-3-0-is-out/81479/2 "2017-04-06T14:41:14Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![pk.241011](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pk.241011/32/86285_2.png) [@pk.241011](https://discuss.elastic.co/u/pk.241011)\
**Post date:** [April 6, 2017, 9:49pm UTC](https://discuss.elastic.co/t/yum-command-to-install-elasticsearch-5-2-2-now-that-5-3-0-is-out/81479/3 "2017-04-06T21:49:19Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [April 6, 2017, 10:10pm UTC](https://discuss.elastic.co/t/yum-command-to-install-elasticsearch-5-2-2-now-that-5-3-0-is-out/81479/4 "2017-04-06T22:10:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![pk.241011](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pk.241011/32/86285_2.png) [@pk.241011](https://discuss.elastic.co/u/pk.241011)\
**Post date:** [April 12, 2017, 1:11pm UTC](https://discuss.elastic.co/t/yum-command-to-install-elasticsearch-5-2-2-now-that-5-3-0-is-out/81479/5 "2017-04-12T13:11:15Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [April 12, 2017, 1:51pm UTC](https://discuss.elastic.co/t/yum-command-to-install-elasticsearch-5-2-2-now-that-5-3-0-is-out/81479/6 "2017-04-12T13:51:49Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![kishore419](https://avatars.discourse-cdn.com/v4/letter/k/b4bc9f/32.png) [@kishore419](https://discuss.elastic.co/u/kishore419)\
**Post date:** [April 13, 2017, 11:17am UTC](https://discuss.elastic.co/t/yum-command-to-install-elasticsearch-5-2-2-now-that-5-3-0-is-out/81479/7 "2017-04-13T11:17:37Z")

</div>

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

- base: [centos.excellmedia.net](http://centos.excellmedia.net)
- extras: [centos.excellmedia.net](http://centos.excellmedia.net)
- updates: [centos.excellmedia.net](http://centos.excellmedia.net)  
No package elasticsearch-5.2.2-1 available.  
Error: Nothing to do

---

<div class="post-metadata">

**Author:** ![pk.241011](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pk.241011/32/86285_2.png) [@pk.241011](https://discuss.elastic.co/u/pk.241011)\
**Post date:** [April 13, 2017, 12:29pm UTC](https://discuss.elastic.co/t/yum-command-to-install-elasticsearch-5-2-2-now-that-5-3-0-is-out/81479/8 "2017-04-13T12:29:55Z")

</div>

Did you import the PGP key as listed [here.](https://www.elastic.co/guide/en/elasticsearch/reference/current/rpm.html#rpm-key) Followed by creating the repo file as listed [here.](https://www.elastic.co/guide/en/elasticsearch/reference/current/rpm.html#rpm-repo)

---

<div class="post-metadata">

**Author:** ![kishore419](https://avatars.discourse-cdn.com/v4/letter/k/b4bc9f/32.png) [@kishore419](https://discuss.elastic.co/u/kishore419)\
**Post date:** [April 14, 2017, 3:31am UTC](https://discuss.elastic.co/t/yum-command-to-install-elasticsearch-5-2-2-now-that-5-3-0-is-out/81479/9 "2017-04-14T03:31:04Z")

</div>

yep, i have installed PGP key using following command.  
rpm --import [https://artifacts.elastic.co/GPG-KEY-elasticsearch](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.  
[elasticsearch-5.x]  
name=Elasticsearch repository for 5.x packages  
baseurl=https://artifacts.elastic.co/packages/5.x/yum  
gpgcheck=1  
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch  
enabled=1  
autorefresh=1  
type=rpm-md

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:](https://artifacts.elastic.co/packages/5.2.2/yum/repodata/repomd.xml:) [Errno 14] HTTPS Error 404 - Not Found

---

<div class="post-metadata">

**Author:** ![pk.241011](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pk.241011/32/86285_2.png) [@pk.241011](https://discuss.elastic.co/u/pk.241011)\
**Post date:** [April 15, 2017, 12:39pm UTC](https://discuss.elastic.co/t/yum-command-to-install-elasticsearch-5-2-2-now-that-5-3-0-is-out/81479/10 "2017-04-15T12:39:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![pk.241011](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pk.241011/32/86285_2.png) [@pk.241011](https://discuss.elastic.co/u/pk.241011)\
**Post date:** [April 19, 2017, 1:18am UTC](https://discuss.elastic.co/t/yum-command-to-install-elasticsearch-5-2-2-now-that-5-3-0-is-out/81479/11 "2017-04-19T01:18:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 17, 2017, 1:27am UTC](https://discuss.elastic.co/t/yum-command-to-install-elasticsearch-5-2-2-now-that-5-3-0-is-out/81479/12 "2017-05-17T01:27:14Z")

</div>

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