[GH-ISSUE #3378] [bug]: Cannot start backend container beyond Initialize PubSub due to ELIFECYCLE  Command failed. #1127

Closed
opened 2026-03-16 18:45:01 +03:00 by kerem · 24 comments
Owner

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?

  • I have searched the existing issues

Current behavior

When I try to install hoppscotch according to the documentation, the image hoppscotch/hoppscotch-backend systematically crashes during startup. Here are the logs I get:

hoppscotch-backend   | 
hoppscotch-backend   | > hoppscotch-backend@2023.8.1 start:prod /usr/src/app/packages/hoppscotch-backend
hoppscotch-backend   | > node dist/main
hoppscotch-backend   | 
hoppscotch-backend   | Running in production: true
hoppscotch-backend   | Port: 3170
hoppscotch-backend   | [Nest] 18  - 09/21/2023, 9:13:02 AM     LOG [NestFactory] Starting Nest application...
hoppscotch-backend   | [Nest] 18  - 09/21/2023, 9:13:02 AM     LOG [InstanceLoader] PubSubModule dependencies initialized +67ms
hoppscotch-backend   | [Nest] 18  - 09/21/2023, 9:13:02 AM     LOG [InstanceLoader] PrismaModule dependencies initialized +1ms
hoppscotch-backend   | [Nest] 18  - 09/21/2023, 9:13:02 AM     LOG [InstanceLoader] MailerModule dependencies initialized +0ms
hoppscotch-backend   | [Nest] 18  - 09/21/2023, 9:13:02 AM     LOG [InstanceLoader] PassportModule dependencies initialized +1ms
hoppscotch-backend   | [Nest] 18  - 09/21/2023, 9:13:02 AM     LOG [InstanceLoader] ThrottlerModule dependencies initialized +1ms
hoppscotch-backend   | [Nest] 18  - 09/21/2023, 9:13:02 AM     LOG [InstanceLoader] JwtModule dependencies initialized +0ms
hoppscotch-backend   | [Nest] 18  - 09/21/2023, 9:13:02 AM     LOG [InstanceLoader] MailerCoreModule dependencies initialized +1ms
hoppscotch-backend   | [Nest] 18  - 09/21/2023, 9:13:02 AM     LOG [InstanceLoader] MailerModule dependencies initialized +3ms
hoppscotch-backend   | [Nest] 18  - 09/21/2023, 9:13:02 AM     LOG [InstanceLoader] AppModule dependencies initialized +1ms
hoppscotch-backend   | [Nest] 18  - 09/21/2023, 9:13:02 AM     LOG [InstanceLoader] UserModule dependencies initialized +5ms
hoppscotch-backend   | [Nest] 18  - 09/21/2023, 9:13:02 AM     LOG [InstanceLoader] UserSettingsModule dependencies initialized +0ms
hoppscotch-backend   | [Nest] 18  - 09/21/2023, 9:13:02 AM     LOG [InstanceLoader] UserEnvironmentsModule dependencies initialized +1ms
hoppscotch-backend   | [Nest] 18  - 09/21/2023, 9:13:02 AM     LOG [InstanceLoader] UserHistoryModule dependencies initialized +1ms
hoppscotch-backend   | [Nest] 18  - 09/21/2023, 9:13:02 AM     LOG [InstanceLoader] UserCollectionModule dependencies initialized +0ms
hoppscotch-backend   | [Nest] 18  - 09/21/2023, 9:13:02 AM     LOG [InstanceLoader] TeamEnvironmentsModule dependencies initialized +1ms
hoppscotch-backend   | [Nest] 18  - 09/21/2023, 9:13:02 AM     LOG [InstanceLoader] TeamCollectionModule dependencies initialized +0ms
hoppscotch-backend   | [Nest] 18  - 09/21/2023, 9:13:02 AM     LOG [InstanceLoader] GraphQLSchemaBuilderModule dependencies initialized +1ms
hoppscotch-backend   | [Nest] 18  - 09/21/2023, 9:13:02 AM     LOG [InstanceLoader] UserRequestModule dependencies initialized +1ms
hoppscotch-backend   | [Nest] 18  - 09/21/2023, 9:13:02 AM     LOG [InstanceLoader] TeamModule dependencies initialized +1ms
hoppscotch-backend   | [Nest] 18  - 09/21/2023, 9:13:02 AM     LOG [InstanceLoader] ShortcodeModule dependencies initialized +1ms
hoppscotch-backend   | [Nest] 18  - 09/21/2023, 9:13:02 AM     LOG [InstanceLoader] AuthModule dependencies initialized +1ms
hoppscotch-backend   | [Nest] 18  - 09/21/2023, 9:13:02 AM     LOG [InstanceLoader] TeamInvitationModule dependencies initialized +0ms
hoppscotch-backend   | [Nest] 18  - 09/21/2023, 9:13:02 AM     LOG [InstanceLoader] TeamRequestModule dependencies initialized +1ms
hoppscotch-backend   | [Nest] 18  - 09/21/2023, 9:13:02 AM     LOG [InstanceLoader] GraphQLModule dependencies initialized +0ms
hoppscotch-backend   | [Nest] 18  - 09/21/2023, 9:13:02 AM     LOG [InstanceLoader] AdminModule dependencies initialized +1ms
hoppscotch-backend   | Thu, 21 Sep 2023 09:13:02 GMT express-session deprecated undefined resave option; provide resave option at dist/main.js:16:13
hoppscotch-backend   | Thu, 21 Sep 2023 09:13:02 GMT express-session deprecated undefined saveUninitialized option; provide saveUninitialized option at dist/main.js:16:13
hoppscotch-backend   | Enabling CORS with production settings
hoppscotch-backend   | [Nest] 18  - 09/21/2023, 9:13:02 AM     LOG [RoutesResolver] AppController {/ping}: +11ms
hoppscotch-backend   | [Nest] 18  - 09/21/2023, 9:13:02 AM     LOG [RouterExplorer] Mapped {/ping, GET} route +3ms
hoppscotch-backend   | [Nest] 18  - 09/21/2023, 9:13:02 AM     LOG [RoutesResolver] AuthController {/auth} (version: 1): +0ms
hoppscotch-backend   | [Nest] 18  - 09/21/2023, 9:13:02 AM     LOG [RouterExplorer] Mapped {/auth/signin, POST} (version: 1) route +2ms
hoppscotch-backend   | [Nest] 18  - 09/21/2023, 9:13:02 AM     LOG [RouterExplorer] Mapped {/auth/verify, POST} (version: 1) route +1ms
hoppscotch-backend   | [Nest] 18  - 09/21/2023, 9:13:02 AM     LOG [RouterExplorer] Mapped {/auth/refresh, GET} (version: 1) route +1ms
hoppscotch-backend   | [Nest] 18  - 09/21/2023, 9:13:02 AM     LOG [RouterExplorer] Mapped {/auth/google, GET} (version: 1) route +1ms
hoppscotch-backend   | [Nest] 18  - 09/21/2023, 9:13:02 AM     LOG [RouterExplorer] Mapped {/auth/google/callback, GET} (version: 1) route +0ms
hoppscotch-backend   | [Nest] 18  - 09/21/2023, 9:13:02 AM     LOG [RouterExplorer] Mapped {/auth/github, GET} (version: 1) route +1ms
hoppscotch-backend   | [Nest] 18  - 09/21/2023, 9:13:02 AM     LOG [RouterExplorer] Mapped {/auth/github/callback, GET} (version: 1) route +1ms
hoppscotch-backend   | [Nest] 18  - 09/21/2023, 9:13:02 AM     LOG [RouterExplorer] Mapped {/auth/microsoft, GET} (version: 1) route +1ms
hoppscotch-backend   | [Nest] 18  - 09/21/2023, 9:13:02 AM     LOG [RouterExplorer] Mapped {/auth/microsoft/callback, GET} (version: 1) route +1ms
hoppscotch-backend   | [Nest] 18  - 09/21/2023, 9:13:02 AM     LOG [RouterExplorer] Mapped {/auth/logout, GET} (version: 1) route +1ms
hoppscotch-backend   | [Nest] 18  - 09/21/2023, 9:13:02 AM     LOG [RouterExplorer] Mapped {/auth/verify/admin, GET} (version: 1) route +0ms
hoppscotch-backend   | Initialize PubSub
hoppscotch-backend   |  ELIFECYCLE  Command failed.
hoppscotch-backend exited with code 0

I already tried:

  • to check all issues for a solution, the closest being https://github.com/hoppscotch/hoppscotch/issues/3321 but I don't experience a segfault, only the ELIFECYCLE Command Failed.
  • running the AIO image.
  • building the image locally and running it.
  • building the AIO image locally and running it.

I always get the same issue although the log is slightly different with the AIO image:

hoppscotch  | Backend Server | > hoppscotch-backend@2023.8.1 start:prod /usr/src/app/packages/hoppscotch-backend
hoppscotch  | Backend Server | > node dist/main
hoppscotch  | Backend Server | Running in production: true
hoppscotch  | Backend Server | Port: 3170
hoppscotch  | Backend Server | [Nest] 59  - 09/21/2023, 9:05:57 AM     LOG [NestFactory] Starting Nest application...
hoppscotch  | Backend Server | [Nest] 59  - 09/21/2023, 9:05:57 AM     LOG [InstanceLoader] PubSubModule dependencies initialized +77ms
hoppscotch  | Backend Server | [Nest] 59  - 09/21/2023, 9:05:57 AM     LOG [InstanceLoader] PrismaModule dependencies initialized +0ms
hoppscotch  | Backend Server | [Nest] 59  - 09/21/2023, 9:05:57 AM     LOG [InstanceLoader] MailerModule dependencies initialized +1ms
hoppscotch  | Backend Server | [Nest] 59  - 09/21/2023, 9:05:57 AM     LOG [InstanceLoader] PassportModule dependencies initialized +0ms
hoppscotch  | Backend Server | [Nest] 59  - 09/21/2023, 9:05:57 AM     LOG [InstanceLoader] ThrottlerModule dependencies initialized +2ms
hoppscotch  | Backend Server | [Nest] 59  - 09/21/2023, 9:05:57 AM     LOG [InstanceLoader] JwtModule dependencies initialized +0ms
hoppscotch  | Backend Server | [Nest] 59  - 09/21/2023, 9:05:57 AM     LOG [InstanceLoader] MailerCoreModule dependencies initialized +0ms
hoppscotch  | Backend Server | [Nest] 59  - 09/21/2023, 9:05:57 AM     LOG [InstanceLoader] MailerModule dependencies initialized +3ms
hoppscotch  | Backend Server | [Nest] 59  - 09/21/2023, 9:05:57 AM     LOG [InstanceLoader] AppModule dependencies initialized +1ms
hoppscotch  | Backend Server | [Nest] 59  - 09/21/2023, 9:05:57 AM     LOG [InstanceLoader] UserModule dependencies initialized +5ms
hoppscotch  | Backend Server | [Nest] 59  - 09/21/2023, 9:05:57 AM     LOG [InstanceLoader] UserSettingsModule dependencies initialized +1ms
hoppscotch  | Backend Server | [Nest] 59  - 09/21/2023, 9:05:57 AM     LOG [InstanceLoader] UserEnvironmentsModule dependencies initialized +0ms
hoppscotch  | Backend Server | [Nest] 59  - 09/21/2023, 9:05:57 AM     LOG [InstanceLoader] UserHistoryModule dependencies initialized +1ms
hoppscotch  | Backend Server | [Nest] 59  - 09/21/2023, 9:05:57 AM     LOG [InstanceLoader] UserCollectionModule dependencies initialized +0ms
hoppscotch  | Backend Server | [Nest] 59  - 09/21/2023, 9:05:57 AM     LOG [InstanceLoader] TeamEnvironmentsModule dependencies initialized +1ms
hoppscotch  | Backend Server | [Nest] 59  - 09/21/2023, 9:05:57 AM     LOG [InstanceLoader] TeamCollectionModule dependencies initialized +0ms
hoppscotch  | Backend Server | [Nest] 59  - 09/21/2023, 9:05:57 AM     LOG [InstanceLoader] GraphQLSchemaBuilderModule dependencies initialized +1ms
hoppscotch  | Backend Server | [Nest] 59  - 09/21/2023, 9:05:57 AM     LOG [InstanceLoader] UserRequestModule dependencies initialized +1ms
hoppscotch  | Backend Server | [Nest] 59  - 09/21/2023, 9:05:57 AM     LOG [InstanceLoader] TeamModule dependencies initialized +1ms
hoppscotch  | Backend Server | [Nest] 59  - 09/21/2023, 9:05:57 AM     LOG [InstanceLoader] ShortcodeModule dependencies initialized +1ms
hoppscotch  | Backend Server | [Nest] 59  - 09/21/2023, 9:05:57 AM     LOG [InstanceLoader] AuthModule dependencies initialized +0ms
hoppscotch  | Backend Server | [Nest] 59  - 09/21/2023, 9:05:57 AM     LOG [InstanceLoader] TeamInvitationModule dependencies initialized +1ms
hoppscotch  | Backend Server | [Nest] 59  - 09/21/2023, 9:05:57 AM     LOG [InstanceLoader] TeamRequestModule dependencies initialized +1ms
hoppscotch  | Backend Server | [Nest] 59  - 09/21/2023, 9:05:57 AM     LOG [InstanceLoader] GraphQLModule dependencies initialized +0ms
hoppscotch  | Backend Server | [Nest] 59  - 09/21/2023, 9:05:57 AM     LOG [InstanceLoader] AdminModule dependencies initialized +1ms
hoppscotch  | Backend Server | Thu, 21 Sep 2023 09:05:57 GMT express-session deprecated undefined resave option; provide resave option at dist/main.js:16:13
hoppscotch  | Backend Server | Thu, 21 Sep 2023 09:05:57 GMT express-session deprecated undefined saveUninitialized option; provide saveUninitialized option at dist/main.js:16:13
hoppscotch  | Backend Server | Enabling CORS with production settings
hoppscotch  | Backend Server | [Nest] 59  - 09/21/2023, 9:05:57 AM     LOG [RoutesResolver] AppController {/ping}: +12ms
hoppscotch  | Backend Server | [Nest] 59  - 09/21/2023, 9:05:57 AM     LOG [RouterExplorer] Mapped {/ping, GET} route +3ms
hoppscotch  | Backend Server | [Nest] 59  - 09/21/2023, 9:05:57 AM     LOG [RoutesResolver] AuthController {/auth} (version: 1): +1ms
hoppscotch  | Backend Server | [Nest] 59  - 09/21/2023, 9:05:57 AM     LOG [RouterExplorer] Mapped {/auth/signin, POST} (version: 1) route +2ms
hoppscotch  | Backend Server | [Nest] 59  - 09/21/2023, 9:05:57 AM     LOG [RouterExplorer] Mapped {/auth/verify, POST} (version: 1) route +1ms
hoppscotch  | Backend Server | [Nest] 59  - 09/21/2023, 9:05:57 AM     LOG [RouterExplorer] Mapped {/auth/refresh, GET} (version: 1) route +1ms
hoppscotch  | Backend Server | [Nest] 59  - 09/21/2023, 9:05:57 AM     LOG [RouterExplorer] Mapped {/auth/google, GET} (version: 1) route +0ms
hoppscotch  | Backend Server | [Nest] 59  - 09/21/2023, 9:05:57 AM     LOG [RouterExplorer] Mapped {/auth/google/callback, GET} (version: 1) route +1ms
hoppscotch  | Backend Server | [Nest] 59  - 09/21/2023, 9:05:57 AM     LOG [RouterExplorer] Mapped {/auth/github, GET} (version: 1) route +1ms
hoppscotch  | Backend Server | [Nest] 59  - 09/21/2023, 9:05:57 AM     LOG [RouterExplorer] Mapped {/auth/github/callback, GET} (version: 1) route +0ms
hoppscotch  | Backend Server | [Nest] 59  - 09/21/2023, 9:05:57 AM     LOG [RouterExplorer] Mapped {/auth/microsoft, GET} (version: 1) route +2ms
hoppscotch  | Backend Server | [Nest] 59  - 09/21/2023, 9:05:57 AM     LOG [RouterExplorer] Mapped {/auth/microsoft/callback, GET} (version: 1) route +1ms
hoppscotch  | Backend Server | [Nest] 59  - 09/21/2023, 9:05:57 AM     LOG [RouterExplorer] Mapped {/auth/logout, GET} (version: 1) route +1ms
hoppscotch  | Backend Server | [Nest] 59  - 09/21/2023, 9:05:57 AM     LOG [RouterExplorer] Mapped {/auth/verify/admin, GET} (version: 1) route +0ms
hoppscotch  | Backend Server | Initialize PubSub
hoppscotch  | Exiting process because Backend Server exited with code null
hoppscotch exited with code 0

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

  1. Follow the installation doc https://docs.hoppscotch.io/documentation/self-host/community-edition/install-and-build
  2. Experience the crash upon starting the backend container

Environment

Production

Version

Self-hosted

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? - [X] I have searched the existing issues ### Current behavior When I try to install hoppscotch according to the documentation, the image `hoppscotch/hoppscotch-backend` systematically crashes during startup. Here are the logs I get: ```log hoppscotch-backend | hoppscotch-backend | > hoppscotch-backend@2023.8.1 start:prod /usr/src/app/packages/hoppscotch-backend hoppscotch-backend | > node dist/main hoppscotch-backend | hoppscotch-backend | Running in production: true hoppscotch-backend | Port: 3170 hoppscotch-backend | [Nest] 18 - 09/21/2023, 9:13:02 AM LOG [NestFactory] Starting Nest application... hoppscotch-backend | [Nest] 18 - 09/21/2023, 9:13:02 AM LOG [InstanceLoader] PubSubModule dependencies initialized +67ms hoppscotch-backend | [Nest] 18 - 09/21/2023, 9:13:02 AM LOG [InstanceLoader] PrismaModule dependencies initialized +1ms hoppscotch-backend | [Nest] 18 - 09/21/2023, 9:13:02 AM LOG [InstanceLoader] MailerModule dependencies initialized +0ms hoppscotch-backend | [Nest] 18 - 09/21/2023, 9:13:02 AM LOG [InstanceLoader] PassportModule dependencies initialized +1ms hoppscotch-backend | [Nest] 18 - 09/21/2023, 9:13:02 AM LOG [InstanceLoader] ThrottlerModule dependencies initialized +1ms hoppscotch-backend | [Nest] 18 - 09/21/2023, 9:13:02 AM LOG [InstanceLoader] JwtModule dependencies initialized +0ms hoppscotch-backend | [Nest] 18 - 09/21/2023, 9:13:02 AM LOG [InstanceLoader] MailerCoreModule dependencies initialized +1ms hoppscotch-backend | [Nest] 18 - 09/21/2023, 9:13:02 AM LOG [InstanceLoader] MailerModule dependencies initialized +3ms hoppscotch-backend | [Nest] 18 - 09/21/2023, 9:13:02 AM LOG [InstanceLoader] AppModule dependencies initialized +1ms hoppscotch-backend | [Nest] 18 - 09/21/2023, 9:13:02 AM LOG [InstanceLoader] UserModule dependencies initialized +5ms hoppscotch-backend | [Nest] 18 - 09/21/2023, 9:13:02 AM LOG [InstanceLoader] UserSettingsModule dependencies initialized +0ms hoppscotch-backend | [Nest] 18 - 09/21/2023, 9:13:02 AM LOG [InstanceLoader] UserEnvironmentsModule dependencies initialized +1ms hoppscotch-backend | [Nest] 18 - 09/21/2023, 9:13:02 AM LOG [InstanceLoader] UserHistoryModule dependencies initialized +1ms hoppscotch-backend | [Nest] 18 - 09/21/2023, 9:13:02 AM LOG [InstanceLoader] UserCollectionModule dependencies initialized +0ms hoppscotch-backend | [Nest] 18 - 09/21/2023, 9:13:02 AM LOG [InstanceLoader] TeamEnvironmentsModule dependencies initialized +1ms hoppscotch-backend | [Nest] 18 - 09/21/2023, 9:13:02 AM LOG [InstanceLoader] TeamCollectionModule dependencies initialized +0ms hoppscotch-backend | [Nest] 18 - 09/21/2023, 9:13:02 AM LOG [InstanceLoader] GraphQLSchemaBuilderModule dependencies initialized +1ms hoppscotch-backend | [Nest] 18 - 09/21/2023, 9:13:02 AM LOG [InstanceLoader] UserRequestModule dependencies initialized +1ms hoppscotch-backend | [Nest] 18 - 09/21/2023, 9:13:02 AM LOG [InstanceLoader] TeamModule dependencies initialized +1ms hoppscotch-backend | [Nest] 18 - 09/21/2023, 9:13:02 AM LOG [InstanceLoader] ShortcodeModule dependencies initialized +1ms hoppscotch-backend | [Nest] 18 - 09/21/2023, 9:13:02 AM LOG [InstanceLoader] AuthModule dependencies initialized +1ms hoppscotch-backend | [Nest] 18 - 09/21/2023, 9:13:02 AM LOG [InstanceLoader] TeamInvitationModule dependencies initialized +0ms hoppscotch-backend | [Nest] 18 - 09/21/2023, 9:13:02 AM LOG [InstanceLoader] TeamRequestModule dependencies initialized +1ms hoppscotch-backend | [Nest] 18 - 09/21/2023, 9:13:02 AM LOG [InstanceLoader] GraphQLModule dependencies initialized +0ms hoppscotch-backend | [Nest] 18 - 09/21/2023, 9:13:02 AM LOG [InstanceLoader] AdminModule dependencies initialized +1ms hoppscotch-backend | Thu, 21 Sep 2023 09:13:02 GMT express-session deprecated undefined resave option; provide resave option at dist/main.js:16:13 hoppscotch-backend | Thu, 21 Sep 2023 09:13:02 GMT express-session deprecated undefined saveUninitialized option; provide saveUninitialized option at dist/main.js:16:13 hoppscotch-backend | Enabling CORS with production settings hoppscotch-backend | [Nest] 18 - 09/21/2023, 9:13:02 AM LOG [RoutesResolver] AppController {/ping}: +11ms hoppscotch-backend | [Nest] 18 - 09/21/2023, 9:13:02 AM LOG [RouterExplorer] Mapped {/ping, GET} route +3ms hoppscotch-backend | [Nest] 18 - 09/21/2023, 9:13:02 AM LOG [RoutesResolver] AuthController {/auth} (version: 1): +0ms hoppscotch-backend | [Nest] 18 - 09/21/2023, 9:13:02 AM LOG [RouterExplorer] Mapped {/auth/signin, POST} (version: 1) route +2ms hoppscotch-backend | [Nest] 18 - 09/21/2023, 9:13:02 AM LOG [RouterExplorer] Mapped {/auth/verify, POST} (version: 1) route +1ms hoppscotch-backend | [Nest] 18 - 09/21/2023, 9:13:02 AM LOG [RouterExplorer] Mapped {/auth/refresh, GET} (version: 1) route +1ms hoppscotch-backend | [Nest] 18 - 09/21/2023, 9:13:02 AM LOG [RouterExplorer] Mapped {/auth/google, GET} (version: 1) route +1ms hoppscotch-backend | [Nest] 18 - 09/21/2023, 9:13:02 AM LOG [RouterExplorer] Mapped {/auth/google/callback, GET} (version: 1) route +0ms hoppscotch-backend | [Nest] 18 - 09/21/2023, 9:13:02 AM LOG [RouterExplorer] Mapped {/auth/github, GET} (version: 1) route +1ms hoppscotch-backend | [Nest] 18 - 09/21/2023, 9:13:02 AM LOG [RouterExplorer] Mapped {/auth/github/callback, GET} (version: 1) route +1ms hoppscotch-backend | [Nest] 18 - 09/21/2023, 9:13:02 AM LOG [RouterExplorer] Mapped {/auth/microsoft, GET} (version: 1) route +1ms hoppscotch-backend | [Nest] 18 - 09/21/2023, 9:13:02 AM LOG [RouterExplorer] Mapped {/auth/microsoft/callback, GET} (version: 1) route +1ms hoppscotch-backend | [Nest] 18 - 09/21/2023, 9:13:02 AM LOG [RouterExplorer] Mapped {/auth/logout, GET} (version: 1) route +1ms hoppscotch-backend | [Nest] 18 - 09/21/2023, 9:13:02 AM LOG [RouterExplorer] Mapped {/auth/verify/admin, GET} (version: 1) route +0ms hoppscotch-backend | Initialize PubSub hoppscotch-backend |  ELIFECYCLE  Command failed. hoppscotch-backend exited with code 0 ``` I already tried: - to check all issues for a solution, the closest being https://github.com/hoppscotch/hoppscotch/issues/3321 but I don't experience a segfault, only the ELIFECYCLE Command Failed. - running the AIO image. - building the image locally and running it. - building the AIO image locally and running it. I always get the same issue although the log is slightly different with the AIO image: ```log hoppscotch | Backend Server | > hoppscotch-backend@2023.8.1 start:prod /usr/src/app/packages/hoppscotch-backend hoppscotch | Backend Server | > node dist/main hoppscotch | Backend Server | Running in production: true hoppscotch | Backend Server | Port: 3170 hoppscotch | Backend Server | [Nest] 59 - 09/21/2023, 9:05:57 AM LOG [NestFactory] Starting Nest application... hoppscotch | Backend Server | [Nest] 59 - 09/21/2023, 9:05:57 AM LOG [InstanceLoader] PubSubModule dependencies initialized +77ms hoppscotch | Backend Server | [Nest] 59 - 09/21/2023, 9:05:57 AM LOG [InstanceLoader] PrismaModule dependencies initialized +0ms hoppscotch | Backend Server | [Nest] 59 - 09/21/2023, 9:05:57 AM LOG [InstanceLoader] MailerModule dependencies initialized +1ms hoppscotch | Backend Server | [Nest] 59 - 09/21/2023, 9:05:57 AM LOG [InstanceLoader] PassportModule dependencies initialized +0ms hoppscotch | Backend Server | [Nest] 59 - 09/21/2023, 9:05:57 AM LOG [InstanceLoader] ThrottlerModule dependencies initialized +2ms hoppscotch | Backend Server | [Nest] 59 - 09/21/2023, 9:05:57 AM LOG [InstanceLoader] JwtModule dependencies initialized +0ms hoppscotch | Backend Server | [Nest] 59 - 09/21/2023, 9:05:57 AM LOG [InstanceLoader] MailerCoreModule dependencies initialized +0ms hoppscotch | Backend Server | [Nest] 59 - 09/21/2023, 9:05:57 AM LOG [InstanceLoader] MailerModule dependencies initialized +3ms hoppscotch | Backend Server | [Nest] 59 - 09/21/2023, 9:05:57 AM LOG [InstanceLoader] AppModule dependencies initialized +1ms hoppscotch | Backend Server | [Nest] 59 - 09/21/2023, 9:05:57 AM LOG [InstanceLoader] UserModule dependencies initialized +5ms hoppscotch | Backend Server | [Nest] 59 - 09/21/2023, 9:05:57 AM LOG [InstanceLoader] UserSettingsModule dependencies initialized +1ms hoppscotch | Backend Server | [Nest] 59 - 09/21/2023, 9:05:57 AM LOG [InstanceLoader] UserEnvironmentsModule dependencies initialized +0ms hoppscotch | Backend Server | [Nest] 59 - 09/21/2023, 9:05:57 AM LOG [InstanceLoader] UserHistoryModule dependencies initialized +1ms hoppscotch | Backend Server | [Nest] 59 - 09/21/2023, 9:05:57 AM LOG [InstanceLoader] UserCollectionModule dependencies initialized +0ms hoppscotch | Backend Server | [Nest] 59 - 09/21/2023, 9:05:57 AM LOG [InstanceLoader] TeamEnvironmentsModule dependencies initialized +1ms hoppscotch | Backend Server | [Nest] 59 - 09/21/2023, 9:05:57 AM LOG [InstanceLoader] TeamCollectionModule dependencies initialized +0ms hoppscotch | Backend Server | [Nest] 59 - 09/21/2023, 9:05:57 AM LOG [InstanceLoader] GraphQLSchemaBuilderModule dependencies initialized +1ms hoppscotch | Backend Server | [Nest] 59 - 09/21/2023, 9:05:57 AM LOG [InstanceLoader] UserRequestModule dependencies initialized +1ms hoppscotch | Backend Server | [Nest] 59 - 09/21/2023, 9:05:57 AM LOG [InstanceLoader] TeamModule dependencies initialized +1ms hoppscotch | Backend Server | [Nest] 59 - 09/21/2023, 9:05:57 AM LOG [InstanceLoader] ShortcodeModule dependencies initialized +1ms hoppscotch | Backend Server | [Nest] 59 - 09/21/2023, 9:05:57 AM LOG [InstanceLoader] AuthModule dependencies initialized +0ms hoppscotch | Backend Server | [Nest] 59 - 09/21/2023, 9:05:57 AM LOG [InstanceLoader] TeamInvitationModule dependencies initialized +1ms hoppscotch | Backend Server | [Nest] 59 - 09/21/2023, 9:05:57 AM LOG [InstanceLoader] TeamRequestModule dependencies initialized +1ms hoppscotch | Backend Server | [Nest] 59 - 09/21/2023, 9:05:57 AM LOG [InstanceLoader] GraphQLModule dependencies initialized +0ms hoppscotch | Backend Server | [Nest] 59 - 09/21/2023, 9:05:57 AM LOG [InstanceLoader] AdminModule dependencies initialized +1ms hoppscotch | Backend Server | Thu, 21 Sep 2023 09:05:57 GMT express-session deprecated undefined resave option; provide resave option at dist/main.js:16:13 hoppscotch | Backend Server | Thu, 21 Sep 2023 09:05:57 GMT express-session deprecated undefined saveUninitialized option; provide saveUninitialized option at dist/main.js:16:13 hoppscotch | Backend Server | Enabling CORS with production settings hoppscotch | Backend Server | [Nest] 59 - 09/21/2023, 9:05:57 AM LOG [RoutesResolver] AppController {/ping}: +12ms hoppscotch | Backend Server | [Nest] 59 - 09/21/2023, 9:05:57 AM LOG [RouterExplorer] Mapped {/ping, GET} route +3ms hoppscotch | Backend Server | [Nest] 59 - 09/21/2023, 9:05:57 AM LOG [RoutesResolver] AuthController {/auth} (version: 1): +1ms hoppscotch | Backend Server | [Nest] 59 - 09/21/2023, 9:05:57 AM LOG [RouterExplorer] Mapped {/auth/signin, POST} (version: 1) route +2ms hoppscotch | Backend Server | [Nest] 59 - 09/21/2023, 9:05:57 AM LOG [RouterExplorer] Mapped {/auth/verify, POST} (version: 1) route +1ms hoppscotch | Backend Server | [Nest] 59 - 09/21/2023, 9:05:57 AM LOG [RouterExplorer] Mapped {/auth/refresh, GET} (version: 1) route +1ms hoppscotch | Backend Server | [Nest] 59 - 09/21/2023, 9:05:57 AM LOG [RouterExplorer] Mapped {/auth/google, GET} (version: 1) route +0ms hoppscotch | Backend Server | [Nest] 59 - 09/21/2023, 9:05:57 AM LOG [RouterExplorer] Mapped {/auth/google/callback, GET} (version: 1) route +1ms hoppscotch | Backend Server | [Nest] 59 - 09/21/2023, 9:05:57 AM LOG [RouterExplorer] Mapped {/auth/github, GET} (version: 1) route +1ms hoppscotch | Backend Server | [Nest] 59 - 09/21/2023, 9:05:57 AM LOG [RouterExplorer] Mapped {/auth/github/callback, GET} (version: 1) route +0ms hoppscotch | Backend Server | [Nest] 59 - 09/21/2023, 9:05:57 AM LOG [RouterExplorer] Mapped {/auth/microsoft, GET} (version: 1) route +2ms hoppscotch | Backend Server | [Nest] 59 - 09/21/2023, 9:05:57 AM LOG [RouterExplorer] Mapped {/auth/microsoft/callback, GET} (version: 1) route +1ms hoppscotch | Backend Server | [Nest] 59 - 09/21/2023, 9:05:57 AM LOG [RouterExplorer] Mapped {/auth/logout, GET} (version: 1) route +1ms hoppscotch | Backend Server | [Nest] 59 - 09/21/2023, 9:05:57 AM LOG [RouterExplorer] Mapped {/auth/verify/admin, GET} (version: 1) route +0ms hoppscotch | Backend Server | Initialize PubSub hoppscotch | Exiting process because Backend Server exited with code null hoppscotch exited with code 0 ``` 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 1. Follow the installation doc https://docs.hoppscotch.io/documentation/self-host/community-edition/install-and-build 2. Experience the crash upon starting the backend container ### Environment Production ### Version Self-hosted
kerem 2026-03-16 18:45:01 +03:00
Author
Owner

@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.

  • How much RAM does the host machine have?
  • Which version of docker you are using?
    In case you are building the containers, can you try it after clearing your cache and deleting the node_modules in the hoppscotch-backend package and also the dist folder in the same package.
<!-- gh-comment-id:1733102619 --> @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. - How much RAM does the host machine have? - Which version of docker you are using? In case you are building the containers, can you try it after clearing your cache and deleting the `node_modules` in the `hoppscotch-backend` package and also the `dist` folder in the same package.
Author
Owner

@Coniface commented on GitHub (Sep 25, 2023):

Hey @balub thanks for the reply

  • How much RAM does the host machine have?

The host machine has 64GB of RAM with a good 30GB available upon starting.

  • Which version of docker you are using?

Here is my docker version:
Docker version 24.0.6, build ed223bc


I 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?

<!-- gh-comment-id:1733345061 --> @Coniface commented on GitHub (Sep 25, 2023): Hey @balub thanks for the reply > * How much RAM does the host machine have? The host machine has 64GB of RAM with a good 30GB available upon starting. > * Which version of docker you are using? Here is my docker version: `Docker version 24.0.6, build ed223bc` ----- I 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?
Author
Owner

@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

<!-- gh-comment-id:1744765547 --> @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
Author
Owner

@Igorgro commented on GitHub (Oct 5, 2023):

@motienko what is v3.0.1?

<!-- gh-comment-id:1749600197 --> @Igorgro commented on GitHub (Oct 5, 2023): @motienko what is v3.0.1?
Author
Owner

@Igorgro commented on GitHub (Oct 8, 2023):

Wanted to self-host Hoppscotch instead of Insomnia, but got stuck with this too(

<!-- gh-comment-id:1752106815 --> @Igorgro commented on GitHub (Oct 8, 2023): Wanted to self-host Hoppscotch instead of Insomnia, but got stuck with this too(
Author
Owner

@Anandesh-Sharma commented on GitHub (Oct 11, 2023):

any update???? I am also getting the same issue

<!-- gh-comment-id:1758144332 --> @Anandesh-Sharma commented on GitHub (Oct 11, 2023): any update???? I am also getting the same issue
Author
Owner

@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)

<!-- gh-comment-id:1759318685 --> @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)
Author
Owner

@Igorgro commented on GitHub (Oct 12, 2023):

It's interesting, how Hoppscotch team runs cloud version, so they don't encounter this issue

<!-- gh-comment-id:1759345541 --> @Igorgro commented on GitHub (Oct 12, 2023): It's interesting, how Hoppscotch team runs cloud version, so they don't encounter this issue
Author
Owner

@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.

<!-- gh-comment-id:1761477100 --> @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.
Author
Owner

@AprilNEA commented on GitHub (Oct 19, 2023):

As with this one, postgresql 15

<!-- gh-comment-id:1769869819 --> @AprilNEA commented on GitHub (Oct 19, 2023): As with this one, postgresql 15
Author
Owner

@pankajmyt commented on GitHub (Oct 19, 2023):

Happening with both postgresql 12, 15.

Docker version 24.0.6, build ed223bc
Debian 11 8 cpu, 16gb ram

tried docker AIO and individual backend containers. Docker image tags

  • 2023.8.2
  • 2023.8.1
  • 2023.8.0

https://hub.docker.com/r/hoppscotch/hoppscotch

Postgres is installed locally outside the docker. I am using this command to start

docker run  --add-host=host.docker.internal:host-gateway  -p 3000:3000 -p 3100:3100 -p 3170:3170 --env-file .env hoppscotch/hoppscotch:2023.8.0

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

<!-- gh-comment-id:1770770117 --> @pankajmyt commented on GitHub (Oct 19, 2023): Happening with both postgresql 12, 15. Docker version `24.0.6, build ed223bc` Debian 11 8 cpu, 16gb ram tried docker AIO and individual backend containers. Docker image tags * 2023.8.2 * 2023.8.1 * 2023.8.0 https://hub.docker.com/r/hoppscotch/hoppscotch Postgres is installed locally outside the docker. I am using this command to start ```bash docker run --add-host=host.docker.internal:host-gateway -p 3000:3000 -p 3100:3100 -p 3170:3170 --env-file .env hoppscotch/hoppscotch:2023.8.0 ``` 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
Author
Owner

@pankajmyt commented on GitHub (Oct 20, 2023):

What has worked for me is

  1. using frontend & admin images from docker hub
  2. building backend image from source repo

another issue is emails don't go with AWS SES SMTP creds, so had to update the mailer code to use ses transport.

<!-- gh-comment-id:1772878416 --> @pankajmyt commented on GitHub (Oct 20, 2023): What has worked for me is 1. using frontend & admin images from docker hub 2. building backend image from source repo another issue is emails don't go with AWS SES SMTP creds, so had to update the mailer code to use ses transport.
Author
Owner

@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.

<!-- gh-comment-id:1775425232 --> @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.
Author
Owner

@perfectra1n commented on GitHub (Oct 30, 2023):

Using Postgres 14, and built the AIO container from scratch. It still just crashes :)
image

App/Admin Dashboard Caddy | {"level":"info","ts":1698703775.5149598,"msg":"using provided configuration","config_file":"/etc/caddy/Caddyfile","config_adapter":"caddyfile"}
App/Admin Dashboard Caddy | {"level":"warn","ts":1698703775.5157526,"msg":"Caddyfile input is not formatted; run the 'caddy fmt' command to fix inconsistencies","adapter":"caddyfile","file":"/etc/caddy/Caddyfile","line":2}
App/Admin Dashboard Caddy | {"level":"info","ts":1698703775.5165324,"logger":"admin","msg":"admin endpoint started","address":"tcp/localhost:2019","enforce_origin":false,"origins":["//localhost:2019","//[::1]:2019","//127.0.0.1:2019"]}
App/Admin Dashboard Caddy | {"level":"info","ts":1698703775.5167634,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc0003f01c0"}
App/Admin Dashboard Caddy | {"level":"info","ts":1698703775.516916,"logger":"tls","msg":"cleaning storage unit","description":"FileStorage:/root/.local/share/caddy"}
App/Admin Dashboard Caddy | {"level":"info","ts":1698703775.5169723,"logger":"tls","msg":"finished cleaning storage units"}
App/Admin Dashboard Caddy | {"level":"info","ts":1698703775.5171938,"msg":"autosaved config (load with --resume flag)","file":"/root/.config/caddy/autosave.json"}
App/Admin Dashboard Caddy | {"level":"info","ts":1698703775.5172045,"msg":"serving initial configuration"}
Backend Server | > hoppscotch-backend@2023.8.2 start:prod /usr/src/app/packages/hoppscotch-backend
Backend Server | > node dist/main
Backend Server | Running in production: true
Backend Server | Port: 3170
Backend Server | [Nest] 57  - 10/30/2023, 10:09:38 PM     LOG [NestFactory] Starting Nest application...
Backend Server | [Nest] 57  - 10/30/2023, 10:09:38 PM     LOG [InstanceLoader] PubSubModule dependencies initialized +197ms
Backend Server | [Nest] 57  - 10/30/2023, 10:09:38 PM     LOG [InstanceLoader] PrismaModule dependencies initialized +1ms
Backend Server | [Nest] 57  - 10/30/2023, 10:09:38 PM     LOG [InstanceLoader] MailerModule dependencies initialized +0ms
Backend Server | [Nest] 57  - 10/30/2023, 10:09:38 PM     LOG [InstanceLoader] PassportModule dependencies initialized +1ms
Backend Server | [Nest] 57  - 10/30/2023, 10:09:38 PM     LOG [InstanceLoader] ThrottlerModule dependencies initialized +1ms
Backend Server | [Nest] 57  - 10/30/2023, 10:09:38 PM     LOG [InstanceLoader] JwtModule dependencies initialized +1ms
Backend Server | [Nest] 57  - 10/30/2023, 10:09:38 PM     LOG [InstanceLoader] MailerCoreModule dependencies initialized +0ms
Backend Server | [Nest] 57  - 10/30/2023, 10:09:38 PM     LOG [InstanceLoader] MailerModule dependencies initialized +4ms
Backend Server | [Nest] 57  - 10/30/2023, 10:09:38 PM     LOG [InstanceLoader] AppModule dependencies initialized +1ms
Backend Server | [Nest] 57  - 10/30/2023, 10:09:38 PM     LOG [InstanceLoader] UserModule dependencies initialized +5ms
Backend Server | [Nest] 57  - 10/30/2023, 10:09:38 PM     LOG [InstanceLoader] UserSettingsModule dependencies initialized +1ms
Backend Server | [Nest] 57  - 10/30/2023, 10:09:38 PM     LOG [InstanceLoader] UserEnvironmentsModule dependencies initialized +1ms
Backend Server | [Nest] 57  - 10/30/2023, 10:09:38 PM     LOG [InstanceLoader] UserHistoryModule dependencies initialized +1ms
Backend Server | [Nest] 57  - 10/30/2023, 10:09:38 PM     LOG [InstanceLoader] UserCollectionModule dependencies initialized +0ms
Backend Server | [Nest] 57  - 10/30/2023, 10:09:38 PM     LOG [InstanceLoader] TeamEnvironmentsModule dependencies initialized +1ms
Backend Server | [Nest] 57  - 10/30/2023, 10:09:38 PM     LOG [InstanceLoader] TeamCollectionModule dependencies initialized +1ms
Backend Server | [Nest] 57  - 10/30/2023, 10:09:38 PM     LOG [InstanceLoader] GraphQLSchemaBuilderModule dependencies initialized +0ms
Backend Server | [Nest] 57  - 10/30/2023, 10:09:38 PM     LOG [InstanceLoader] UserRequestModule dependencies initialized +2ms
Backend Server | [Nest] 57  - 10/30/2023, 10:09:38 PM     LOG [InstanceLoader] TeamModule dependencies initialized +1ms
Backend Server | [Nest] 57  - 10/30/2023, 10:09:38 PM     LOG [InstanceLoader] ShortcodeModule dependencies initialized +1ms
Backend Server | [Nest] 57  - 10/30/2023, 10:09:38 PM     LOG [InstanceLoader] AuthModule dependencies initialized +1ms
Backend Server | [Nest] 57  - 10/30/2023, 10:09:38 PM     LOG [InstanceLoader] TeamInvitationModule dependencies initialized +1ms
Backend Server | [Nest] 57  - 10/30/2023, 10:09:38 PM     LOG [InstanceLoader] TeamRequestModule dependencies initialized +1ms
Backend Server | [Nest] 57  - 10/30/2023, 10:09:38 PM     LOG [InstanceLoader] GraphQLModule dependencies initialized +1ms
Backend Server | [Nest] 57  - 10/30/2023, 10:09:38 PM     LOG [InstanceLoader] AdminModule dependencies initialized +1ms
Backend Server | Mon, 30 Oct 2023 22:09:38 GMT express-session deprecated undefined resave option; provide resave option at dist/main.js:16:13
Backend Server | Mon, 30 Oct 2023 22:09:38 GMT express-session deprecated undefined saveUninitialized option; provide saveUninitialized option at dist/main.js:16:13
Backend Server | Enabling CORS with production settings
Backend Server | [Nest] 57  - 10/30/2023, 10:09:38 PM     LOG [RoutesResolver] AppController {/ping}: +13ms
Backend Server | [Nest] 57  - 10/30/2023, 10:09:38 PM     LOG [RouterExplorer] Mapped {/ping, GET} route +3ms
Backend Server | [Nest] 57  - 10/30/2023, 10:09:38 PM     LOG [RoutesResolver] AuthController {/auth} (version: 1): +1ms
Backend Server | [Nest] 57  - 10/30/2023, 10:09:38 PM     LOG [RouterExplorer] Mapped {/auth/signin, POST} (version: 1) route +2ms
Backend Server | [Nest] 57  - 10/30/2023, 10:09:38 PM     LOG [RouterExplorer] Mapped {/auth/verify, POST} (version: 1) route +1ms
Backend Server | [Nest] 57  - 10/30/2023, 10:09:38 PM     LOG [RouterExplorer] Mapped {/auth/refresh, GET} (version: 1) route +1ms
Backend Server | [Nest] 57  - 10/30/2023, 10:09:38 PM     LOG [RouterExplorer] Mapped {/auth/google, GET} (version: 1) route +0ms
Backend Server | [Nest] 57  - 10/30/2023, 10:09:38 PM     LOG [RouterExplorer] Mapped {/auth/google/callback, GET} (version: 1) route +1ms
Backend Server | [Nest] 57  - 10/30/2023, 10:09:38 PM     LOG [RouterExplorer] Mapped {/auth/github, GET} (version: 1) route +1ms
Backend Server | [Nest] 57  - 10/30/2023, 10:09:38 PM     LOG [RouterExplorer] Mapped {/auth/github/callback, GET} (version: 1) route +1ms
Backend Server | [Nest] 57  - 10/30/2023, 10:09:38 PM     LOG [RouterExplorer] Mapped {/auth/microsoft, GET} (version: 1) route +2ms
Backend Server | [Nest] 57  - 10/30/2023, 10:09:38 PM     LOG [RouterExplorer] Mapped {/auth/microsoft/callback, GET} (version: 1) route +1ms
Backend Server | [Nest] 57  - 10/30/2023, 10:09:38 PM     LOG [RouterExplorer] Mapped {/auth/logout, GET} (version: 1) route +0ms
Backend Server | [Nest] 57  - 10/30/2023, 10:09:38 PM     LOG [RouterExplorer] Mapped {/auth/verify/admin, GET} (version: 1) route +1ms
Backend Server | Initialize PubSub
Exiting process because Backend Server exited with code null
<!-- gh-comment-id:1786126002 --> @perfectra1n commented on GitHub (Oct 30, 2023): Using Postgres 14, and built the AIO container from scratch. It still just crashes :) ![image](https://github.com/hoppscotch/hoppscotch/assets/2390633/91a58447-5d97-4467-9d2c-e4fad78aa200) ``` App/Admin Dashboard Caddy | {"level":"info","ts":1698703775.5149598,"msg":"using provided configuration","config_file":"/etc/caddy/Caddyfile","config_adapter":"caddyfile"} App/Admin Dashboard Caddy | {"level":"warn","ts":1698703775.5157526,"msg":"Caddyfile input is not formatted; run the 'caddy fmt' command to fix inconsistencies","adapter":"caddyfile","file":"/etc/caddy/Caddyfile","line":2} App/Admin Dashboard Caddy | {"level":"info","ts":1698703775.5165324,"logger":"admin","msg":"admin endpoint started","address":"tcp/localhost:2019","enforce_origin":false,"origins":["//localhost:2019","//[::1]:2019","//127.0.0.1:2019"]} App/Admin Dashboard Caddy | {"level":"info","ts":1698703775.5167634,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc0003f01c0"} App/Admin Dashboard Caddy | {"level":"info","ts":1698703775.516916,"logger":"tls","msg":"cleaning storage unit","description":"FileStorage:/root/.local/share/caddy"} App/Admin Dashboard Caddy | {"level":"info","ts":1698703775.5169723,"logger":"tls","msg":"finished cleaning storage units"} App/Admin Dashboard Caddy | {"level":"info","ts":1698703775.5171938,"msg":"autosaved config (load with --resume flag)","file":"/root/.config/caddy/autosave.json"} App/Admin Dashboard Caddy | {"level":"info","ts":1698703775.5172045,"msg":"serving initial configuration"} Backend Server | > hoppscotch-backend@2023.8.2 start:prod /usr/src/app/packages/hoppscotch-backend Backend Server | > node dist/main Backend Server | Running in production: true Backend Server | Port: 3170 Backend Server | [Nest] 57 - 10/30/2023, 10:09:38 PM  LOG [NestFactory] Starting Nest application... Backend Server | [Nest] 57 - 10/30/2023, 10:09:38 PM  LOG [InstanceLoader] PubSubModule dependencies initialized +197ms Backend Server | [Nest] 57 - 10/30/2023, 10:09:38 PM  LOG [InstanceLoader] PrismaModule dependencies initialized +1ms Backend Server | [Nest] 57 - 10/30/2023, 10:09:38 PM  LOG [InstanceLoader] MailerModule dependencies initialized +0ms Backend Server | [Nest] 57 - 10/30/2023, 10:09:38 PM  LOG [InstanceLoader] PassportModule dependencies initialized +1ms Backend Server | [Nest] 57 - 10/30/2023, 10:09:38 PM  LOG [InstanceLoader] ThrottlerModule dependencies initialized +1ms Backend Server | [Nest] 57 - 10/30/2023, 10:09:38 PM  LOG [InstanceLoader] JwtModule dependencies initialized +1ms Backend Server | [Nest] 57 - 10/30/2023, 10:09:38 PM  LOG [InstanceLoader] MailerCoreModule dependencies initialized +0ms Backend Server | [Nest] 57 - 10/30/2023, 10:09:38 PM  LOG [InstanceLoader] MailerModule dependencies initialized +4ms Backend Server | [Nest] 57 - 10/30/2023, 10:09:38 PM  LOG [InstanceLoader] AppModule dependencies initialized +1ms Backend Server | [Nest] 57 - 10/30/2023, 10:09:38 PM  LOG [InstanceLoader] UserModule dependencies initialized +5ms Backend Server | [Nest] 57 - 10/30/2023, 10:09:38 PM  LOG [InstanceLoader] UserSettingsModule dependencies initialized +1ms Backend Server | [Nest] 57 - 10/30/2023, 10:09:38 PM  LOG [InstanceLoader] UserEnvironmentsModule dependencies initialized +1ms Backend Server | [Nest] 57 - 10/30/2023, 10:09:38 PM  LOG [InstanceLoader] UserHistoryModule dependencies initialized +1ms Backend Server | [Nest] 57 - 10/30/2023, 10:09:38 PM  LOG [InstanceLoader] UserCollectionModule dependencies initialized +0ms Backend Server | [Nest] 57 - 10/30/2023, 10:09:38 PM  LOG [InstanceLoader] TeamEnvironmentsModule dependencies initialized +1ms Backend Server | [Nest] 57 - 10/30/2023, 10:09:38 PM  LOG [InstanceLoader] TeamCollectionModule dependencies initialized +1ms Backend Server | [Nest] 57 - 10/30/2023, 10:09:38 PM  LOG [InstanceLoader] GraphQLSchemaBuilderModule dependencies initialized +0ms Backend Server | [Nest] 57 - 10/30/2023, 10:09:38 PM  LOG [InstanceLoader] UserRequestModule dependencies initialized +2ms Backend Server | [Nest] 57 - 10/30/2023, 10:09:38 PM  LOG [InstanceLoader] TeamModule dependencies initialized +1ms Backend Server | [Nest] 57 - 10/30/2023, 10:09:38 PM  LOG [InstanceLoader] ShortcodeModule dependencies initialized +1ms Backend Server | [Nest] 57 - 10/30/2023, 10:09:38 PM  LOG [InstanceLoader] AuthModule dependencies initialized +1ms Backend Server | [Nest] 57 - 10/30/2023, 10:09:38 PM  LOG [InstanceLoader] TeamInvitationModule dependencies initialized +1ms Backend Server | [Nest] 57 - 10/30/2023, 10:09:38 PM  LOG [InstanceLoader] TeamRequestModule dependencies initialized +1ms Backend Server | [Nest] 57 - 10/30/2023, 10:09:38 PM  LOG [InstanceLoader] GraphQLModule dependencies initialized +1ms Backend Server | [Nest] 57 - 10/30/2023, 10:09:38 PM  LOG [InstanceLoader] AdminModule dependencies initialized +1ms Backend Server | Mon, 30 Oct 2023 22:09:38 GMT express-session deprecated undefined resave option; provide resave option at dist/main.js:16:13 Backend Server | Mon, 30 Oct 2023 22:09:38 GMT express-session deprecated undefined saveUninitialized option; provide saveUninitialized option at dist/main.js:16:13 Backend Server | Enabling CORS with production settings Backend Server | [Nest] 57 - 10/30/2023, 10:09:38 PM  LOG [RoutesResolver] AppController {/ping}: +13ms Backend Server | [Nest] 57 - 10/30/2023, 10:09:38 PM  LOG [RouterExplorer] Mapped {/ping, GET} route +3ms Backend Server | [Nest] 57 - 10/30/2023, 10:09:38 PM  LOG [RoutesResolver] AuthController {/auth} (version: 1): +1ms Backend Server | [Nest] 57 - 10/30/2023, 10:09:38 PM  LOG [RouterExplorer] Mapped {/auth/signin, POST} (version: 1) route +2ms Backend Server | [Nest] 57 - 10/30/2023, 10:09:38 PM  LOG [RouterExplorer] Mapped {/auth/verify, POST} (version: 1) route +1ms Backend Server | [Nest] 57 - 10/30/2023, 10:09:38 PM  LOG [RouterExplorer] Mapped {/auth/refresh, GET} (version: 1) route +1ms Backend Server | [Nest] 57 - 10/30/2023, 10:09:38 PM  LOG [RouterExplorer] Mapped {/auth/google, GET} (version: 1) route +0ms Backend Server | [Nest] 57 - 10/30/2023, 10:09:38 PM  LOG [RouterExplorer] Mapped {/auth/google/callback, GET} (version: 1) route +1ms Backend Server | [Nest] 57 - 10/30/2023, 10:09:38 PM  LOG [RouterExplorer] Mapped {/auth/github, GET} (version: 1) route +1ms Backend Server | [Nest] 57 - 10/30/2023, 10:09:38 PM  LOG [RouterExplorer] Mapped {/auth/github/callback, GET} (version: 1) route +1ms Backend Server | [Nest] 57 - 10/30/2023, 10:09:38 PM  LOG [RouterExplorer] Mapped {/auth/microsoft, GET} (version: 1) route +2ms Backend Server | [Nest] 57 - 10/30/2023, 10:09:38 PM  LOG [RouterExplorer] Mapped {/auth/microsoft/callback, GET} (version: 1) route +1ms Backend Server | [Nest] 57 - 10/30/2023, 10:09:38 PM  LOG [RouterExplorer] Mapped {/auth/logout, GET} (version: 1) route +0ms Backend Server | [Nest] 57 - 10/30/2023, 10:09:38 PM  LOG [RouterExplorer] Mapped {/auth/verify/admin, GET} (version: 1) route +1ms Backend Server | Initialize PubSub Exiting process because Backend Server exited with code null ```
Author
Owner

@pankajmyt commented on GitHub (Oct 31, 2023):

you need to build backend container from source. and use frontend/admin docker images

<!-- gh-comment-id:1786392831 --> @pankajmyt commented on GitHub (Oct 31, 2023): you need to build backend container from source. and use frontend/admin docker images
Author
Owner

@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.

<!-- gh-comment-id:1786397115 --> @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.
Author
Owner

@pankajmyt commented on GitHub (Oct 31, 2023):

git clone https://github.com/hoppscotch/hoppscotch
cd hoppscotch 
docker build -t myimage -f packages/hoppscotch-backend/Dockerfile .
<!-- gh-comment-id:1786398965 --> @pankajmyt commented on GitHub (Oct 31, 2023): ``` git clone https://github.com/hoppscotch/hoppscotch cd hoppscotch docker build -t myimage -f packages/hoppscotch-backend/Dockerfile . ```
Author
Owner

@perfectra1n commented on GitHub (Oct 31, 2023):

Ah, I see that now. That’s annoying, it’s under “ packages/hoppscotch-backend/Dockerfile”. Thanks!

<!-- gh-comment-id:1786401614 --> @perfectra1n commented on GitHub (Oct 31, 2023): Ah, I see that now. That’s annoying, it’s under “ packages/hoppscotch-backend/Dockerfile”. Thanks!
Author
Owner

@perfectra1n commented on GitHub (Oct 31, 2023):

The full command that I had to use was:

docker build -t something:(git log -1 --pretty=format:"%h") -f ./packages/hoppscotch-backend/Dockerfile .

Now I just have to crack the Davinci code to understand how these containers go together, or why the frontend container is also running the admin endpoint?
image
image

This stuff was not ready for the prime time lol

<!-- gh-comment-id:1787495897 --> @perfectra1n commented on GitHub (Oct 31, 2023): The full command that I had to use was: ``` docker build -t something:(git log -1 --pretty=format:"%h") -f ./packages/hoppscotch-backend/Dockerfile . ``` Now I just have to crack the Davinci code to understand how these containers go together, or why the `frontend` container is also running the admin endpoint? ![image](https://github.com/hoppscotch/hoppscotch/assets/2390633/13cdbb38-366c-4086-adc5-0b41fde01775) ![image](https://github.com/hoppscotch/hoppscotch/assets/2390633/e7dee014-71e2-4ce8-b201-28f02255a6e6) This stuff was not ready for the prime time lol
Author
Owner

@ostiwe commented on GitHub (Nov 10, 2023):

same, with postgresql 14 not working

<!-- gh-comment-id:1806347811 --> @ostiwe commented on GitHub (Nov 10, 2023): same, with postgresql 14 not working
Author
Owner

@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)

<!-- gh-comment-id:1825051220 --> @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)
Author
Owner

@domints commented on GitHub (Dec 12, 2023):

Still same, Postgres 14 as well, image latest (resolved to 2023.8.4 at the moment).
As @pankajmyt suggested, building backend image straight from git repo works, it doesn't crash anymore, but that's suboptimal solution.

<!-- gh-comment-id:1851230879 --> @domints commented on GitHub (Dec 12, 2023): Still same, Postgres 14 as well, image latest (resolved to `2023.8.4` at the moment). As @pankajmyt suggested, building backend image straight from git repo works, it doesn't crash anymore, but that's suboptimal solution.
Author
Owner

@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

FROM node:18-alpine3.16 as base_builder.

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...

image

<!-- gh-comment-id:1851661981 --> @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 ``` FROM node:18-alpine3.16 as base_builder. ``` 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... ![image](https://github.com/hoppscotch/hoppscotch/assets/113016306/a5bd4c49-bc0d-4f05-a12f-8f85edac99c8)
Author
Owner

@balub commented on GitHub (Jan 11, 2024):

Closing Issue as fix merged in release 2023.12.1.

<!-- gh-comment-id:1886606977 --> @balub commented on GitHub (Jan 11, 2024): Closing Issue as fix merged in release `2023.12.1`.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#1127
No description provided.