mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[GH-ISSUE #4291] [bug]: Installation error under OpenShift #1562
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#1562
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @cyberjpb1 on GitHub (Aug 23, 2024).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/4291
Is there an existing issue for this?
Current behavior
When I try to install the container image (hoppscotch/hoppscotch) under OpenShift, I get the following error:
node:fs:596
handleErrorFromBinding(ctx);
^
Error: EACCES: permission denied, open 'build.env'
at Object.openSync (node:fs:596:3)
at Object.writeFileSync (node:fs:2322:35)
at file:///usr/src/app/aio_run.mjs:46:4
at ModuleJob.run (node:internal/modules/esm/module_job:195:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:336:24)
at async loadESM (node:internal/process/esm_loader:34:7)
at async handleMainPromise (node:internal/modules/run_main:106:12) {
errno: -13,
syscall: 'open',
code: 'EACCES',
path: 'build.env'
}
Node.js v18.19.0
Steps to reproduce
oc new-project hoppscotch
oc new-app hoppscotch/hoppscotch
Environment
Production
Version
Self-hosted
@AndrewBastin commented on GitHub (Aug 24, 2024):
@cyberjpb1 Can you confirm this issue is present with 2024.7.2 ?
@cyberjpb1 commented on GitHub (Aug 24, 2024):
@AndrewBastin Yes, I confirm this issue is present with 2024.7.2 version.
Here is the error message :
node:fs:2368
return binding.writeFileUtf8(
^
Error: EACCES: permission denied, open 'build.env'
at Object.writeFileSync (node:fs:2368:20)
at file:///usr/src/app/aio_run.mjs:46:4
at ModuleJob.run (node:internal/modules/esm/module_job:234:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:473:24)
at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:123:5) {
errno: -13,
code: 'EACCES',
syscall: 'open',
path: 'build.env'
}
Node.js v20.17.0
@cyberjpb1 commented on GitHub (Sep 19, 2024):
It seems that in the container image, an attempt is made to write a file to a folder that is not allowed by default because under OpenShift the pod never runs as root.
Do you have any suggestion for a solution?
@AndrewBastin commented on GitHub (Sep 19, 2024):
@cyberjpb1 along with the issue of the folder, another issue we are dealing with is that we are using port 80 within the container as the port through which users can interact with the container.
We are planning on introducing a new environment variable named
ROOTLESSwhich when set will introduce an alternate port and this should make it more friendly for rootless systems like Podman and OpenShift.You can expect this to be done on the release which should be out by the end of the month.
@cyberjpb1 commented on GitHub (Sep 19, 2024):
@AndrewBastin Thanks for the information, it is much appreciated.
@szymek07 commented on GitHub (Nov 20, 2024):
@AndrewBastin there is any update about running on OpenShift?
@cyberjpb1 commented on GitHub (Nov 20, 2024):
@szymek07 I tried the latest version of the image (hopscotch/hoppscotch:2024.10.2) and I still have the same error.
@cyberjpb1 commented on GitHub (Dec 30, 2024):
@liyasthomas You have released several versions since this bug was reported. Will you be providing a fix soon or is this not a priority for you?
node:fs:2367
return binding.writeFileUtf8(
^
Error: EACCES: permission denied, open 'build.env'
at Object.writeFileSync (node:fs:2367:20)
at file:///usr/src/app/aio_run.mjs:46:4
at ModuleJob.run (node:internal/modules/esm/module_job:234:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:473:24)
at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:122:5) {
errno: -13,
code: 'EACCES',
syscall: 'open',
path: 'build.env'
}
Node.js v20.18.1
@turguns commented on GitHub (Apr 2, 2025):
Hi @cyberjpb1 @AndrewBastin @szymek07 @abraham @silentmatt
I encountered the same issue when trying to install the Hoppscotch container image on OpenShift. The error is caused by permission restrictions preventing access to build.env.
Solution
I resolved this by granting the anyuid security context constraint (SCC) to the Hoppscotch service account. Here’s the applied configuration:
`apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
annotations:
labels:
app.kubernetes.io/instance: hoppscotch
name: hoppscotch-sa-anyuid
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: system:openshift:scc:anyuid
subjects:
name: hoppscotch-sa
namespace: hoppscotch`
BTW. for me namespace name is hoppscotch..change it according to your naming
@cyberjpb1 commented on GitHub (Apr 6, 2025):
@turguns Thanks for your solution, it seems to work but I think that just installing from the image is not enough, I seem to be missing some environment variables.
How are you installing? Are you using a Helm Chart?
@turguns commented on GitHub (Apr 6, 2025):
@cyberjpb1 I'm not using Helm, just plain deployment files. I'm sharing all the files. For the database, we're using CloudNativePG, and the manifest files for the database are coming from there.
@cyberjpb1 commented on GitHub (Jul 1, 2025):
@turguns Thank you very much. With the information you provided and by adding the following environment variables, I was able to perform a working installation:
MICROSOFT_CLIENT_ID
MICROSOFT_CLIENT_SECRET
MICROSOFT_TENANT_ID
MICROSOFT_TENANT
DATA_ENCRYPTION_KEY
JWT_SECRET
I must say that I also had to perform a database migration.