Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: self hosted VPC issues #1612

Open
AndryHTC opened this issue Jan 14, 2025 · 1 comment
Open

bug: self hosted VPC issues #1612

AndryHTC opened this issue Jan 14, 2025 · 1 comment

Comments

@AndryHTC
Copy link

Provide environment information

-

Describe the bug

In addition to the magic link issue (#1384 (comment)), I'm also encountering connection errors while testing the self-hosted version, while it works with the cloud one.

npx trigger.dev@latest dev --env-file trigger/.env.local   

Trigger.dev (3.3.10)
------------------------------------------------------
Key: Version | Task | Run
------------------------------------------------------
○ Building background worker…
│
■  Error: Build failed: Connection error.
│
│         Error: Connection error.
│             at DevWorkerRuntime.initializeWorker (file:///C:/Users/Andry/AppData/Local/npm-cache/_npx/f51a09bd0abf5f10/node_modules/trigger.dev/dist/esm/dev/workerRuntime.js:153:19)
│             at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
│             at async updateBundle (file:///C:/Users/Andry/AppData/Local/npm-cache/_npx/f51a09bd0abf5f10/node_modules/trigger.dev/dist/esm/dev/devSession.js:49:13)
│             at async runBundle (file:///C:/Users/Andry/AppData/Local/npm-cache/_npx/f51a09bd0abf5f10/node_modules/trigger.dev/dist/esm/dev/devSession.js:119:9)
│             at async startDevSession (file:///C:/Users/Andry/AppData/Local/npm-cache/_npx/f51a09bd0abf5f10/node_modules/trigger.dev/dist/esm/dev/devSession.js:122:26)
│             at async startDev (file:///C:/Users/Andry/AppData/Local/npm-cache/_npx/f51a09bd0abf5f10/node_modules/trigger.dev/dist/esm/commands/dev.js:115:23)
│             at async devCommand (file:///C:/Users/Andry/AppData/Local/npm-cache/_npx/f51a09bd0abf5f10/node_modules/trigger.dev/dist/esm/commands/dev.js:55:29)
│             at async file:///C:/Users/Andry/AppData/Local/npm-cache/_npx/f51a09bd0abf5f10/node_modules/trigger.dev/dist/esm/commands/dev.js:31:13
│             at async file:///C:/Users/Andry/AppData/Local/npm-cache/_npx/f51a09bd0abf5f10/node_modules/trigger.dev/dist/esm/cli/common.js:54:28
│             at async wrapCommandAction (file:///C:/Users/Andry/AppData/Local/npm-cache/_npx/f51a09bd0abf5f10/node_modules/trigger.dev/dist/esm/cli/common.js:40:12)

With the debug level log enabled: the base URL for seems to be inconsistent, switching between api.trigger.dev, localhost:3040, and remote.server:3040.

npx trigger.dev@latest dev --env-file trigger/.env.local -l debug

apiUrl: 'https://api.trigger.dev',
// ...
login: {
  // ...
  dashboardUrl: 'http://localhost:3040',
// ...
Initializing dev environment for project proj_cviwyoihnaqwclotauwp http://remote.server:3040
// ...
initialized worker runtime {
  // ...
  client: CliApiClient {
    apiURL: 'http://localhost:3040',
  // ...

Have I missed something?
Could you provide some clarification on the expected base URL behavior within a VPC environment? Additionally, any insights into potential reasons for the connection errors would be helpful for troubleshooting.

Thanks again for your support!

Reproduction repo

-

To reproduce

  1. Self host Trigger.dev in a remote VPC protected server
  2. Login the CLI
  3. Run the dev command

Additional information

No response

@AndryHTC
Copy link
Author

In the README.md there is this:

If you want to self-host the Trigger.dev platform, when you're developing your web app locally you'll need to run the Trigger.dev platform locally as well.

Is it still valid?

Also:

You’re going to need at least one Debian (or derivative) machine with Docker and Docker Compose installed

Does it apply to the local one too?

What is the correct dev flow?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant