mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[GH-ISSUE #3378] [bug]: Cannot start backend container beyond Initialize PubSub due to ELIFECYCLE Command failed. #1127
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#1127
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 @Coniface on GitHub (Sep 21, 2023).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/3378
Is there an existing issue for this?
Current behavior
When I try to install hoppscotch according to the documentation, the image
hoppscotch/hoppscotch-backendsystematically crashes during startup. Here are the logs I get:I already tried:
I always get the same issue although the log is slightly different with the AIO image:
I know the connection to the DB is correct since I managed to run prisma migrations and the schema updated accordingly.
I would expect the service to start with no error.
Steps to reproduce
Environment
Production
Version
Self-hosted
@balub commented on GitHub (Sep 25, 2023):
Hey @Coniface could you provide the following things it could hopefully help in identifying the issue since this is something we cannot really reproduce on our end.
In case you are building the containers, can you try it after clearing your cache and deleting the
node_modulesin thehoppscotch-backendpackage and also thedistfolder in the same package.@Coniface commented on GitHub (Sep 25, 2023):
Hey @balub thanks for the reply
The host machine has 64GB of RAM with a good 30GB available upon starting.
Here is my docker version:
Docker version 24.0.6, build ed223bcI experienced the issue with the image from DockerHub. I tried again to build the image and it did work this time, but I'd rather install a prebuilt image from DockerHub than have to build it myself at each update.
I noticed a thing though, the prebuilt image works if I bind the backend to a dockerized PostgreSQL cluster of the compose network.
If I try to connect to my packaged-installed DB, then the problem occurs.
I insist that the configuration is correct because I use this method with other containers flawlessly. Also, I managed to apply Prisma migrations through the hoppscotch-backend container, it simply won't start for some reason.
I examined the code in debug mode and it seems that the await $prisma.connect() is called right after the subscription to PubSub. I looked into Prisma to see if it could be related to it and here is the closest I could find https://github.com/prisma/prisma/issues/15678
So I'm wondering if it could be related to the config of the prisma client? I suppose your prebuilt image downloads the alpine binary client for prisma whereas my current build (as I ran pnpm i on the host and provide the modules to the container through a bind volume) must have the Debian binary client?
@motienko commented on GitHub (Oct 3, 2023):
I have same issue , running docker image locally with 8 core and 61G RAM free. (tag 2023.8.1)
Just after starting container got
Initialize PubSub
ELIFECYCLE Command failed.
UPD. v3.0.1 started ok
@Igorgro commented on GitHub (Oct 5, 2023):
@motienko what is v3.0.1?
@Igorgro commented on GitHub (Oct 8, 2023):
Wanted to self-host Hoppscotch instead of Insomnia, but got stuck with this too(
@Anandesh-Sharma commented on GitHub (Oct 11, 2023):
any update???? I am also getting the same issue
@bkiro-sportstech commented on GitHub (Oct 12, 2023):
I am getting this issue in Linux(Amazon Linux 2 and Ubuntu) and Windows 11. however it works perfectly fine on MacOS (2023 M2: Sonoma)
@Igorgro commented on GitHub (Oct 12, 2023):
It's interesting, how Hoppscotch team runs cloud version, so they don't encounter this issue
@BeloCraft commented on GitHub (Oct 13, 2023):
I catch the same problem using postgresql 14. When I use version 12 or 13 everything is fine.
@AprilNEA commented on GitHub (Oct 19, 2023):
As with this one, postgresql 15
@pankajmyt commented on GitHub (Oct 19, 2023):
Happening with both postgresql 12, 15.
Docker version
24.0.6, build ed223bcDebian 11 8 cpu, 16gb ram
tried docker AIO and individual backend containers. Docker image tags
https://hub.docker.com/r/hoppscotch/hoppscotch
Postgres is installed locally outside the docker. I am using this command to start
add host so that docker can connect to Postgres running outside docker on host machine
Update
Tested on Debian 10, 11, 12. Same issue with docker hub images
Tried building image from repo source. Same issue
@pankajmyt commented on GitHub (Oct 20, 2023):
What has worked for me is
another issue is emails don't go with AWS SES SMTP creds, so had to update the mailer code to use ses transport.
@bieblebrox commented on GitHub (Oct 23, 2023):
Hi 👋
Experienced the same bug with Postgres 14 & the backend image from docker cloud.
I can confirm @pankajmyt findings that building hoppscotch-backend image from source (current main) works.
@perfectra1n commented on GitHub (Oct 30, 2023):
Using Postgres 14, and built the AIO container from scratch. It still just crashes :)

@pankajmyt commented on GitHub (Oct 31, 2023):
you need to build backend container from source. and use frontend/admin docker images
@perfectra1n commented on GitHub (Oct 31, 2023):
Hi @pankajmyt, what commands did you use to build just the backend container? I only see the production Dockerfile that builds all 3 parts AIO.
@pankajmyt commented on GitHub (Oct 31, 2023):
@perfectra1n commented on GitHub (Oct 31, 2023):
Ah, I see that now. That’s annoying, it’s under “ packages/hoppscotch-backend/Dockerfile”. Thanks!
@perfectra1n commented on GitHub (Oct 31, 2023):
The full command that I had to use was:
Now I just have to crack the Davinci code to understand how these containers go together, or why the


frontendcontainer is also running the admin endpoint?This stuff was not ready for the prime time lol
@ostiwe commented on GitHub (Nov 10, 2023):
same, with postgresql 14 not working
@willhughes-au commented on GitHub (Nov 24, 2023):
Still not fixed as of tag
2023.8.4(which was pushed ~9 days ago as of this comment)@domints commented on GitHub (Dec 12, 2023):
Still same, Postgres 14 as well, image latest (resolved to
2023.8.4at the moment).As @pankajmyt suggested, building backend image straight from git repo works, it doesn't crash anymore, but that's suboptimal solution.
@glyalin commented on GitHub (Dec 12, 2023):
I have managed to connect with Postgres 14 in my dev environment. But i have built the backend image from docker image. The problem is if you use DockerProd.dockerfile
You should change it for node:18-alpine3.19 and it's connecting with external DB.
Node:18-alpine3.16 connected without problems with dockerized PG instance, but not to external DB...
@balub commented on GitHub (Jan 11, 2024):
Closing Issue as fix merged in release
2023.12.1.