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

Getting 401 for template build #317

Open
manavAt1flow opened this issue Feb 21, 2025 · 4 comments
Open

Getting 401 for template build #317

manavAt1flow opened this issue Feb 21, 2025 · 4 comments

Comments

@manavAt1flow
Copy link

Hey

i am getting this error while running e2b template build

Error

Found sandbox template rki5dems9wqfm4r03t7g base <-> ./e2b.toml Found ./e2b.Dockerfile that will be used to build the sandbox template. Ym [E2BRequestError]: Error requesting template build: [401] unauthorized: Invalid Access token, try to login again by running e2b login. authorization header is malformed

Please let me know what am i missing here

Copy link

linear bot commented Feb 21, 2025

@jakubno
Copy link
Member

jakubno commented Feb 21, 2025

Hey @manavAt1flow , it's very similar as for team api key. The required format is an access token prefixed by sk_e2b_. It corresponds to the access_tokens table.

You can either create config file in ~/.e2b/config.json with {"accessToken": "sk_e2b_...."} and it will be automatically picked up by CLI.

@manavAt1flow
Copy link
Author

manavAt1flow commented Feb 21, 2025

Hey @jakubno Thanks for quick reply, it seems 401 issue is resolved, but now facing this issue while building the template

`Docker image pushed.

Triggering build...
Triggered build for the sandbox template rki5dems9wqfm4r03t7g base
Waiting for build to finish...

Build failed: error when building env: failed to create template 'rki5dems9wqfm4r03t7g': [Unavailable] connection error: desc = "transport: Error while dialing: dial tcp: lookup template-manager.service.consul on 127.0.0.53:53: no such host"
Error:
❌ Building sandbox template rki5dems9wqfm4r03t7g base failed.
Check the logs above for more details or contact us (https://e2b.dev/docs/getting-help) to get help`

It seems template manager deployment failed, though i have followed all the steps according to self-host.md

Do let me know if i am missing anything.

Image

@jakubno
Copy link
Member

jakubno commented Feb 21, 2025

Looks like orchestrator and session proxy aren't running either. Could you also share what's in your Clients and Topology tabs? I think your client VMs aren't running. I would try to go to GCP, Compute Engine, Instance Groups, e2b-orch-client-ig, RESTART/REPLACE VMS, choose replace and confirm. Maybe there was some problem between clients and servers

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

2 participants