# Upgrading Elasticsearch RPM 1.0.0 Removes user and group

**URL:** <https://discuss.elastic.co/t/upgrading-elasticsearch-rpm-1-0-0-removes-user-and-group/15902>\
**Category:** Elasticsearch\
**Created:** [February 19, 2014, 5:05pm UTC](https://discuss.elastic.co/t/upgrading-elasticsearch-rpm-1-0-0-removes-user-and-group/15902 "2014-02-19T17:05:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steven\_Williamson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steven_williamson/32/1637_2.png) [@Steven\_Williamson](https://discuss.elastic.co/u/Steven_Williamson)\
**Post date:** [February 19, 2014, 5:05pm UTC](https://discuss.elastic.co/t/upgrading-elasticsearch-rpm-1-0-0-removes-user-and-group/15902/1 "2014-02-19T17:05:11Z")

</div>

Hi,

Unless I am missing something obvious (and i might be) an upgrade of  
elasticsearch on centos removes the elasticsearch user and group previously  
added by the package. This of course stops elasticsearch from been able to  
start. Is anyone else able to reproduce this or am i just loosing the plot  
🙂

Example on centos 5.7 for reference:

yum info elasticsearch  
Loaded plugins: fastestmirror  
Installed Packages  
Name : elasticsearch  
Arch : noarch  
Version : 0.90.1  
Release : 1  
Size : 19 M  
Repo : installed  
Summary : elasticsearch  
License : 2013, Elasticsearch  
Description: ElasticSearch - Open Source, Distributed, RESTful Search Engine

id elasticsearch  
uid=106(elasticsearch) gid=106(elasticsearch) groups=106(elasticsearch)  
context=system\_u:system\_r:unconfined\_t:SystemLow-SystemHigh

sudo yum upgrade ./elasticsearch-1.0.0.noarch.rpm --nogpgcheck  
Loaded plugins: fastestmirror  
Loading mirror speeds from cached hostfile

- base: [mirror.sov.uk.goscomb.net](http://mirror.sov.uk.goscomb.net)
- extras: [mirror.simwood.com](http://mirror.simwood.com)
- updates: [mirror.simwood.com](http://mirror.simwood.com)  
Setting up Upgrade Process  
Examining ./elasticsearch-1.0.0.noarch.rpm: elasticsearch-1.0.0-1.noarch  
Marking ./elasticsearch-1.0.0.noarch.rpm as an update to  
elasticsearch-0.90.1-1.noarch  
Resolving Dependencies  
--\> Running transaction check  
---\> Package elasticsearch.noarch 0:1.0.0-1 set to be updated  
--\> Finished Dependency Resolution

Dependencies Resolved

# ==================================================================================================================================================================== Package Arch Version Repository Size

Updating:  
elasticsearch noarch  
1.0.0-1 /elasticsearch-1.0.0.noarch  
20 M

# Transaction Summary

Install 0 Package(s)  
Upgrade 1 Package(s)

Total size: 20 M  
Is this ok [y/N]: y  
Downloading Packages:  
Running rpm\_check\_debug  
Running Transaction Test  
Finished Transaction Test  
Transaction Test Succeeded  
Running Transaction  
Updating : elasticsearch

```
     1/2

```

Cleanup : elasticsearch

```
     2/2

```

Removing elasticsearch user and group if existing

Updated:  
elasticsearch.noarch 0:1.0.0-1

Complete!

id elasticsearch  
id: elasticsearch: No such user

Regards  
Steve.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/710c4399-fcda-4934-83f9-342e56c114fa%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/710c4399-fcda-4934-83f9-342e56c114fa%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Tony\_Su](https://avatars.discourse-cdn.com/v4/letter/t/8dc957/32.png) [@Tony\_Su](https://discuss.elastic.co/u/Tony_Su)\
**Post date:** [February 20, 2014, 5:50pm UTC](https://discuss.elastic.co/t/upgrading-elasticsearch-rpm-1-0-0-removes-user-and-group/15902/2 "2014-02-20T17:50:31Z")

</div>

HI Steven,  
Although I'm not part of the ES team, because I have an "old" ES 0.90.10  
node on CentOS 6.5 I wanted to upgrade to 1.0 anyway, I went ahead and more  
or less replicated what you did...

The original ES 0.90.10 was installed from the downloaded RPM (because no  
repos existed then).  
Added the new CentOS yum repos with the configuration described on

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

(I will likely post a GIST since IMO it's a lot of unnecessary work to  
configure something like this if you don't do it regularly)

1. yum upgrade  
Of course it won't find the existing ES because it wasn't installed from  
repo.

2. yum install elasticsearch  
Note that I didn't try to specify a specific package, this results in  
letting yum install the current latest stable.

Result is that I didn't see the "removing elasticsearch user and group if  
existing"  
And "id" returns an elasticsearch user and group.

So, for starters I'd recommend you follow my steps, if a package upgrade  
doesn't happen, maybe remove and re-install elasticsearch.

That said, I haven't seen how the elasticsearch user is being implemented  
anywhere (maybe someone can enlighten?). I see elasticsearch installed and  
running as root-root. It would be a prudent idea to run elasticsearch not  
as root if it's possible (I imagine it might require configuring access to  
libraries and paths).

HTH and IMO,  
Tony

On Wednesday, February 19, 2014 9:05:11 AM UTC-8, Steven Williamson wrote:

> Hi,
> 
> Unless I am missing something obvious (and i might be) an upgrade of  
> elasticsearch on centos removes the elasticsearch user and group previously  
> added by the package. This of course stops elasticsearch from been able to  
> start. Is anyone else able to reproduce this or am i just loosing the plot  
> 🙂
> 
> Example on centos 5.7 for reference:
> 
> yum info elasticsearch  
> Loaded plugins: fastestmirror  
> Installed Packages  
> Name : elasticsearch  
> Arch : noarch  
> Version : 0.90.1  
> Release : 1  
> Size : 19 M  
> Repo : installed  
> Summary : elasticsearch  
> License : 2013, Elasticsearch  
> Description: Elasticsearch - Open Source, Distributed, RESTful Search  
> Engine
> 
> id elasticsearch  
> uid=106(elasticsearch) gid=106(elasticsearch) groups=106(elasticsearch)  
> context=system\_u:system\_r:unconfined\_t:SystemLow-SystemHigh
> 
> sudo yum upgrade ./elasticsearch-1.0.0.noarch.rpm --nogpgcheck  
> Loaded plugins: fastestmirror  
> Loading mirror speeds from cached hostfile
> 
> - base: [mirror.sov.uk.goscomb.net](http://mirror.sov.uk.goscomb.net)
> - extras: [mirror.simwood.com](http://mirror.simwood.com)
> - updates: [mirror.simwood.com](http://mirror.simwood.com)  
> Setting up Upgrade Process  
> Examining ./elasticsearch-1.0.0.noarch.rpm: elasticsearch-1.0.0-1.noarch  
> Marking ./elasticsearch-1.0.0.noarch.rpm as an update to  
> elasticsearch-0.90.1-1.noarch  
> Resolving Dependencies  
> --\> Running transaction check  
> ---\> Package elasticsearch.noarch 0:1.0.0-1 set to be updated  
> --\> Finished Dependency Resolution
> 
> Dependencies Resolved
> 
> ====================================================================================================================================================================  
> Package Arch  
> Version Repository  
> Size
> 
> ====================================================================================================================================================================  
> Updating:  
> elasticsearch noarch  
> 1.0.0-1 /elasticsearch-1.0.0.noarch  
> 20 M
> 
> Transaction Summary
> 
> ====================================================================================================================================================================  
> Install 0 Package(s)  
> Upgrade 1 Package(s)
> 
> Total size: 20 M  
> Is this ok [y/N]: y  
> Downloading Packages:  
> Running rpm\_check\_debug  
> Running Transaction Test  
> Finished Transaction Test  
> Transaction Test Succeeded  
> Running Transaction  
> Updating : elasticsearch
> 
> ```
> 1/2
> 
> ```
> 
> Cleanup : elasticsearch
> 
> ```
> 2/2
> 
> ```
> 
> Removing elasticsearch user and group if existing
> 
> Updated:  
> elasticsearch.noarch 0:1.0.0-1
> 
> Complete!
> 
> id elasticsearch  
> id: elasticsearch: No such user
> 
> Regards  
> Steve.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/49bf6640-e264-43d7-9819-b44bf05e1750%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/49bf6640-e264-43d7-9819-b44bf05e1750%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Tony\_Su](https://avatars.discourse-cdn.com/v4/letter/t/8dc957/32.png) [@Tony\_Su](https://discuss.elastic.co/u/Tony_Su)\
**Post date:** [February 20, 2014, 6:22pm UTC](https://discuss.elastic.co/t/upgrading-elasticsearch-rpm-1-0-0-removes-user-and-group/15902/3 "2014-02-20T18:22:52Z")

</div>

Steven,  
Forgot to mention an issue which might be important to you...

On one test run I did awhile back when I removed elasticsearch entirely and  
re-installed, I discovered it had replace my customized elasticsearch.yml  
with the default which IMO is the behavior.

To guard against this, if you remove elasticsearch with the intention of  
re-installing you should first cp elasticsearch.yml and maybe even  
/etc/sysconfig/elasticsearch

Tony

On Wednesday, February 19, 2014 9:05:11 AM UTC-8, Steven Williamson wrote:

> Hi,
> 
> Unless I am missing something obvious (and i might be) an upgrade of  
> elasticsearch on centos removes the elasticsearch user and group previously  
> added by the package. This of course stops elasticsearch from been able to  
> start. Is anyone else able to reproduce this or am i just loosing the plot  
> 🙂
> 
> Example on centos 5.7 for reference:
> 
> yum info elasticsearch  
> Loaded plugins: fastestmirror  
> Installed Packages  
> Name : elasticsearch  
> Arch : noarch  
> Version : 0.90.1  
> Release : 1  
> Size : 19 M  
> Repo : installed  
> Summary : elasticsearch  
> License : 2013, Elasticsearch  
> Description: Elasticsearch - Open Source, Distributed, RESTful Search  
> Engine
> 
> id elasticsearch  
> uid=106(elasticsearch) gid=106(elasticsearch) groups=106(elasticsearch)  
> context=system\_u:system\_r:unconfined\_t:SystemLow-SystemHigh
> 
> sudo yum upgrade ./elasticsearch-1.0.0.noarch.rpm --nogpgcheck  
> Loaded plugins: fastestmirror  
> Loading mirror speeds from cached hostfile
> 
> - base: [mirror.sov.uk.goscomb.net](http://mirror.sov.uk.goscomb.net)
> - extras: [mirror.simwood.com](http://mirror.simwood.com)
> - updates: [mirror.simwood.com](http://mirror.simwood.com)  
> Setting up Upgrade Process  
> Examining ./elasticsearch-1.0.0.noarch.rpm: elasticsearch-1.0.0-1.noarch  
> Marking ./elasticsearch-1.0.0.noarch.rpm as an update to  
> elasticsearch-0.90.1-1.noarch  
> Resolving Dependencies  
> --\> Running transaction check  
> ---\> Package elasticsearch.noarch 0:1.0.0-1 set to be updated  
> --\> Finished Dependency Resolution
> 
> Dependencies Resolved
> 
> ====================================================================================================================================================================  
> Package Arch  
> Version Repository  
> Size
> 
> ====================================================================================================================================================================  
> Updating:  
> elasticsearch noarch  
> 1.0.0-1 /elasticsearch-1.0.0.noarch  
> 20 M
> 
> Transaction Summary
> 
> ====================================================================================================================================================================  
> Install 0 Package(s)  
> Upgrade 1 Package(s)
> 
> Total size: 20 M  
> Is this ok [y/N]: y  
> Downloading Packages:  
> Running rpm\_check\_debug  
> Running Transaction Test  
> Finished Transaction Test  
> Transaction Test Succeeded  
> Running Transaction  
> Updating : elasticsearch
> 
> ```
> 1/2
> 
> ```
> 
> Cleanup : elasticsearch
> 
> ```
> 2/2
> 
> ```
> 
> Removing elasticsearch user and group if existing
> 
> Updated:  
> elasticsearch.noarch 0:1.0.0-1
> 
> Complete!
> 
> id elasticsearch  
> id: elasticsearch: No such user
> 
> Regards  
> Steve.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/92907d16-ea56-491d-94af-823a21fe166a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/92907d16-ea56-491d-94af-823a21fe166a%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![KevinKluge](https://avatars.discourse-cdn.com/v4/letter/k/dfb087/32.png) [@KevinKluge](https://discuss.elastic.co/u/KevinKluge)\
**Post date:** [February 20, 2014, 9:36pm UTC](https://discuss.elastic.co/t/upgrading-elasticsearch-rpm-1-0-0-removes-user-and-group/15902/4 "2014-02-20T21:36:58Z")

</div>

Steve,

There was a bug in 0.90.1 that caused this. The Elasticsearch user would  
be removed and re-added with a new ID during an upgrade. That was fixed  
for 0.90.2. Sorry about the bug.

Kevin

On Wed, Feb 19, 2014 at 9:05 AM, Steven Williamson [steven43126@gmail.com](mailto:steven43126@gmail.com)wrote:

> Hi,
> 
> Unless I am missing something obvious (and i might be) an upgrade of  
> elasticsearch on centos removes the elasticsearch user and group previously  
> added by the package. This of course stops elasticsearch from been able to  
> start. Is anyone else able to reproduce this or am i just loosing the plot  
> 🙂
> 
> Example on centos 5.7 for reference:
> 
> yum info elasticsearch  
> Loaded plugins: fastestmirror  
> Installed Packages  
> Name : elasticsearch  
> Arch : noarch  
> Version : 0.90.1  
> Release : 1  
> Size : 19 M  
> Repo : installed  
> Summary : elasticsearch  
> License : 2013, Elasticsearch  
> Description: Elasticsearch - Open Source, Distributed, RESTful Search  
> Engine
> 
> id elasticsearch  
> uid=106(elasticsearch) gid=106(elasticsearch) groups=106(elasticsearch)  
> context=system\_u:system\_r:unconfined\_t:SystemLow-SystemHigh
> 
> sudo yum upgrade ./elasticsearch-1.0.0.noarch.rpm --nogpgcheck  
> Loaded plugins: fastestmirror  
> Loading mirror speeds from cached hostfile
> 
> - base: [mirror.sov.uk.goscomb.net](http://mirror.sov.uk.goscomb.net)
> - extras: [mirror.simwood.com](http://mirror.simwood.com)
> - updates: [mirror.simwood.com](http://mirror.simwood.com)  
> Setting up Upgrade Process  
> Examining ./elasticsearch-1.0.0.noarch.rpm: elasticsearch-1.0.0-1.noarch  
> Marking ./elasticsearch-1.0.0.noarch.rpm as an update to  
> elasticsearch-0.90.1-1.noarch  
> Resolving Dependencies  
> --\> Running transaction check  
> ---\> Package elasticsearch.noarch 0:1.0.0-1 set to be updated  
> --\> Finished Dependency Resolution
> 
> Dependencies Resolved
> 
> ====================================================================================================================================================================  
> Package Arch  
> Version Repository  
> Size
> 
> ====================================================================================================================================================================  
> Updating:  
> elasticsearch noarch  
> 1.0.0-1 /elasticsearch-1.0.0.noarch  
> 20 M
> 
> Transaction Summary
> 
> ====================================================================================================================================================================  
> Install 0 Package(s)  
> Upgrade 1 Package(s)
> 
> Total size: 20 M  
> Is this ok [y/N]: y  
> Downloading Packages:  
> Running rpm\_check\_debug  
> Running Transaction Test  
> Finished Transaction Test  
> Transaction Test Succeeded  
> Running Transaction  
> Updating : elasticsearch
> 
> ```
> 1/2
> 
> ```
> 
> Cleanup : elasticsearch
> 
> ```
> 2/2
> 
> ```
> 
> Removing elasticsearch user and group if existing
> 
> Updated:  
> elasticsearch.noarch 0:1.0.0-1
> 
> Complete!
> 
> id elasticsearch  
> id: elasticsearch: No such user
> 
> Regards  
> Steve.
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/710c4399-fcda-4934-83f9-342e56c114fa%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/710c4399-fcda-4934-83f9-342e56c114fa%40googlegroups.com)  
> .  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAB1XBh94Mha%2BwT06n66A-qN5VF03tLBHe2KcZzeH3Qw03NUdVQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAB1XBh94Mha%2BwT06n66A-qN5VF03tLBHe2KcZzeH3Qw03NUdVQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:** [July 6, 2017, 1:48am UTC](https://discuss.elastic.co/t/upgrading-elasticsearch-rpm-1-0-0-removes-user-and-group/15902/5 "2017-07-06T01:48:31Z")

</div>


