# User elasticsearch lost after reboot

**URL:** <https://discuss.elastic.co/t/user-elasticsearch-lost-after-reboot/324839>\
**Category:** Elasticsearch\
**Created:** [February 6, 2023, 11:29pm UTC](https://discuss.elastic.co/t/user-elasticsearch-lost-after-reboot/324839 "2023-02-06T23:29:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bhirani](https://avatars.discourse-cdn.com/v4/letter/b/e47c2d/32.png) [@bhirani](https://discuss.elastic.co/u/bhirani)\
**Post date:** [February 6, 2023, 11:29pm UTC](https://discuss.elastic.co/t/user-elasticsearch-lost-after-reboot/324839/1 "2023-02-06T23:29:36Z")

</div>

I have installed Elasticsearch on TrueNAS using dpkg.  
I have setup [fs2es-indexer](https://github.com/Ellerhold/fs2es-indexer) to index my files.  
I have indexed the files and tested that all works.

After reboot, the user `elasticsearch` is lost.

```auto
id elasticsearch
id: ‘elasticsearch’: no such user

```

I have reinstall Elasticsearch via dpkg again and run the following commands to get it working.

```auto
sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable elasticsearch.service
sudo systemctl start elasticsearch.service

```

And now if I run `id` I the results below.

```auto
id elasticsearch
uid=128(elasticsearch) gid=132(elasticsearch) groups=132(elasticsearch)

```

Can someone please guide to fix this issue.

installation file is `elasticsearch-8.6.1-amd64.deb`

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 6, 2023, 11:48pm UTC](https://discuss.elastic.co/t/user-elasticsearch-lost-after-reboot/324839/2 "2023-02-06T23:48:26Z")

</div>

Welcome to our community! 😃

FYI Truenas isn't a supported OS, so there may be something it has done. Is there anything in the OS logs that might be related?

---

<div class="post-metadata">

**Author:** ![bhirani](https://avatars.discourse-cdn.com/v4/letter/b/e47c2d/32.png) [@bhirani](https://discuss.elastic.co/u/bhirani)\
**Post date:** [February 7, 2023, 1:12am UTC](https://discuss.elastic.co/t/user-elasticsearch-lost-after-reboot/324839/3 "2023-02-07T01:12:01Z")

</div>

Thanks for the quick reply.

Forgot to clarify that this is installed on TrueNAS Scale which is a debian based distribution.

This is what I get from `more syslog | grep elasticsearch`

```auto
elasticsearch.service: Consumed 1min 38.836s CPU time.
Feb 7 10:15:20 truenas systemd-tmpfiles[3859]: /usr/lib/tmpfiles.d/elasticsearch.conf:1: Failed to resolve user 'elasticsearch': No such file or directory
Feb 7 10:15:20 truenas systemd[3922]: elasticsearch.service: Failed to determine user credentials: No such file or directory
Feb 7 10:15:20 truenas systemd[3922]: elasticsearch.service: Failed at step USER spawning /usr/share/elasticsearch/bin/systemd-entrypoint: No such file or directory
Feb 7 10:15:20 truenas systemd[1]: elasticsearch.service: Main process exited, code=exited, status=217/USER
Feb 7 10:15:20 truenas systemd[1]: elasticsearch.service: Failed with result 'exit-code'.

```

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [February 7, 2023, 3:44am UTC](https://discuss.elastic.co/t/user-elasticsearch-lost-after-reboot/324839/4 "2023-02-07T03:44:56Z")

</div>

> [@bhirani](#):
>
> Forgot to clarify that this is installed on TrueNAS Scale which is a debian based distribution.

It is debian based, but it behaves like an appliance and you should not use it as it was a normal debian server.

You need to check on with the TrueNAS community, your issue is not with elasticsearch.

As an example, on this [post](https://www.truenas.com/community/threads/is-it-possible-to-install-additional-debian-packages-programs-on-truenas-scale.96701/) about adding packages you have this comment:

> TrueNAS is not intended to be a general purpose system for you to manipulate as you see fit. **It is an appliance** , and is carefully designed to accomplish a particular function. You are not supposed to be running "apt", or adding packages, or making changes to the system, unless you are able to do this through the GUI's configuration options or the API.

I do not use TrueNAS, but if I got it right you should be able to run elasticsearch using [containers](https://www.truenas.com/docs/scale/scaletutorials/apps/docker/).

---

<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:** [March 7, 2023, 3:45am UTC](https://discuss.elastic.co/t/user-elasticsearch-lost-after-reboot/324839/5 "2023-03-07T03:45:39Z")

</div>

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