# RHEL Installation fails: No such file or directory: '/elastic\_cloud\_apps/bootstrap-initiator/bootstrap\_initiator/prerequisite/tmp

**URL:** <https://discuss.elastic.co/t/rhel-installation-fails-no-such-file-or-directory-elastic-cloud-apps-bootstrap-initiator-bootstrap-initiator-prerequisite-tmp/231011>\
**Category:** Elastic Cloud Enterprise (ECE)\
**Created:** [May 4, 2020, 5:38pm UTC](https://discuss.elastic.co/t/rhel-installation-fails-no-such-file-or-directory-elastic-cloud-apps-bootstrap-initiator-bootstrap-initiator-prerequisite-tmp/231011 "2020-05-04T17:38:27Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![adam.gantt\_va](https://avatars.discourse-cdn.com/v4/letter/a/6bbea6/32.png) [@adam.gantt\_va](https://discuss.elastic.co/u/adam.gantt_va)\
**Post date:** [May 4, 2020, 5:38pm UTC](https://discuss.elastic.co/t/rhel-installation-fails-no-such-file-or-directory-elastic-cloud-apps-bootstrap-initiator-bootstrap-initiator-prerequisite-tmp/231011/1 "2020-05-04T17:38:27Z")

</div>

Configured RHEL and installed Docker following the steps from [https://www.elastic.co/guide/en/cloud-enterprise/current/ece-configure-hosts-rhel-centos.html](https://www.elastic.co/guide/en/cloud-enterprise/current/ece-configure-hosts-rhel-centos.html)

Performed steps for installing offline [https://www.elastic.co/guide/en/cloud-enterprise/current/ece-installing-offline.html](https://www.elastic.co/guide/en/cloud-enterprise/current/ece-installing-offline.html)

Docker images are loaded on the host server:  
**docker image ls**

```auto
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.elastic.co/cloud-enterprise/elastic-cloud-enterprise 2.5.0 37ee782d6465 4 weeks ago 1.32 GB
docker.elastic.co/cloud-assets/apm 7.6.2-0 8ceb1f996eb3 5 weeks ago 468 MB
docker.elastic.co/cloud-assets/elasticsearch 7.6.2-0 8e28b2e76658 5 weeks ago 1.17 GB
docker.elastic.co/cloud-assets/kibana 7.6.2-0 d343e188c4fa 5 weeks ago 1.34 GB
docker.elastic.co/app-search/app-search 7.6.2 9a0b03ad2530 5 weeks ago 543 MB
docker.elastic.co/cloud-assets/elasticsearch 6.8.8-0 b9072b317c39 6 weeks ago 1.37 GB
docker.elastic.co/cloud-assets/kibana 6.8.8-0 03527458ee29 6 weeks ago 1.12 GB

```

When I run the shell script to perform the Elastic installation, under a non-root account, I continue to get the following No such file or directory error message:

**./elastic-cloud-enterprise.sh install --debug**

```auto
-- Debug Info --
NODE_TYPE - initial
RUNNER_ROLES -
ALLOCATOR_TAGS -
HOST_DOCKER_HOST - /var/run/docker.sock
HOST_PREREQ_FAILED - False
ELASTIC_CLOUD_PLATFORM - aws
ECE_TIMEOUT_FACTOR - 1.0
ELASTIC_UID - 1005
HOST_KERNEL_PARAMETERS - {'net.ipv4.ip_local_port_range': '32768\t60999'}
CLOUD_FEATURE_FLAG_DEDICATEDNODETYPES - true
HOST_STORAGE_ROOT_VOLUME_PATH - /mnt/data
ECE_DOCKER_REPOSITORY - cloud-enterprise
DOCKER_REGISTRY - docker.elastic.co
RUNNER_HOST_IP - 10.245.202.229
RUNNER_AVAILABILITY_ZONE - ece-zone-1
ELASTIC_GID - 1006
CLOUD_ENTERPRISE_VERSION - 2.5.0
RUNNER_REGION - ece-region
INSTANCE_TYPES_TO_ENABLE -
MEMORY_SETTINGS - {}
HOST_STORAGE_DEVICE_PATH - /dev/mapper/rootvg-root
RUNNER_ENVIRONMENT_METADATA_JSON - {}
RUNNER_CAPACITY - 23905
RUNNER_ROLES_TOKEN -
NODE_TYPE - initial
RUNNER_ID - 10.245.202.229
CONFIG_FILE -
PROXY_TAGS -
FORCE_INSTALL - False
HOST_STORAGE_PATH - /mnt/data/elastic

-- Verifying Prerequisites --
Checking runner container does not exist... PASSED
Checking host storage root volume path is not root... PASSED
Checking host storage path is accessible... PASSED
Checking host storage path contents matches whitelist... PASSED
Checking Docker version... PASSED
Checking Docker file system... PASSED
Checking Docker network settings... PASSED
 - The installation can proceed with ICC enabled; however, we recommend turning off ICC (icc=false).
Checking Docker storage driver... PASSED
 - The installation with overlay2 can proceed; however, we recommend using overlay
Checking whether 'setuser' works inside a Docker container... PASSED
Checking memory settings... PASSED
 - Option `--memory-settings` not used. Default memory settings might be insufficient for production use!
Checking runner ip connectivity... PASSED
Checking OS IPv4 IP forward setting... PASSED
Checking OS max map count setting... PASSED
Checking OS kernel version... PASSED
 - OS kernel version is 3.10.0-1062.18.1.el7.x86_64 but we recommend 4.4.
Checking minimum required memory... PASSED
Checking OS kernel cgroup.memory... PASSED
 - OS setting 'cgroup.memory' should be set to cgroup.memory=nokmem
Checking OS minimum ephemeral port... PASSED
Checking OS max open file descriptors per process... PASSED
Checking OS max open file descriptors system-wide... PASSED
Checking OS file system and Docker storage driver compatibility... PASSED
Checking OS file system storage driver permissions...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Errors have caused Elastic Cloud Enterprise installation to fail
[Errno 2] No such file or directory: '/elastic_cloud_apps/bootstrap-initiator/bootstrap_initiator/prerequisite/tmp'
Traceback (most recent call last):
  File "/elastic_cloud_apps/bootstrap-initiator/initiator.py", line 83, in <module>
    prerequisite.verify_prerequisites(prerequisites, bootstrap_properties)
  File "/elastic_cloud_apps/bootstrap-initiator/bootstrap_initiator/prerequisite/base.py", line 63, in verify_prerequisites
    result, msg = p.is_met(bootstrap_properties)
  File "/elastic_cloud_apps/bootstrap-initiator/bootstrap_initiator/prerequisite/os_settings.py", line 275, in is_met
    uid = getpwuid(stat(tmp_dir).st_uid).pw_name
FileNotFoundError: [Errno 2] No such file or directory: '/elastic_cloud_apps/bootstrap-initiator/bootstrap_initiator/prerequisite/tmp'

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

```

---

<div class="post-metadata">

**Author:** ![Alex\_Piggott](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alex_piggott/32/11053_2.png) [@Alex\_Piggott](https://discuss.elastic.co/u/Alex_Piggott)\
**Post date:** [May 4, 2020, 6:17pm UTC](https://discuss.elastic.co/t/rhel-installation-fails-no-such-file-or-directory-elastic-cloud-apps-bootstrap-initiator-bootstrap-initiator-prerequisite-tmp/231011/2 "2020-05-04T18:17:12Z")

</div>

That's odd, it's failing on the last of these 4 lines:

```auto
        tmp_dir = "/elastic_cloud_apps/bootstrap-initiator/bootstrap_initiator/prerequisite/tmp"
        call(["rm", "-rf", tmp_dir], stderr=DEVNULL, stdout=DEVNULL)
        call(["setuser", ece_user, "mkdir", "-p", tmp_dir], stderr=DEVNULL, stdout=DEVNULL)
        uid = getpwuid(stat(tmp_dir).st_uid).pw_name

```

So for some reason `setuser YOUR_USER mkdir -p /elastic_cloud_apps/bootstrap-initiator/bootstrap_initiator/prerequisite/tmp` has (silently) failed.

I'd probably try something like `docker run -it elastic-cloud-enterprise bash`

and then see what happens when you run the `setuser ... mkdir ...`?

---

<div class="post-metadata">

**Author:** ![adam.gantt\_va](https://avatars.discourse-cdn.com/v4/letter/a/6bbea6/32.png) [@adam.gantt\_va](https://discuss.elastic.co/u/adam.gantt_va)\
**Post date:** [May 6, 2020, 6:05pm UTC](https://discuss.elastic.co/t/rhel-installation-fails-no-such-file-or-directory-elastic-cloud-apps-bootstrap-initiator-bootstrap-initiator-prerequisite-tmp/231011/3 "2020-05-06T18:05:30Z")

</div>

I don't have setuser command on this particular image, but I did manually create the `/elastic_cloud_apps/...` directories and verified the permissions are owned by the non-root user performing the install. The same error is displayed after manually creating the folder structure

---

<div class="post-metadata">

**Author:** ![adam.gantt\_va](https://avatars.discourse-cdn.com/v4/letter/a/6bbea6/32.png) [@adam.gantt\_va](https://discuss.elastic.co/u/adam.gantt_va)\
**Post date:** [May 7, 2020, 3:38pm UTC](https://discuss.elastic.co/t/rhel-installation-fails-no-such-file-or-directory-elastic-cloud-apps-bootstrap-initiator-bootstrap-initiator-prerequisite-tmp/231011/4 "2020-05-07T15:38:19Z")

</div>

Looking a little more at your comment, since I don't have setuser command on my RHEL image, is there a way to refactor that call? When I search the install script, I don't see those lines in my version of the script.

---

<div class="post-metadata">

**Author:** ![Alex\_Piggott](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alex_piggott/32/11053_2.png) [@Alex\_Piggott](https://discuss.elastic.co/u/Alex_Piggott)\
**Post date:** [May 7, 2020, 4:07pm UTC](https://discuss.elastic.co/t/rhel-installation-fails-no-such-file-or-directory-elastic-cloud-apps-bootstrap-initiator-bootstrap-initiator-prerequisite-tmp/231011/5 "2020-05-07T16:07:31Z")

</div>

Sorry - `setuser` should have been called within the `docker -it ... bash` session, ie you shouldn't need it in your RHEL

What steps exactly did you take?

---

<div class="post-metadata">

**Author:** ![adam.gantt\_va](https://avatars.discourse-cdn.com/v4/letter/a/6bbea6/32.png) [@adam.gantt\_va](https://discuss.elastic.co/u/adam.gantt_va)\
**Post date:** [May 11, 2020, 2:35pm UTC](https://discuss.elastic.co/t/rhel-installation-fails-no-such-file-or-directory-elastic-cloud-apps-bootstrap-initiator-bootstrap-initiator-prerequisite-tmp/231011/6 "2020-05-11T14:35:18Z")

</div>

> [@Alex\_Piggott](#):
>
> setuser YOUR\_USER mkdir -p /elastic\_cloud\_apps/bootstrap-initiator/bootstrap\_initiator/prerequisite/tmp

Running the `setuser` command in the docker image provided a `user not found` message for the user in my image.

Here are the steps I took:

```auto
[sppdevadmin@azurebasefeb2019 ~]$ docker run -it docker.elastic.co/cloud-enterprise/elastic-cloud-enterprise:2.5.0 bash
[root@d6bf9cc8ef89 /]# ls
anaconda-post.log bin elastic_cloud_apps home lib64 mnt proc run service srv tmp var
app dev etc lib media opt root sbin snapshot-tool sys usr
[root@d6bf9cc8ef89 /]# whoamit
bash: whoamit: command not found
[root@d6bf9cc8ef89 /]# whoami
root
[root@d6bf9cc8ef89 /]# ls elastic_cloud_apps/
adminconsole beats-runner client-observer director jolokia route-server shell zookeeper
allocator blueprint cloud-ui docker-socket-proxy metricbeat run_tests.py stunnel
allocator-metricbeat bootstrap cloud-ui-runner filebeat metricbeat-6.3.2 runner test
beats bootstrap-initiator constructor filebeat-6.3.2 proxy services-forwarder upgrade
beats-6.3.2 client-forwarder curator haproxy proxyv2 services.jar upgrade-initiator
[root@d6bf9cc8ef89 /]# setuser sppdevadmin mkdir -p /elastic_cloud_apps/bootstrap-initiator/bootstrap_initiator/prerequisite/tmp
setuser: user sppdevadmin not found

```

---

<div class="post-metadata">

**Author:** ![Alex\_Piggott](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alex_piggott/32/11053_2.png) [@Alex\_Piggott](https://discuss.elastic.co/u/Alex_Piggott)\
**Post date:** [May 15, 2020, 5:13pm UTC](https://discuss.elastic.co/t/rhel-installation-fails-no-such-file-or-directory-elastic-cloud-apps-bootstrap-initiator-bootstrap-initiator-prerequisite-tmp/231011/7 "2020-05-15T17:13:21Z")

</div>

Hey sorry for the delay

Ah I think you should do

```auto
docker run --env UID=`id -u` \
      --env GID=`id -g` \
   -it docker.elastic.co/cloud-enterprise/elastic-cloud-enterprise:2.5.0 bash

usermod -u 1005 elastic
groupmod - g 1006 elastic
setuser elastic mkdir -p /elastic_cloud_apps/bootstrap-initiator/bootstrap_initiator/prerequisite/tmp

```

---

<div class="post-metadata">

**Author:** ![adam.gantt\_va](https://avatars.discourse-cdn.com/v4/letter/a/6bbea6/32.png) [@adam.gantt\_va](https://discuss.elastic.co/u/adam.gantt_va)\
**Post date:** [May 22, 2020, 3:14pm UTC](https://discuss.elastic.co/t/rhel-installation-fails-no-such-file-or-directory-elastic-cloud-apps-bootstrap-initiator-bootstrap-initiator-prerequisite-tmp/231011/8 "2020-05-22T15:14:27Z")

</div>

Successfully ran the commands you provided,

```auto
[root@7f80107a671e /]# groupmod -g 1006 elastic
[root@7f80107a671e /]# setuser elastic mkdir -p /elastic_cloud_apps/bootstrap-initiator/bootstrap_initiator/prerequisite/tmp
[root@7f80107a671e /]# ls /elastic_cloud_apps/bootstrap-initiator/bootstrap_initiator/prerequisite/tmp/
README.md

```

Logged out of the bash session and ran the elastic setup script again, same error message.  
`FileNotFoundError: [Errno 2] No such file or directory: '/elastic_cloud_apps/bootstrap-initiator/bootstrap_initiator/prerequisite/tmp'`

---

<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:** [June 5, 2020, 3:14pm UTC](https://discuss.elastic.co/t/rhel-installation-fails-no-such-file-or-directory-elastic-cloud-apps-bootstrap-initiator-bootstrap-initiator-prerequisite-tmp/231011/9 "2020-06-05T15:14:27Z")

</div>

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