Mono not found attempting to build docker image using Docker Mendix buildpack

0
  Following the Docker instructions on building images, I’m having an issue when executing the below command. I’ve also tried cloning the v3.5.1 tag but I receive the same error.   Per the instructions, I copied the project root directory and all contents to the Mendix Buildpack directory and specified the project folder path in the Docker build command. Anyone have ideas on how to get around this?   git clone --branch v3.5.2 --config core.autocrlf=false https://github.com/mendix/docker-mendix-buildpack cd docker-mendix-buildpack docker build --build-arg BUILD_PATH="{project_folder_path}" . [+] Building 12.7s (18/22)  => [internal] load build definition from Dockerfile                                                                                                                                                                                    0.0s  => => transferring dockerfile: 32B                                                                                                                                                                                                     0.0s  => [internal] load .dockerignore                                                                                                                                                                                                       0.0s  => => transferring context: 2B                                                                                                                                                                                                         0.0s  => [internal] load metadata for docker.io/mendix/rootfs:ubi8                                                                                                                                                                           1.3s  => [internal] load metadata for docker.io/mendix/rootfs:bionic                                                                                                                                                                         1.4s  => [auth] mendix/rootfs:pull token for registry-1.docker.io                                                                                                                                                                            0.0s  => [internal] load build context                                                                                                                                                                                                       0.1s  => => transferring context: 168.23kB                                                                                                                                                                                                   0.1s  => [builder 1/6] FROM docker.io/mendix/rootfs:bionic@sha256:224b5416da0efb128bc1d526fbb03b80a68cc26b4f05f5541ae33f5817c4e181                                                                                                           0.0s  => [stage-1  1/10] FROM docker.io/mendix/rootfs:ubi8@sha256:d83f37bf9165b7a62aa884c4f5d469824ded8a478a8997baabd981d73e0bc974                                                                                                           0.0s  => CACHED [builder 2/6] RUN mkdir -p /opt/mendix/buildpack /opt/mendix/build &&    ln -s /root /home/vcap &&    echo "Downloading CF Buildpack from https://github.com/mendix/cf-mendix-buildpack/releases/download/v4.28.4/cf-mendix  0.0s  => CACHED [builder 3/6] COPY scripts/compilation scripts/git /opt/mendix/buildpack/                                                                                                                                                    0.0s  => CACHED [builder 4/6] COPY ./MetricsService /opt/mendix/build                                                                                                                                                                        0.0s  => CACHED [builder 5/6] RUN chmod +rx /opt/mendix/buildpack/bin/bootstrap-python && /opt/mendix/buildpack/bin/bootstrap-python /opt/mendix/buildpack /tmp/buildcache                                                                   0.0s  => CACHED [stage-1  2/10] RUN chmod g=u /etc/passwd &&    chown 1001:0 /etc/passwd                                                                                                                                                     0.0s  => CACHED [stage-1  3/10] RUN if [ "true" = "true" ] && grep -q ubuntu /etc/os-release ; then        DEBIAN_FRONTEND=noninteractive apt-mark manual libfontconfig1 &&         DEBIAN_FRONTEND=noninteractive apt-get remove --purge -  0.0s  => CACHED [stage-1  4/10] COPY scripts/startup scripts/vcap_application.json /opt/mendix/build/                                                                                                                                        0.0s  => CACHED [stage-1  5/10] RUN mkdir -p /home/vcap /opt/datadog-agent/run &&    chown -R 1001:0 /home/vcap /opt/datadog-agent/run &&    chmod -R g=u /home/vcap /opt/datadog-agent/run                                                  0.0s  => CACHED [stage-1  6/10] RUN chmod +rx /opt/mendix/build/startup &&    chown -R 1001:0 /opt/mendix &&    chmod -R g=u /opt/mendix &&    ln -s /opt/mendix/.java /root                                                                 0.0s  => ERROR [builder 6/6] RUN mkdir -p /tmp/buildcache /tmp/cf-deps /var/mendix/build /var/mendix/build/.local &&    chmod +rx /opt/mendix/buildpack/compilation /opt/mendix/buildpack/git /opt/mendix/buildpack/buildpack/stage.py &&   11.0s ------  > [builder 6/6] RUN mkdir -p /tmp/buildcache /tmp/cf-deps /var/mendix/build /var/mendix/build/.local &&    chmod +rx /opt/mendix/buildpack/compilation /opt/mendix/buildpack/git /opt/mendix/buildpack/buildpack/stage.py &&    cd /opt/mendix/buildpack &&    ./compilation /opt/mendix/build /tmp/buildcache /tmp/cf-deps 0 &&    rm -fr /tmp/buildcache /tmp/javasdk /tmp/opt /tmp/downloads /opt/mendix/buildpack/compilation /opt/mendix/buildpack/git &&    ln -s /opt/mendix/.java /opt/mendix/build &&    chown -R 1001:0 /opt/mendix /var/mendix &&    chmod -R g=u /opt/mendix /var/mendix: #18 0.630 INFO: Mendix project compilation phase... #18 0.917 WARNING: Cannot retrieve metadata key RuntimeVersion #18 0.938 INFO: Preflight check on Mendix version [9.20.0.58427] and stack [None]... #18 0.938 INFO: Preflight check completed #18 0.939 INFO: Building from source... #18 0.939 INFO: Selecting Mono Runtime: mono-5.20.1.27 #18 10.95 Traceback (most recent call last): #18 10.95   File "/opt/mendix/buildpack/buildpack/core/mono.py", line 104, in ensure_and_get_mono #18 10.95     mono_location = _get_mono_path("/tmp/opt", mono_version) #18 10.95   File "/opt/mendix/buildpack/buildpack/core/mono.py", line 46, in _get_mono_path #18 10.95     "Mono not found", #18 10.95   File "/opt/mendix/buildpack/buildpack/util.py", line 223, in get_existing_directory_or_raise #18 10.95     raise NotFoundException(error) #18 10.95 buildpack.util.NotFoundException: Mono not found #18 10.95 #18 10.95 During handling of the above exception, another exception occurred: #18 10.95 #18 10.95 Traceback (most recent call last): #18 10.95   File "/opt/mendix/buildpack/lib/python3.6/site-packages/urllib3/connection.py", line 170, in _new_conn #18 10.95     (self._dns_host, self.port), self.timeout, **extra_kw #18 10.95   File "/opt/mendix/buildpack/lib/python3.6/site-packages/urllib3/util/connection.py", line 73, in create_connection #18 10.95     for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): #18 10.95   File "/usr/lib/python3.6/socket.py", line 745, in getaddrinfo #18 10.95     for res in _socket.getaddrinfo(host, port, family, type, proto, flags): #18 10.95 socket.gaierror: [Errno -3] Temporary failure in name resolution #18 10.95 #18 10.95 During handling of the above exception, another exception occurred: #18 10.95 #18 10.95 Traceback (most recent call last): #18 10.95   File "/opt/mendix/buildpack/lib/python3.6/site-packages/urllib3/connectionpool.py", line 706, in urlopen #18 10.95     chunked=chunked, #18 10.95   File "/opt/mendix/buildpack/lib/python3.6/site-packages/urllib3/connectionpool.py", line 382, in _make_request #18 10.95     self._validate_conn(conn) #18 10.95   File "/opt/mendix/buildpack/lib/python3.6/site-packages/urllib3/connectionpool.py", line 1010, in _validate_conn #18 10.95     conn.connect() #18 10.95   File "/opt/mendix/buildpack/lib/python3.6/site-packages/urllib3/connection.py", line 353, in connect #18 10.95     conn = self._new_conn() #18 10.95   File "/opt/mendix/buildpack/lib/python3.6/site-packages/urllib3/connection.py", line 182, in _new_conn #18 10.95     self, "Failed to establish a new connection: %s" % e #18 10.95 urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f1b52757ba8>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution #18 10.95 #18 10.95 During handling of the above exception, another exception occurred: #18 10.95 #18 10.95 Traceback (most recent call last): #18 10.95   File "/opt/mendix/buildpack/lib/python3.6/site-packages/requests/adapters.py", line 450, in send #18 10.95     timeout=timeout #18 10.95   File "/opt/mendix/buildpack/lib/python3.6/site-packages/urllib3/connectionpool.py", line 756, in urlopen #18 10.95     method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2] #18 10.95   File "/opt/mendix/buildpack/lib/python3.6/site-packages/urllib3/util/retry.py", line 574, in increment #18 10.95     raise MaxRetryError(_pool, url, error or ResponseError(cause)) #18 10.95 urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='cdn.mendix.com', port=443): Max retries exceeded with url: /mx-buildpack/mono/mono-5.20.1.27-mx-ubuntu-bionic.tar.gz (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f1b52757ba8>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)) #18 10.95 #18 10.95 During handling of the above exception, another exception occurred: #18 10.95 #18 10.95 Traceback (most recent call last): #18 10.95   File "/opt/mendix/buildpack/buildpack/stage.py", line 161, in <module> #18 10.95     runtime.get_java_version(runtime_version), #18 10.95   File "/opt/mendix/buildpack/buildpack/core/mxbuild.py", line 27, in build_from_source #18 10.95     runtime_version, buildpack_path, cache_path #18 10.95   File "/opt/mendix/buildpack/buildpack/core/mono.py", line 112, in ensure_and_get_mono #18 10.95     unpack_strip_directories=True, #18 10.95   File "/opt/mendix/buildpack/buildpack/util.py", line 136, in resolve_dependency #18 10.95     download(url, cached_location) #18 10.95   File "/opt/mendix/buildpack/buildpack/util.py", line 210, in download #18 10.95     response = requests.get(url, stream=True) #18 10.95   File "/opt/mendix/buildpack/lib/python3.6/site-packages/requests/api.py", line 75, in get #18 10.95     return request('get', url, params=params, **kwargs) #18 10.95   File "/opt/mendix/buildpack/lib/python3.6/site-packages/requests/api.py", line 61, in request #18 10.95     return session.request(method=method, url=url, **kwargs) #18 10.95   File "/opt/mendix/buildpack/lib/python3.6/site-packages/requests/sessions.py", line 529, in request #18 10.95     resp = self.send(prep, **send_kwargs) #18 10.95   File "/opt/mendix/buildpack/lib/python3.6/site-packages/requests/sessions.py", line 645, in send #18 10.95     r = adapter.send(request, **kwargs) #18 10.95   File "/opt/mendix/buildpack/lib/python3.6/site-packages/requests/adapters.py", line 519, in send #18 10.95     raise ConnectionError(e, request=request) #18 10.95 requests.exceptions.ConnectionError: HTTPSConnectionPool(host='cdn.mendix.com', port=443): Max retries exceeded with url: /mx-buildpack/mono/mono-5.20.1.27-mx-ubuntu-bionic.tar.gz (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f1b52757ba8>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)) #18 10.99 Traceback (most recent call last): #18 10.99   File "./compilation", line 68, in <module> #18 10.99     exit_code = call_buildpack_compilation() #18 10.99   File "./compilation", line 40, in call_buildpack_compilation #18 10.99     return subprocess.check_call(["/opt/mendix/buildpack/buildpack/stage.py", BUILD_PATH, CACHE_PATH, DEPS_DIR, DEPS_IDX]) #18 10.99   File "/usr/lib/python3.6/subprocess.py", line 311, in check_call #18 10.99     raise CalledProcessError(retcode, cmd) #18 10.99 subprocess.CalledProcessError: Command '['/opt/mendix/buildpack/buildpack/stage.py', '/opt/mendix/build', '/tmp/buildcache', '/tmp/cf-deps', '0']' returned non-zero exit status 1. ------ executor failed running [/bin/sh -c mkdir -p /tmp/buildcache /tmp/cf-deps /var/mendix/build /var/mendix/build/.local &&    chmod +rx /opt/mendix/buildpack/compilation /opt/mendix/buildpack/git /opt/mendix/buildpack/buildpack/stage.py &&    cd /opt/mendix/buildpack &&    ./compilation /opt/mendix/build /tmp/buildcache /tmp/cf-deps 0 &&    rm -fr /tmp/buildcache /tmp/javasdk /tmp/opt /tmp/downloads /opt/mendix/buildpack/compilation /opt/mendix/buildpack/git &&    ln -s /opt/mendix/.java /opt/mendix/build &&    chown -R ${USER_UID}:0 /opt/mendix /var/mendix &&    chmod -R g=u /opt/mendix /var/mendix]: exit code: 1  
asked
2 answers
0

It looks like the server was temporarily unavailable, is this still going wrong?

answered
0

This is a DNS issue. Name resolution is failing in the Docker container and causing python script attempting to download the ‘Mono’ package to fail. Updating my firewall settings fixed this issue.

answered