gitpod icon indicating copy to clipboard operation
gitpod copied to clipboard

[local-preview] build fail

Open tomatebeans opened this issue 3 years ago • 6 comments

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.

image

Steps to reproduce

  1. Install local preview
  2. Integrate with github ( integrated my with my https://github.com/tomatebeans )
  3. 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
  4. Click Continue with Default Image

chrome_q9rTp8tpNO

Workspace affected

No response

Expected behavior

clicking Continue with default Image should have no error

Example repository

No response

Anything else?

No response

tomatebeans avatar Aug 27 '22 04:08 tomatebeans

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.

lucasvaltl avatar Sep 02 '22 08:09 lucasvaltl

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

Pothulapati avatar Sep 02 '22 09:09 Pothulapati

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).

image

_gitpod_logs.txt

tomatebeans avatar Sep 03 '22 00:09 tomatebeans

@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 :)

Pothulapati avatar Sep 12 '22 05:09 Pothulapati

executed: docker exec gitpod kubectl logs deployment/image-builder-mk3 image-builder-mk3 output logfile: dockerlogimagebuildermk3.txt

tomatebeans avatar Sep 16 '22 12:09 tomatebeans

updated image: docker pull eu.gcr.io/gitpod-core-dev/build/local-preview:latest message seems different: image

then: docker exec gitpod kubectl logs deployment/image-builder-mk3 image-builder-mk3 > outputlog2.txt outputlog2.txt

tomatebeans avatar Sep 21 '22 13:09 tomatebeans

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!

Pothulapati avatar Sep 26 '22 10:09 Pothulapati

Thanks, currently in progress:

It seems taking more than the usual 5mins ( though system resources are almost not used ): image

will try again in another day

tomatebeans avatar Sep 27 '22 17:09 tomatebeans

Seems for me, the new image is not able to start the webserver:

image

tomatebeans avatar Oct 02 '22 16:10 tomatebeans

👋

@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.

Pothulapati avatar Oct 03 '22 06:10 Pothulapati

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:

image

I'll check again.

tomatebeans avatar Oct 04 '22 04:10 tomatebeans

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 :latest image has activity, and finished less than 6mins ( although it leads to the same issue) : [cpu usage is about 35%, significant disk and wifi activity] image

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.8 image 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:] image After 8mins, still not done: image 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?

tomatebeans avatar Oct 06 '22 16:10 tomatebeans