I am experiencing the same issue:
Windows 10
WSL2 with Ubuntu
I was following the instructions at:
cd ~/tcbworkdir
# Get the setup script and run it
wget https://raw.githubusercontent.com/toradex/tcb-env-setup/master/tcb-env-setup.sh
source tcb-env-setup.sh -- -p 8080:8080
# Download the base image
wget https://artifacts.toradex.com/artifactory/torizoncore-oe-prod-frankfurt/dunfell-5.x.y/release/11/apalis-imx8/torizon/torizon-core-docker/oedeploy/torizon-core-docker-apalis-imx8-Tezi_5.5.0+build.11.tar
# Get the sample docker-compose.yml
wget https://docs.toradex.com/108979-docker-compose-example-arm64.yml
mv 108979-docker-compose-example-arm64.yml docker-compose.yml
# Make sure I can run the arm version on windows
docker run --rm -it --privileged torizon/binfmt
docker run --rm -it arm32v7/debian arch
# Output from it is WARNING: The requested image's platform (linux/arm/v7) does not match the detected host platform (linux/amd64) and no specific platform was requested
# armv7l
# Just to make sure, see what we have in the current directory
ls -F
# docker-compose.yml tcb-env-setup.sh torizon-core-docker-apalis-imx8-Tezi_5.5.0+build.11.tar
torizoncore-builder bundle --platform=linux/arm64 docker-compose.yml --bundle-directory bundle
Unfortunately the bundle command fails with an error
Creating Docker Container bundle...
Starting DIND container
Using Docker host "tcp://127.0.0.1:22376"
Connecting to Docker Daemon at "tcp://127.0.0.1:22376"
Stopping DIND container
An unexpected Exception occured. Please provide the following stack trace to
the Toradex TorizonCore support team:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/urllib3/connection.py", line 174, in _new_conn
conn = connection.create_connection(
File "/usr/local/lib/python3.9/dist-packages/urllib3/util/connection.py", line 95, in create_connection
raise err
File "/usr/local/lib/python3.9/dist-packages/urllib3/util/connection.py", line 85, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/urllib3/connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "/usr/local/lib/python3.9/dist-packages/urllib3/connectionpool.py", line 386, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python3.9/dist-packages/urllib3/connectionpool.py", line 1040, in _validate_conn
conn.connect()
File "/usr/local/lib/python3.9/dist-packages/urllib3/connection.py", line 358, in connect
conn = self._new_conn()
File "/usr/local/lib/python3.9/dist-packages/urllib3/connection.py", line 186, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f1d88c41580>: Failed to establish a new connection: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/requests/adapters.py", line 440, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.9/dist-packages/urllib3/connectionpool.py", line 785, in urlopen
retries = retries.increment(
File "/usr/local/lib/python3.9/dist-packages/urllib3/util/retry.py", line 592, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='127.0.0.1', port=22376): Max retries exceeded with url: /version (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f1d88c41580>: Failed to establish a new connection: [Errno 111] Connection refused'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/docker/api/client.py", line 214, in _retrieve_server_version
return self.version(api_version=False)["ApiVersion"]
File "/usr/local/lib/python3.9/dist-packages/docker/api/daemon.py", line 181, in version
return self._result(self._get(url), json=True)
File "/usr/local/lib/python3.9/dist-packages/docker/utils/decorators.py", line 46, in inner
return f(self, *args, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/docker/api/client.py", line 237, in _get
return self.get(url, **self._set_request_timeout(kwargs))
File "/usr/local/lib/python3.9/dist-packages/requests/sessions.py", line 542, in get
return self.request('GET', url, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/requests/sessions.py", line 529, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.9/dist-packages/requests/sessions.py", line 645, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/requests/adapters.py", line 519, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='127.0.0.1', port=22376): Max retries exceeded with url: /version (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f1d88c41580>: Failed to establish a new connection: [Errno 111] Connection refused'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/builder/torizoncore-builder", line 215, in <module>
mainargs.func(mainargs)
File "/builder/tcbuilder/cli/bundle.py", line 94, in do_bundle
bundle(bundle_dir=args.bundle_directory,
File "/builder/tcbuilder/cli/bundle.py", line 50, in bundle
bundle_be.download_containers_by_compose_file(
File "/builder/tcbuilder/backend/bundle.py", line 505, in download_containers_by_compose_file
dind_client = manager.get_client()
File "/builder/tcbuilder/backend/bundle.py", line 300, in get_client
dind_client = docker.DockerClient(base_url=self.docker_host, tls=tls_config)
File "/usr/local/lib/python3.9/dist-packages/docker/client.py", line 45, in __init__
self.api = APIClient(*args, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/docker/api/client.py", line 197, in __init__
self._version = self._retrieve_server_version()
File "/usr/local/lib/python3.9/dist-packages/docker/api/client.py", line 221, in _retrieve_server_version
raise DockerException(
docker.errors.DockerException: Error while fetching server API version: HTTPSConnectionPool(host='127.0.0.1', port=22376): Max retries exceeded with url: /version (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f1d88c41580>: Failed to establish a new connection: [Errno 111] Connection refused'))
I’ve made sure I have the latest version of Docker Desktop and that the WSL integration is enabled. I have also tried running in Visual Studio under the terminal, in powershell on a WSL terminal, both with and without using SUDO. The result is the same in all cases.
Am I missing some critical step?