gitpod
gitpod copied to clipboard
[local-preview] build fail
Bug description
Followed instructions https://www.gitpod.io/docs/self-hosted/latest/local-preview
Even when clicking Use Default Image button, build still fails.
Happens even when choosing sample/template repo https://github.com/gitpod-io/spring-petclinic.

Steps to reproduce
- Install local preview
- Integrate with github ( integrated my with my https://github.com/tomatebeans )
- Tried to create workspace any of the following https://preview.gitpod-self-hosted.com/start/#gitpodio-springpetclini-c6lwysngjz5 https://preview.gitpod-self-hosted.com/#https://github.com/tomatebeans/fulls https://preview.gitpod-self-hosted.com/#https://github.com/tomatebeans/blank.git https://preview.gitpod-self-hosted.com/#https://github.com/gitpod-io/template-sveltejs
- Click
Continue with Default Image

Workspace affected
No response
Expected behavior
clicking Continue with default Image should have no error
Example repository
No response
Anything else?
No response
Hey @tomatebeans thanks for raising this. I'm sorry that this did not work immediately - let's see how we can fix this :) @Pothulapati, would you be so kind at take a look at this? I assume the first step here will be to gather some logs.
Hey @tomatebeans, Thanks for the detailed description (along with the video).
Because you seem to have went till the Gitpod UI, I don't think looking at the k3s logs would be useful. The image-builder-mk3 are the logs that that I think would be useful. Can you share the logs of the same?
Thanks
Hi, tried it again today; the same result.
Sorry I currently don't know where the image-builder-mk3 logs are.
Currently the logs I saw are just from one container (viewing at docker desktop and at portainer).

@tomatebeans
You should be able to get the image-builder-mk3 logs by running docker exec gitpod kubectl logs deployment/image-builder-mk3. Can you please share those logs?
Thanks :)
executed: docker exec gitpod kubectl logs deployment/image-builder-mk3 image-builder-mk3
output logfile: dockerlogimagebuildermk3.txt
updated image: docker pull eu.gcr.io/gitpod-core-dev/build/local-preview:latest
message seems different:

then: docker exec gitpod kubectl logs deployment/image-builder-mk3 image-builder-mk3 > outputlog2.txt
outputlog2.txt
Hey @tomatebeans,
Thanks for the reply!
Hmm, Looking at the image-builder-mk3 logs, I see a bunch of registry not allowed logs on docker.io. I just built a local-preview image that includes docker.io registry in the allow list. Can you run the the same command but with the following image?
eu.gcr.io/gitpod-core-dev/build/local-preview:tar-lp-reg-docker.8
Also, If even that does not work. Can you post the image-build logs itself by running docker exec gitpod kubectl logs -f -l workspaceType=regular when you click the button (as the container could disappear pretty fast)?
Thanks!
Thanks, currently in progress:
It seems taking more than the usual 5mins ( though system resources are almost not used ):

will try again in another day
Seems for me, the new image is not able to start the webserver:

👋
@tomatebeans This issue seems to be about k3s itself not starting as we can't seem to connect to the kubernetes cluster. Did something change? i.e Moving to WSL2 or something?
The new image doesn't really change anything except for adding new gitpod configuration 🤔 which should prevent Gitpod from starting if soemthing is wrong but shouldn't effect k3s in any way.
I think I don't remember something significant. I was also using Win10 Home + WSL2 + Docker + Ubuntu Image [from app store & is integrated with docker], since 5 months ago. I tested using the usual image ( from the local preview instructions ) but I only remember it working despite the new image not working. The only thing different is that I remember that after 5mins, even though the startup did not show the url, I manually went to https://preview.gitpod-self-hosted.com/ and I saw it loading.
Today I pulled the usual image with no changes, but the url is not accessible... so maybe I have broken something:

I'll check again.
my recent changes is 22h2 windows 11 update, but I'm getting the same behavior, the :tar-lp-reg-docker.8 is really not working while the default :latest is working.
- A
Tried it again, and the default
:latestimage has activity, and finished less than 6mins ( although it leads to the same issue) : [cpu usage is about 35%, significant disk and wifi activity]
Result: Accessed https://preview.gitpod-self-hosted.com but same error image build did not produce workspace image
- B
In contrast, the
:tar-lp-reg-docker.8image does not show any activity at start and is not finished even after 8mins: [cpu usage is at most 20% and averages 12%,, almost 0 disk and just background wifi activity:]
After 8mins, still not done:
After 20mins, still not done either
Result: was not able to access https://preview.gitpod-self-hosted.com at all
Hmm, Looking at the image-builder-mk3 logs, I see a bunch of registry not allowed logs on docker.io
My internet seems ok but somehow maybe my region ( Philippines ) connection to docker registry is throttled, resulting in pull error. I had an experience where a Windows2012 VM inside azure outside my region can pull a mssql server docker image very fast, but when I do it on my laptop on my region ( PH ) it was never successful.
Maybe since this issue only happens to me, I can close it?