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

Bad Gateway for Custom Sandbox #51

Open
btahir opened this issue Sep 5, 2024 · 4 comments
Open

Bad Gateway for Custom Sandbox #51

btahir opened this issue Sep 5, 2024 · 4 comments

Comments

@btahir
Copy link

btahir commented Sep 5, 2024

I'm experiencing difficulties while trying to set up and use a custom sandbox. Specifically:

After deploying a sandbox, I consistently receive a "Bad Gateway" error when attempting to access the artifact.

I did get this message when I created Sandbox

adduser: The home directory `/home/user' already exists.  Not touching this directory.
adduser: Warning: The home directory `/home/user' does not belong to the user you are currently creating.
Postprocessing finished.

Could be the Dockerfile for nextjs template needs updating.
You also need to change the shadcn commands to

RUN npx shadcn-ui@latest init -d
RUN npx shadcn-ui@latest add --all

sahdcn-ui becomes shadcn in the latest version.

Steps To Reproduce
I think you can try building a new Sandbox using the nextjs template here and hopefully fix the issues by updating the Dockerfile.

Copy link

linear bot commented Sep 5, 2024

@jakubno
Copy link
Member

jakubno commented Sep 5, 2024

Hi @btahir, I think the problem is you don't specify start_cmd, so the nextjs servrer doens't start and when you try to access the port, it will return 502.

Could you please share your Dockerfile + e2b.toml? It would be easier to me to help you then

@mishushakov
Copy link
Member

I'm suspecting the server doesn't start for some reason.

You can also ssh into to your sandbox using E2B CLI:

e2b sbx spawn <template id>

to see what's going wrong there

@btahir
Copy link
Author

btahir commented Sep 5, 2024

I'm using the nextjs template so you can reproduce this just trying to create a new sandbox using the Dockerfile + compute.sh file there.
https://github.com/e2b-dev/ai-artifacts/tree/main/sandbox-templates/nextjs-developer

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

3 participants