Error: could not open config file caused by: No such file or directory (os error 2)

executed install.sh and relay can’t start successfully just keep restarting and I check the log :

Generating Relay credentials…
error: could not open config file (file /work/C:/Users/UC/AppData/Local/Temp/config.yml)
caused by: No such file or directory (os error 2)
Cleaning up…

on windows 10

Could you try running this from bash. I’m guessing you are using Cygwin which we are not trying to support.

I am experiencing the exact same issue on windows 10;

running this from bash, and the install logs:

Preformatted text`Checking minimum requirements...
Removing network onpremise_default
Network onpremise_default not found.
Stopping sentry_onpremise_snuba-sessions-consumer_1 ... 

Stopping sentry_onpremise_snuba-consumer_1          ... 

Stopping sentry_onpremise_snuba-replacer_1          ... 

Stopping sentry_onpremise_snuba-api_1               ... 

Stopping sentry_onpremise_snuba-outcomes-consumer_1 ... 

Stopping sentry_onpremise_symbolicator_1            ... 

Stopping sentry_onpremise_smtp_1                    ... 

Stopping sentry_onpremise_postgres_1                ... 

Stopping sentry_onpremise_memcached_1               ... 

Stopping sentry_onpremise_kafka_1                   ... 

Stopping sentry_onpremise_zookeeper_1               ... 

Stopping sentry_onpremise_redis_1                   ... 

Stopping sentry_onpremise_clickhouse_1              ... 

Stopping sentry_onpremise_memcached_1               ... done

Stopping sentry_onpremise_smtp_1                    ... done

Stopping sentry_onpremise_postgres_1                ... done

Stopping sentry_onpremise_symbolicator_1            ... done

Stopping sentry_onpremise_snuba-replacer_1          ... done

Stopping sentry_onpremise_snuba-api_1               ... done

Stopping sentry_onpremise_snuba-outcomes-consumer_1 ... done

Stopping sentry_onpremise_snuba-sessions-consumer_1 ... done

Stopping sentry_onpremise_snuba-consumer_1          ... done

Stopping sentry_onpremise_redis_1                   ... done

Stopping sentry_onpremise_clickhouse_1              ... done

Stopping sentry_onpremise_kafka_1                   ... done

Stopping sentry_onpremise_zookeeper_1               ... done

Removing sentry_onpremise_snuba-sessions-consumer_1 ... 

Removing sentry_onpremise_snuba-consumer_1          ... 

Removing sentry_onpremise_snuba-replacer_1          ... 

Removing sentry_onpremise_snuba-api_1               ... 

Removing sentry_onpremise_snuba-outcomes-consumer_1 ... 

Removing sentry_onpremise_symbolicator_1            ... 

Removing sentry_onpremise_smtp_1                    ... 

Removing sentry_onpremise_postgres_1                ... 

Removing sentry_onpremise_memcached_1               ... 

Removing sentry_onpremise_kafka_1                   ... 

Removing sentry_onpremise_zookeeper_1               ... 

Removing sentry_onpremise_redis_1                   ... 

Removing sentry_onpremise_clickhouse_1              ... 

Removing sentry_onpremise_snuba-consumer_1          ... done

Removing sentry_onpremise_kafka_1                   ... done

Removing sentry_onpremise_snuba-sessions-consumer_1 ... done

Removing sentry_onpremise_postgres_1                ... done

Removing sentry_onpremise_clickhouse_1              ... done

Removing sentry_onpremise_symbolicator_1            ... done

Removing sentry_onpremise_snuba-outcomes-consumer_1 ... done

Removing sentry_onpremise_snuba-replacer_1          ... done

Removing sentry_onpremise_zookeeper_1               ... done

Removing sentry_onpremise_snuba-api_1               ... done

Removing sentry_onpremise_redis_1                   ... done

Removing sentry_onpremise_memcached_1               ... done

Removing sentry_onpremise_smtp_1                    ... done

Removing network sentry_onpremise_default

Creating volumes for persistent storage...
Created sentry-data.
Created sentry-postgres.
Created sentry-redis.
Created sentry-zookeeper.
Created sentry-kafka.
Created sentry-clickhouse.
Created sentry-symbolicator.

Creating sentry/sentry.conf.py...
Creating sentry/config.yml...
Creating sentry/requirements.txt...

Generating secret key...
Secret key written to sentry/config.yml

Fetching and updating Docker images...

Some service image(s) must be built from source by running:
    docker-compose build worker sentry-cleanup ingest-consumer post-process-forwarder cron web snuba-cleanup symbolicator-cleanup
latest: Pulling from getsentry/sentry
Digest: sha256:bb7c6c0664ab65fc24994ad4404c76d41ae870bbdfca562c7ac57d0ccac0b0dd
Status: Image is up to date for getsentry/sentry:latest
docker.io/getsentry/sentry:latest

Building and tagging Docker images...

Building web
Step 1/5 : ARG SENTRY_VERSION=latest
Step 2/5 : ARG SENTRY_IMAGE
Step 3/5 : FROM ${SENTRY_IMAGE:-getsentry/sentry:$SENTRY_VERSION}
---> f1cd90517ac0
Step 4/5 : COPY . /usr/src/sentry
---> Using cache
---> 017bb6d91025
Step 5/5 : RUN if [ -s /usr/src/sentry/requirements.txt ]; then pip install -r /usr/src/sentry/requirements.txt; fi
---> Using cache
---> 484d078e5eb7

Successfully built 484d078e5eb7
Successfully tagged sentry-onpremise-local:latest
smtp uses an image, skipping
memcached uses an image, skipping
redis uses an image, skipping
postgres uses an image, skipping
zookeeper uses an image, skipping
kafka uses an image, skipping
clickhouse uses an image, skipping
snuba-api uses an image, skipping
snuba-consumer uses an image, skipping
snuba-outcomes-consumer uses an image, skipping
snuba-sessions-consumer uses an image, skipping
snuba-replacer uses an image, skipping
symbolicator uses an image, skipping
relay uses an image, skipping
nginx uses an image, skipping
Building snuba-cleanup          ... 

Building symbolicator-cleanup   ... 

Building web                    ... 

Building cron                   ... 

Building worker                 ... 

Building ingest-consumer        ... 

Building post-process-forwarder ... 

Building sentry-cleanup         ... 

Building cron
Building symbolicator-cleanup
Building sentry-cleanup
Building worker
Building snuba-cleanup
Step 1/5 : ARG BASE_IMAGE
Step 2/5 : FROM ${BASE_IMAGE}
---> 484d078e5eb7
Step 3/5 : RUN apt-get update && apt-get install -y --no-install-recommends cron &&     rm -r /var/lib/apt/lists/*
---> Using cache
---> 7011010e6aba
Step 4/5 : COPY entrypoint.sh /entrypoint.sh
---> Using cache
---> 1367798369a3
Step 5/5 : ENTRYPOINT ["/entrypoint.sh"]
---> Using cache
---> b1f04e5d1c97

Successfully built b1f04e5d1c97
Successfully tagged sentry-cleanup-onpremise-local:latest
Building sentry-cleanup         ... done

Building post-process-forwarder
Step 1/5 : ARG BASE_IMAGE
Step 2/5 : FROM ${BASE_IMAGE}
---> 1c99077bb1fc
Step 3/5 : RUN apt-get update && apt-get install -y --no-install-recommends cron &&     rm -r /var/lib/apt/lists/*
---> Using cache
---> 5842ae3a512a
Step 4/5 : COPY entrypoint.sh /entrypoint.sh
---> Using cache
---> f8de73b9907b
Step 5/5 : ENTRYPOINT ["/entrypoint.sh"]
---> Using cache
---> 2b79bde3f190

Successfully built 2b79bde3f190
Step 1/5 : ARG BASE_IMAGE
Step 2/5 : FROM ${BASE_IMAGE}
Step 1/5 : ARG SENTRY_VERSION=latest
Step 2/5 : ARG SENTRY_IMAGE
Step 3/5 : FROM ${SENTRY_IMAGE:-getsentry/sentry:$SENTRY_VERSION}
---> cbd423b970e0
Step 3/5 : RUN apt-get update && apt-get install -y --no-install-recommends cron &&     rm -r /var/lib/apt/lists/*
---> f1cd90517ac0
Step 4/5 : COPY . /usr/src/sentry
---> Using cache
---> 017bb6d91025
Step 5/5 : RUN if [ -s /usr/src/sentry/requirements.txt ]; then pip install -r /usr/src/sentry/requirements.txt; fi
---> Using cache
---> 698381cea95d
Step 4/5 : COPY entrypoint.sh /entrypoint.sh
---> Using cache
---> 0781e5a4f133
Step 5/5 : ENTRYPOINT ["/entrypoint.sh"]
---> Using cache
---> cc69d784c6aa

Successfully built cc69d784c6aa
Successfully tagged symbolicator-cleanup-onpremise-local:latest
Building symbolicator-cleanup   ... done

Building ingest-consumer
Successfully tagged snuba-cleanup-onpremise-local:latest
Building snuba-cleanup          ... done

Building web
---> Using cache
---> 484d078e5eb7

Successfully built 484d078e5eb7
Step 1/5 : ARG SENTRY_VERSION=latest
Step 2/5 : ARG SENTRY_IMAGE
Step 3/5 : FROM ${SENTRY_IMAGE:-getsentry/sentry:$SENTRY_VERSION}
---> f1cd90517ac0
Successfully tagged sentry-onpremise-local:latest
Step 4/5 : COPY . /usr/src/sentry
Building cron                   ... done

---> Using cache
---> 017bb6d91025
Step 5/5 : RUN if [ -s /usr/src/sentry/requirements.txt ]; then pip install -r /usr/src/sentry/requirements.txt; fi
---> Using cache
---> 484d078e5eb7

Successfully built 484d078e5eb7
Successfully tagged sentry-onpremise-local:latest
Building worker                 ... done

Step 1/5 : ARG SENTRY_VERSION=latest
Step 2/5 : ARG SENTRY_IMAGE
Step 3/5 : FROM ${SENTRY_IMAGE:-getsentry/sentry:$SENTRY_VERSION}
---> f1cd90517ac0
Step 4/5 : COPY . /usr/src/sentry
---> Using cache
---> 017bb6d91025
Step 5/5 : RUN if [ -s /usr/src/sentry/requirements.txt ]; then pip install -r /usr/src/sentry/requirements.txt; fi
---> Using cache
---> 484d078e5eb7

Successfully built 484d078e5eb7
Successfully tagged sentry-onpremise-local:latest
Building post-process-forwarder ... done

Step 1/5 : ARG SENTRY_VERSION=latest
Step 2/5 : ARG SENTRY_IMAGE
Step 3/5 : FROM ${SENTRY_IMAGE:-getsentry/sentry:$SENTRY_VERSION}
---> f1cd90517ac0
Step 4/5 : COPY . /usr/src/sentry
---> Using cache
---> 017bb6d91025
Step 5/5 : RUN if [ -s /usr/src/sentry/requirements.txt ]; then pip install -r /usr/src/sentry/requirements.txt; fi
---> Using cache
---> 484d078e5eb7

Successfully built 484d078e5eb7
Successfully tagged sentry-onpremise-local:latest
Building ingest-consumer        ... done

Step 1/5 : ARG SENTRY_VERSION=latest
Step 2/5 : ARG SENTRY_IMAGE
Step 3/5 : FROM ${SENTRY_IMAGE:-getsentry/sentry:$SENTRY_VERSION}
---> f1cd90517ac0
Step 4/5 : COPY . /usr/src/sentry
---> Using cache
---> 017bb6d91025
Step 5/5 : RUN if [ -s /usr/src/sentry/requirements.txt ]; then pip install -r /usr/src/sentry/requirements.txt; fi
---> Using cache
---> 484d078e5eb7

Successfully built 484d078e5eb7
Successfully tagged sentry-onpremise-local:latest
Building web                    ... done


Docker images built.
Creating network "sentry_onpremise_default" with the default driver
Bootstrapping and migrating Snuba...
Creating sentry_onpremise_zookeeper_1 ... 

Creating sentry_onpremise_clickhouse_1 ... 

Creating sentry_onpremise_redis_1      ... 

Creating sentry_onpremise_clickhouse_1 ... done

Creating sentry_onpremise_redis_1      ... done

Creating sentry_onpremise_zookeeper_1  ... done

Creating sentry_onpremise_kafka_1      ... 

Creating sentry_onpremise_kafka_1      ... done

+ '[' b = - ']'
+ snuba bootstrap --help
+ set -- snuba bootstrap --force
+ set gosu snuba snuba bootstrap --force
+ exec gosu snuba snuba bootstrap --force
2020-06-08 03:38:51,624 Connection to Kafka failed (attempt 0)
Traceback (most recent call last):
  File "/usr/src/snuba/snuba/cli/bootstrap.py", line 56, in bootstrap
    client.list_topics(timeout=1)
cimpl.KafkaException: KafkaError{code=_TRANSPORT,val=-195,str="Failed to get metadata: Local: Broker transport failure"}
2020-06-08 03:38:53,631 Connection to Kafka failed (attempt 1)
Traceback (most recent call last):
  File "/usr/src/snuba/snuba/cli/bootstrap.py", line 56, in bootstrap
    client.list_topics(timeout=1)
cimpl.KafkaException: KafkaError{code=_TRANSPORT,val=-195,str="Failed to get metadata: Local: Broker transport failure"}
2020-06-08 03:38:55,633 Connection to Kafka failed (attempt 2)
Traceback (most recent call last):
  File "/usr/src/snuba/snuba/cli/bootstrap.py", line 56, in bootstrap
    client.list_topics(timeout=1)
cimpl.KafkaException: KafkaError{code=_TRANSPORT,val=-195,str="Failed to get metadata: Local: Broker transport failure"}
2020-06-08 03:38:56,747 Failed to create topic outcomes
Traceback (most recent call last):
  File "/usr/src/snuba/snuba/cli/bootstrap.py", line 92, in bootstrap
    future.result()
  File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 435, in result
    return self.__get_result()
  File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
    raise self._exception
cimpl.KafkaException: KafkaError{code=TOPIC_ALREADY_EXISTS,val=36,str="Topic 'outcomes' already exists."}
2020-06-08 03:38:56,749 Failed to create topic cdc
Traceback (most recent call last):
  File "/usr/src/snuba/snuba/cli/bootstrap.py", line 92, in bootstrap
    future.result()
  File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 428, in result
    return self.__get_result()
  File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
    raise self._exception
cimpl.KafkaException: KafkaError{code=TOPIC_ALREADY_EXISTS,val=36,str="Topic 'cdc' already exists."}
2020-06-08 03:38:56,749 Failed to create topic events
Traceback (most recent call last):
  File "/usr/src/snuba/snuba/cli/bootstrap.py", line 92, in bootstrap
    future.result()
  File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 428, in result
    return self.__get_result()
  File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
    raise self._exception
cimpl.KafkaException: KafkaError{code=TOPIC_ALREADY_EXISTS,val=36,str="Topic 'events' already exists."}
2020-06-08 03:38:56,749 Failed to create topic event-replacements
Traceback (most recent call last):
  File "/usr/src/snuba/snuba/cli/bootstrap.py", line 92, in bootstrap
    future.result()
  File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 428, in result
    return self.__get_result()
  File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
    raise self._exception
cimpl.KafkaException: KafkaError{code=TOPIC_ALREADY_EXISTS,val=36,str="Topic 'event-replacements' already exists."}
2020-06-08 03:38:56,749 Failed to create topic snuba-commit-log
Traceback (most recent call last):
  File "/usr/src/snuba/snuba/cli/bootstrap.py", line 92, in bootstrap
    future.result()
  File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 428, in result
    return self.__get_result()
  File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
    raise self._exception
cimpl.KafkaException: KafkaError{code=TOPIC_ALREADY_EXISTS,val=36,str="Topic 'snuba-commit-log' already exists."}
2020-06-08 03:38:56,750 Failed to create topic ingest-sessions
Traceback (most recent call last):
  File "/usr/src/snuba/snuba/cli/bootstrap.py", line 92, in bootstrap
    future.result()
  File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 428, in result
    return self.__get_result()
  File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
    raise self._exception
cimpl.KafkaException: KafkaError{code=TOPIC_ALREADY_EXISTS,val=36,str="Topic 'ingest-sessions' already exists."}
2020-06-08 03:38:56,750 Failed to create topic errors-replacements
Traceback (most recent call last):
  File "/usr/src/snuba/snuba/cli/bootstrap.py", line 92, in bootstrap
    future.result()
  File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 428, in result
    return self.__get_result()
  File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
    raise self._exception
cimpl.KafkaException: KafkaError{code=TOPIC_ALREADY_EXISTS,val=36,str="Topic 'errors-replacements' already exists."}
2020-06-08 03:38:56,768 Creating tables for storage events
2020-06-08 03:38:56,772 Migrating storage events
2020-06-08 03:38:56,813 Creating tables for storage errors
2020-06-08 03:38:56,817 Migrating storage errors
2020-06-08 03:38:56,849 Creating tables for storage groupedmessages
2020-06-08 03:38:56,851 Migrating storage groupedmessages
2020-06-08 03:38:56,860 Creating tables for storage groupassignees
2020-06-08 03:38:56,862 Migrating storage groupassignees
2020-06-08 03:38:56,869 Creating tables for storage outcomes_raw
2020-06-08 03:38:56,871 Migrating storage outcomes_raw
2020-06-08 03:38:56,879 Creating tables for storage outcomes_hourly
2020-06-08 03:38:56,883 Migrating storage outcomes_hourly
2020-06-08 03:38:56,886 Creating tables for storage sessions_raw
2020-06-08 03:38:56,888 Migrating storage sessions_raw
2020-06-08 03:38:56,897 Creating tables for storage sessions_hourly
2020-06-08 03:38:56,902 Migrating storage sessions_hourly
2020-06-08 03:38:56,910 Creating tables for storage transactions
2020-06-08 03:38:56,913 Migrating storage transactions


Setting up database...
Starting sentry_onpremise_redis_1 ... 

Starting sentry_onpremise_redis_1 ... done

Starting sentry_onpremise_zookeeper_1 ... 

Starting sentry_onpremise_zookeeper_1 ... done

Creating sentry_onpremise_postgres_1  ... 

Starting sentry_onpremise_clickhouse_1 ... 

Starting sentry_onpremise_clickhouse_1 ... done

Starting sentry_onpremise_kafka_1      ... 

Creating sentry_onpremise_symbolicator_1 ... 

Starting sentry_onpremise_kafka_1        ... done

Creating sentry_onpremise_smtp_1         ... 

Creating sentry_onpremise_snuba-replacer_1 ... 

Creating sentry_onpremise_snuba-consumer_1 ... 

Creating sentry_onpremise_snuba-outcomes-consumer_1 ... 

Creating sentry_onpremise_snuba-sessions-consumer_1 ... 

Creating sentry_onpremise_memcached_1               ... 

Creating sentry_onpremise_snuba-api_1               ... 

Creating sentry_onpremise_postgres_1                ... done

Creating sentry_onpremise_snuba-sessions-consumer_1 ... done

Creating sentry_onpremise_snuba-consumer_1          ... done

Creating sentry_onpremise_snuba-api_1               ... done

Creating sentry_onpremise_smtp_1                    ... done

Creating sentry_onpremise_symbolicator_1            ... done

Creating sentry_onpremise_memcached_1               ... done

Creating sentry_onpremise_snuba-outcomes-consumer_1 ... done

Creating sentry_onpremise_snuba-replacer_1          ... done

03:39:07 [WARNING] sentry.utils.geo: settings.GEOIP_PATH_MMDB not configured.
03:39:16 [INFO] sentry.plugins.github: apps-not-configured
Operations to perform:
  Apply all migrations: admin, auth, contenttypes, jira_ac, nodestore, sentry, sessions, sites, social_auth
Running migrations:
  No migrations to apply.
Creating missing DSNs
Correcting Group.num_comments counter

Generating Relay credentials...
error: could not open config file (file /work/C:/Users/ircloud/AppData/Local/Temp/config.yml)
  caused by: No such file or directory (os error 2)
Cleaning up...

Is this bash from WSL or Cygwin? The $(pwd) command seems to be producing incorrect paths for your enviroenment.