hoppscotch: [bug]: Cannot start backend container beyond `Initialize PubSub` due to `ELIFECYCLE  Command failed.`

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

About this issue

  • Original URL
  • State: closed
  • Created 9 months ago
  • Reactions: 6
  • Comments: 24 (2 by maintainers)

Most upvoted comments

I catch the same problem using postgresql 14. When I use version 12 or 13 everything is fine.

As with this one, postgresql 15