Docker build 3.3.0rc3 getting yarn install ESOCKETTIMEDOUT

Getting the following error on docker build:

error An unexpected error occurred: “https://registry.yarnpkg.com/core-js/-/core-js-2.6.11.tgz: ESOCKETTIMEDOUT”.

This is seen at yarn install v1.22.10 after step 3/5 (Fetching packages).

I tried a few times with the same result. Outside the build, downloading from this URL is very, very fast and always successful.

Any ideas? As a shot in the dark, I set ‘network-timeout 600000’ in .yarnrc without any impact.

FWIW, I have had no problem building previous docker versions through 3.2.2.

any indication if networking works in your docker container at all?

No problem with networking that I am aware of. I am building the image the same way I have successfully done for the last dozen releases or so. I rebuilt 3.2.2 this morning just to be sure nothing has changed and it was fine.

can you give me the exact command you are using to build? will try to reproduce

Nothing fancy, simply: docker-compose build web. This simple script reproduces the problem:

git clone https://github.com/tootsuite/mastodon.git v3.3.0
cd v3.3.0 || exit 1
cp -p .env.production{.sample,}
docker-compose build --no-cache web

I just retested with the released 3.3.0 source and it also fails at the same spot. The fatal error is preceded by several “info There appears to be trouble with your network connection. Retrying…”. (the build log is at SwissTransfer.com - Send large files securely and free of charge)

Looking back at the build log for 3.2.2, there is 1 “info There appears to be trouble with your network connection. Retrying…” but it apparently succeeds and the build continued normally.

This behavior is very repeatable for me for each of these versions. (I had no problem with other versions prior to 3.3 either). That said, I feel like it has to be something unique to me, but can’t figure out what it is that is causing this.

1 Like

This may be a docker (docker-ce 5.19) networking issue. Rebooting the system (or possibly just restarting docker) clears it temporarily. Something in 3.3.0 brings this problem out that earlier versions did not. I have rebuilt dozens of times testing various suggestions found online for this general yarn install error without success.

I am building the test instance on the same server that is running my production instance so there is a lot of docker network activity.

1 Like

Maybe you could try podman - it does not need any daemons and with a bit of luck it can be run 100% as the invoking user…

Thanks for the suggestion. I’ll look into it.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.