Fatal: unable to access 'https://github.com/discourse/discourse.git/': getaddrinfo() thread failed to start

Yes, I'm aware of that. However, we all know that whether you issue a 'git clone' command from the host command line or from inside a container (perhaps within a script), they should both work. Not working from within the container signals a faulty container config/firewall/ or whatever.

So, yes, I agree that Discourse should not be releasing an image that won't build because 'git clone' won't work from within the container.

I think the command line which fails is actually git fetch and not git clone as I casually mentioned earlier.

But it does not matter, the issue is moot because I am using a base image which is a few days older which does not error.

.... my guess is the error will not self-correct in a matter of weeks like the old rbtrace gem version error eventually self-corrected and in the meantime, if it does not self-correct, I know how to work around this error.

:slight_smile:

2 Likes

Just for fun, pulled the latest repo and changed the image to the latest 2.0.20240905-0014 and got this error:

ERROR: Docker version 18.09.7 not supported, please upgrade to at least 20.10.0, or recommended 24.0.7

So, I went back to:

base:2.0.20240822-0024

and it gives the same error; so I checked the commits and found:

Defined here:

pups_version='v1.0.3'
docker_min_version='24.0.7'
docker_rec_version='24.0.7'
git_min_version='1.8.0'
git_rec_version='1.8.0'
kernel_min_version='4.4.0'

Which they then changed back to:

pups_version='v1.0.3'
docker_min_version='20.10.0'
docker_rec_version='24.0.7'
git_min_version='1.8.0'
git_rec_version='1.8.0'
kernel_min_version='4.4.0'

So I changed it to:

pups_version='v1.0.3'
#docker_min_version='20.10.0'
docker_min_version='18.09.7'
docker_rec_version='24.0.7'
git_min_version='1.8.0'
git_rec_version='1.8.0'
kernel_min_version='4.4.0'

using:

image="discourse/base:2.0.20240822-0024"

Getting warning:

WARNING: Docker version 18.09.7 deprecated, recommend upgrade to 24.0.7 or newer.

Which indicates to me that Discourse knows there is an issue which from differences between old versions of Docker and newer versions.

Upgrading docker will cause the site to go down, and I'm not sure the upgrade will happen without errors resulting in extensive downtime which I don't want to deal with at this time.

After the last repo pull, the changes now cause the builds to fail (even the ones working before), because of this docker issue.

So, the plan is to upgrade docker on this old machine, which is very old...

ubuntu:/tmp#  lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.1 LTS
Release:	18.04
Codename:	bionic

Note:

Ubuntu 18.04 has reached End of Life (EOL) in May 31, 2023 and stopped receiving hardware and maintenance updates

Current Ubuntu Release

24.04.1 LTS

So, I think I will decide what to do later......

1 Like

In the meantime......

Works fine if I change launcher as follows:

docker_min_version='18.09.7'

and

image="discourse/base:2.0.20240820-1401"

or

image="discourse/base:2.0.20240822-0024"

Not sure how long this hack will work; so need to plan the best way to upgrade.

2 Likes

Just seen this, no link ( I think ) with topic, but just in case, info anyway:

ChatGPT says:

Yes, you can upgrade Docker without removing the current version by simply installing the latest version from Docker's official repository without removing the docker.io package first. This approach allows you to upgrade Docker while keeping the existing installation in place as a fallback.

Here’s how to do it without removing the current version of Docker:

1. Install Docker from the Official Repository Without Removing docker.io

You can install Docker's official version alongside docker.io, and the system will prioritize the official Docker version.

a. Update the Package Index

bash

Copy code

sudo apt-get update

b. Install Required Packages

bash

Copy code

sudo apt-get install \
    ca-certificates \
    curl \
    gnupg \
    lsb-release

c. Add Docker’s Official GPG Key

bash

Copy code

sudo mkdir -m 0755 -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg

d. Set Up the Docker Stable Repository

Add Docker’s official repository to your package sources:

bash

Copy code

echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]') $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

e. Update the Package Index Again

bash

Copy code

sudo apt-get update

f. Install the Official Docker Version

You can now install Docker’s official packages, even if docker.io is installed:

bash

Copy code

sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

2. Verify the Version of Docker Installed

After installing the official Docker version, check which version is being used:

bash

Copy code

docker --version

The system will likely prioritize the Docker version from the official repository over docker.io. If the upgrade is successful and works well, you can leave it as is.

3. Fallback to docker.io (if needed)

If, for some reason, the newly installed Docker version does not work as expected, you can simply uninstall the newly installed Docker packages and fall back to the docker.io package:

bash

Copy code

sudo apt-get remove docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

After uninstalling, you’ll be back to the docker.io version. Your images and containers will remain intact, as they are stored separately.

Key Benefits of This Approach:

  • No Risk: You don't remove the existing Docker installation (docker.io), so in case something goes wrong with the new version, you can easily revert.
  • Flexibility: You can test the newer Docker version and decide whether to keep it or revert to docker.io.

By doing this, you minimize the risks involved with upgrading Docker.

1 Like

Thanks. Yeah, I have seen no functional benefit to the myriad of major Discourse changes over the past year other than to make things break a lot. It's almost as if this is a strategy to get people on self-hosting to migrate to their paid hosting services.

There is a constant churn of major changes which really adds no value to the end user experience or the application functionality, but it sure keeps self-hosters busy trying to fix everything they constantly break!!

It's a major software example of "form over substance", if you ask me.... We used to call this a "self-kicking ice-cream cone" in the USAF.

3 Likes

So, I currently was thinking to attempt this Docker upgrade on Sunday Sept 8th, 2 AM GMT.

Then again, I may wait another week or two; since there is no hurry.

:slight_smile:

It worked... at least the docker upgrade (and ahead of schedule):

ubuntu:~# docker --version

Docker version 24.0.2, build cb74dfc

Now trying to rebuild container using this base image:

image="discourse/base:2.0.20240825-0027" 

.... and it worked..... !!!

Status: Downloaded newer image for discourse/base:2.0.20240825-0027

The only small issue.....

WARNING: Docker version 24.0.2 deprecated, recommend upgrade to 24.0.7 or newer.
x86_64 arch detected.

Because of this check in launcher :slight_smile:

docker_min_version='20.10.0'
docker_rec_version='24.0.7'

Cheers.

3 Likes

So, the bottom line was that our old version of Docker (installed from the Docker site) broke the build; and after upgrading Docker (using apt) all is back normal.

OBTW, the ChatGPT instructions above worked flawlessly.

If anyone on the net stumbles across this topic with a similar docker problem, upgrading Docker worked for us!

Will need to upgrade to an even more recent version of Docker sooner than later.

:slight_smile:

Reference:

3 Likes

Good job Neo... :+1:

1 Like

Thanks; but we should be on version 27.x not 24.x.

Yes, Discourse Docker builds now, which is good.

But for some reason, I cannot get apt to correctly find and install version 27. I am pretty sure this is due to the very old version of ubuntu we are running:

ubuntu~# lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.1 LTS
Release:	18.04
Codename:	bionic

Anyway, it's not a crisis and all is working fine, so I'll settle for version 24 for now!

At least we are only two months deprecated versus 6 years deprecated now!!! hahaha

:slight_smile:

See Also

https://ubuntu.com/about/release-cycle

2 Likes

Yes, I just checked in details and this version of Ubuntu:

Release:	18.04
Codename:	bionic

Only has a repo to support Docker 24.0.2

ChatGPT: To support Docker 27.x:

As of now, Docker 27.x is available, but there are some limitations regarding its installation on older Ubuntu releases like Ubuntu 18.04 Bionic.

Docker has stopped providing newer releases like 27.x for older Ubuntu versions (such as Bionic) in their stable repository, as Docker's support policy generally aligns with the Ubuntu Long-Term Support (LTS) versions that are still under maintenance.

What Can You Do?

  1. Upgrade Ubuntu: To get Docker 27.x, the most straightforward solution is to upgrade your operating system to a more recent version of Ubuntu, like Ubuntu 20.04 (Focal) or Ubuntu 22.04 (Jammy). These newer versions are supported for Docker 27.x releases.
  2. Use Docker 24.x: If upgrading your OS is not an option, you may have to stick with Docker 24.x, which is the latest version available for Ubuntu 18.04 Bionic in the official stable repository.
  3. Workaround (not recommended for production): If you're determined to use Docker 27.x on Ubuntu 18.04, you can try using Docker binaries directly from Docker's GitHub releases. However, this would mean bypassing apt package management, manually installing, and handling upgrades yourself. This approach may introduce stability issues or lack critical security updates, so it's not recommended for production environments.

Conclusion

Too busy to move the server and all apps to a newer version of Ubuntu, and too cautious to try a major upgrade like this on a production server, we still stick to option 2 for now until Discourse forces this issue, which they actually tried to do here:

But Ubuntu Bionic does not support Docker 24.0.7 and the last supported release was 24.0.2 (what we are running now).

bionic:/etc/apt/sources.list.d# docker -v
Docker version 24.0.2, build cb74dfc

Then just a short time after the commit above, they did this:

So, it seems they did not fully analyze what version of docker would have been best. Since 20.0.7 is not supported on Bionic, which has a very large user base, it would have been better to designate the 20.0.2, which is supported on Bionic, as the min.

But instead, they picked 20.0.7 as the min, which seems arbitrary (maybe in panic mode) versus doing the analysis (as I have done); but that is fine with me, 20.0.7 as min works and it's fine (until they break it again) since we are on 24.0.2 !

:slight_smile:

Reference

1 Like

A hint :

In a nutshell, when upgrading docker daemon (minor), with this option set, there is no downtime.

This works, tested in battlefield :slight_smile:

Regards
Peasant.

Thanks for the info @Peasant

Luckily I crossed that hurdle around 2 days ago and had no issues with containers and docker restart(s) upgrading with the ChatGPT instructions above (ChatGPT is maturing quickly); and have rebuilt the containers many times after the upgrade to 24.0.2 .