TeKrop / overfast-api

⚡ Unofficial Overwatch 2 API, built with FastAPI, provides data on heroes, game modes, maps, and player careers
https://overfast-api.tekrop.fr
MIT License
95 stars 10 forks source link

Error while trying to start overfast-api #130

Closed itzdrli closed 2 weeks ago

itzdrli commented 2 weeks ago

Describe the bug Errored when trying to run overfast-api in production

To Reproduce

  1. git clone https://github.com/TeKrop/overfast-api && cd overfast-api
  2. Created and edited .env and changed APP_PORT, APP_BASE_URL
  3. apt install make (GNU make 4.3)
  4. make up (inside folder overfast-api)
  5. shows error
    root@itzdrli-dev-armv8:/home/dev/overfast-api# make up
    Building OverFastAPI (production mode)...
    docker compose build
    WARN[0000] /home/dev/overfast-api/docker-compose.yml: `version` is obsolete 
    [+] Building 43.4s (37/44)                                                                                                                                                                            docker:default
    => [redis internal] load build definition from Dockerfile                                                                                                                                                      0.0s
    => => transferring dockerfile: 109B                                                                                                                                                                            0.0s
    => [redis internal] load metadata for docker.io/library/redis:alpine                                                                                                                                           1.2s
    => [redis internal] load .dockerignore                                                                                                                                                                         0.0s
    => => transferring context: 2B                                                                                                                                                                                 0.0s
    => [redis 1/4] FROM docker.io/library/redis:alpine@sha256:0389bb8416d7c6ed065c25745179bf5d358e5d9472dd30a687ab36ffbb650262                                                                                     1.3s
    => => resolve docker.io/library/redis:alpine@sha256:0389bb8416d7c6ed065c25745179bf5d358e5d9472dd30a687ab36ffbb650262                                                                                           0.0s
    => => sha256:0389bb8416d7c6ed065c25745179bf5d358e5d9472dd30a687ab36ffbb650262 10.20kB / 10.20kB                                                                                                                0.0s
    => => sha256:94747bd812346354fd5042870b6e44e5406880a4e6b5736a9cf9c753110df11b 4.09MB / 4.09MB                                                                                                                  0.3s
    => => sha256:cdfbf2aae844ce899e13c8e08b524cfba67d9ddd6c5ca10be36c85aac3dc2ce7 961B / 961B                                                                                                                      0.1s
    => => sha256:16098e28f60cd9af53fb043cf88a98958b3760bc0ac96b7a4e8ee40ce1e3e7d3 2.48kB / 2.48kB                                                                                                                  0.0s
    => => sha256:cdb453bbf44653b2fff791f1950bc858a4156551f0a99eb868a81e17144a5297 7.92kB / 7.92kB                                                                                                                  0.0s
    => => sha256:510e151e1774050d5f5bb60a85736a80fa6c006791db5cebe6d506d65dec84a1 178.15kB / 178.15kB                                                                                                              0.3s
    => => sha256:70498b03edf90991b22ce539adf5694ff45163da2c71ec1501e5611fd228913e 934.59kB / 934.59kB                                                                                                              0.4s
    => => extracting sha256:94747bd812346354fd5042870b6e44e5406880a4e6b5736a9cf9c753110df11b                                                                                                                       0.2s
    => => sha256:b4a58c1d515ac6de0babaf7b798a89ae1a6707d9b0a70b647b735060b7da96cd 12.14MB / 12.14MB                                                                                                                0.5s
    => => sha256:f5bb1f316352fd460172c7e484e857550bb23940c213e90eeda6853f5c7f80dc 97B / 97B                                                                                                                        0.5s
    => => extracting sha256:cdfbf2aae844ce899e13c8e08b524cfba67d9ddd6c5ca10be36c85aac3dc2ce7                                                                                                                       0.0s
    => => sha256:8e79f523a11aead29e92102b8b50db1bca63e4571c30cda9b899fdee8177ed98 573B / 573B                                                                                                                      0.6s
    => => sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1 32B / 32B                                                                                                                        0.5s
    => => extracting sha256:510e151e1774050d5f5bb60a85736a80fa6c006791db5cebe6d506d65dec84a1                                                                                                                       0.1s
    => => extracting sha256:70498b03edf90991b22ce539adf5694ff45163da2c71ec1501e5611fd228913e                                                                                                                       0.1s
    => => extracting sha256:b4a58c1d515ac6de0babaf7b798a89ae1a6707d9b0a70b647b735060b7da96cd                                                                                                                       0.5s
    => => extracting sha256:f5bb1f316352fd460172c7e484e857550bb23940c213e90eeda6853f5c7f80dc                                                                                                                       0.0s
    => => extracting sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1                                                                                                                       0.0s
    => => extracting sha256:8e79f523a11aead29e92102b8b50db1bca63e4571c30cda9b899fdee8177ed98                                                                                                                       0.0s
    => [redis internal] load build context                                                                                                                                                                         0.0s
    => => transferring context: 878B                                                                                                                                                                               0.0s
    => [redis 2/4] WORKDIR /redis                                                                                                                                                                                  0.1s
    => [redis 3/4] COPY init.sh ./                                                                                                                                                                                 0.0s
    => [redis 4/4] RUN chmod +x init.sh                                                                                                                                                                            0.2s
    => [redis] exporting to image                                                                                                                                                                                  0.0s
    => => exporting layers                                                                                                                                                                                         0.0s
    => => writing image sha256:2c92f9ca2855eb09cbfdea5edabec9d27a207e0ca51a6d7dd5a51a1263b2e513                                                                                                                    0.0s
    => => naming to docker.io/library/overfast-api-redis                                                                                                                                                           0.0s
    => [app internal] load build definition from Dockerfile                                                                                                                                                        0.0s
    => => transferring dockerfile: 1.04kB                                                                                                                                                                          0.0s
    => [worker internal] load metadata for docker.io/library/python:3.12-alpine                                                                                                                                    1.2s
    => [worker internal] load build definition from Dockerfile                                                                                                                                                     0.0s
    => => transferring dockerfile: 1.04kB                                                                                                                                                                          0.0s
    => [app internal] load .dockerignore                                                                                                                                                                           0.0s
    => => transferring context: 2B                                                                                                                                                                                 0.0s
    => [worker internal] load .dockerignore                                                                                                                                                                        0.0s
    => => transferring context: 2B                                                                                                                                                                                 0.0s
    => [app main  1/10] FROM docker.io/library/python:3.12-alpine@sha256:d24ed567ee3b972478a232ceff84b0d002e18ee9f5d38234ecbffece23dfa084                                                                          1.8s
    => => resolve docker.io/library/python:3.12-alpine@sha256:d24ed567ee3b972478a232ceff84b0d002e18ee9f5d38234ecbffece23dfa084                                                                                     0.0s
    => => sha256:d24ed567ee3b972478a232ceff84b0d002e18ee9f5d38234ecbffece23dfa084 1.65kB / 1.65kB                                                                                                                  0.0s
    => => sha256:6714e211c290dc39908616ed0befdcc8f9097b69ee62d17f2f1833d764b93ef0 1.37kB / 1.37kB                                                                                                                  0.0s
    => => sha256:0fe205a492b75b71368b95db211dc148d50240d50752f04b34d1024084561296 6.64kB / 6.64kB                                                                                                                  0.0s
    => => sha256:820650aa2f5b8e795b04058fa617fb87ad3397f0fc2582400f9855b84f2d4401 465.47kB / 465.47kB                                                                                                              0.4s
    => => sha256:4e0f3549117ae48d35d3cbea60bca5ef0d654723e8065274c93137c3f2b44a60 14.68MB / 14.68MB                                                                                                                0.4s
    => => sha256:a5b6895e2863b5497adb5d68fe8e5241835c9624c9a31fd2b8532b08da56b638 242B / 242B                                                                                                                      0.1s
    => => sha256:629a421706977cd903f62bb22483a0fa6cba236a94d23543e616bf5c24516467 2.74MB / 2.74MB                                                                                                                  0.5s
    => => extracting sha256:820650aa2f5b8e795b04058fa617fb87ad3397f0fc2582400f9855b84f2d4401                                                                                                                       0.2s
    => => extracting sha256:4e0f3549117ae48d35d3cbea60bca5ef0d654723e8065274c93137c3f2b44a60                                                                                                                       0.8s
    => => extracting sha256:a5b6895e2863b5497adb5d68fe8e5241835c9624c9a31fd2b8532b08da56b638                                                                                                                       0.0s
    => => extracting sha256:629a421706977cd903f62bb22483a0fa6cba236a94d23543e616bf5c24516467                                                                                                                       0.3s
    => [app internal] load build context                                                                                                                                                                           0.1s
    => => transferring context: 10.25MB                                                                                                                                                                            0.1s
    => [worker internal] load build context                                                                                                                                                                        0.1s
    => => transferring context: 10.25MB                                                                                                                                                                            0.1s
    => [app main  2/10] WORKDIR /code                                                                                                                                                                              0.1s
    => [app main  3/10] RUN apk add build-base &&   apk add libffi-dev &&   pip install poetry==1.8.2                                                                                                             24.3s
    => [app main  4/10] COPY pyproject.toml /code/                                                                                                                                                                 0.0s
    => [app main  5/10] COPY poetry.lock /code/                                                                                                                                                                    0.0s
    => [app main  6/10] RUN poetry config virtualenvs.create false &&  poetry install --only main --no-interaction --no-ansi                                                                                       8.7s
    => [app main  7/10] COPY ./app /code/app                                                                                                                                                                       0.0s
    => [worker main  8/10] COPY ./static /code/static                                                                                                                                                              0.1s
    => [app main  9/10] COPY ./build/overfast-crontab /etc/crontabs/root                                                                                                                                           0.0s
    => [app main 10/10] RUN chmod +x /etc/crontabs/root                                                                                                                                                            0.2s
    => [worker] exporting to image                                                                                                                                                                                 1.3s
    => => exporting layers                                                                                                                                                                                         1.2s
    => => writing image sha256:097b9c11ac8d43b68212e99b3aaa27c6faaa9496a4a56c2dd17d1e8e7bf5b007                                                                                                                    0.0s
    => => naming to docker.io/library/overfast-api-worker                                                                                                                                                          0.0s
    => [app] exporting to image                                                                                                                                                                                    1.3s
    => => exporting layers                                                                                                                                                                                         1.2s
    => => writing image sha256:0d945663dff46a7417e3bee5a459b9bdbe73b8b0bf075392d2382d10e3253569                                                                                                                    0.0s
    => => naming to docker.io/library/overfast-api-app                                                                                                                                                             0.0s
    => [nginx internal] load build definition from Dockerfile                                                                                                                                                      0.0s
    => => transferring dockerfile: 284B                                                                                                                                                                            0.0s
    => [nginx internal] load metadata for docker.io/library/nginx:1.20.2-alpine                                                                                                                                    1.2s
    => [nginx internal] load .dockerignore                                                                                                                                                                         0.0s
    => => transferring context: 2B                                                                                                                                                                                 0.0s
    => [nginx 1/4] FROM docker.io/library/nginx:1.20.2-alpine@sha256:016789c9a2d021b2dcb5e1c724c75ab0a57cc4e8cd7aab7bb28e69fec7c8c4fc                                                                              1.0s
    => => resolve docker.io/library/nginx:1.20.2-alpine@sha256:016789c9a2d021b2dcb5e1c724c75ab0a57cc4e8cd7aab7bb28e69fec7c8c4fc                                                                                    0.0s
    => => sha256:455c02918c4592a9beeeae47df541266f3ea53ed573feb767e5e8ab8dcee146e 2.72MB / 2.72MB                                                                                                                  0.2s
    => => sha256:08b6b842dcd703db7772921ad226048f2f8b0bec2e1fcaaa55a59b66c4772db3 7.14MB / 7.14MB                                                                                                                  0.3s
    => => sha256:016789c9a2d021b2dcb5e1c724c75ab0a57cc4e8cd7aab7bb28e69fec7c8c4fc 1.65kB / 1.65kB                                                                                                                  0.0s
    => => sha256:1a946edcecbd2fd3121946a05e978c3a03c5d94c67d2376d3fbb62ed0c470d90 1.57kB / 1.57kB                                                                                                                  0.0s
    => => sha256:d6a1e2ab00f777c5cc735d3a1c78769cea2e2a220511c162907da2c6758e916f 8.76kB / 8.76kB                                                                                                                  0.0s
    => => sha256:d49e54c17cd83bb015a10bea1e05084d9630afc9a4feac1aa3ceb5ae647dd9d8 603B / 603B                                                                                                                      0.4s
    => => extracting sha256:455c02918c4592a9beeeae47df541266f3ea53ed573feb767e5e8ab8dcee146e                                                                                                                       0.1s
    => => sha256:0263029b2ae8863b72df3f821517b4ac5cfaff6cd482cca560636edee07d91a2 894B / 894B                                                                                                                      0.3s
    => => sha256:7a15a92d87b89cf5803fd585091af1cd8ba3216f8bb9639c7e7beb8358f88f4b 664B / 664B                                                                                                                      0.4s
    => => extracting sha256:08b6b842dcd703db7772921ad226048f2f8b0bec2e1fcaaa55a59b66c4772db3                                                                                                                       0.5s
    => => sha256:9fed390110deadba2d9f188f3d75b177f94ceababaf7d603ed64b30ad346ee0d 1.39kB / 1.39kB                                                                                                                  0.5s
    => => extracting sha256:d49e54c17cd83bb015a10bea1e05084d9630afc9a4feac1aa3ceb5ae647dd9d8                                                                                                                       0.0s
    => => extracting sha256:0263029b2ae8863b72df3f821517b4ac5cfaff6cd482cca560636edee07d91a2                                                                                                                       0.0s
    => => extracting sha256:7a15a92d87b89cf5803fd585091af1cd8ba3216f8bb9639c7e7beb8358f88f4b                                                                                                                       0.0s
    => => extracting sha256:9fed390110deadba2d9f188f3d75b177f94ceababaf7d603ed64b30ad346ee0d                                                                                                                       0.0s
    => [nginx internal] load build context                                                                                                                                                                         0.0s
    => => transferring context: 92.88kB                                                                                                                                                                            0.0s
    => [nginx 2/4] COPY nginx.conf /etc/nginx/nginx.conf                                                                                                                                                           0.0s
    => [nginx 3/4] COPY ngx_http_redis_module.so /usr/lib/nginx/modules/ngx_http_redis_module.so                                                                                                                   0.0s
    => [nginx 4/4] COPY overfast-api.conf /etc/nginx/conf.d/default.conf                                                                                                                                           0.0s
    => [nginx] exporting to image                                                                                                                                                                                  0.0s
    => => exporting layers                                                                                                                                                                                         0.0s
    => => writing image sha256:b17cb20d6e98fc6abf923c2c485464ed198eae699a116e9fdddc583ea98ba96b                                                                                                                    0.0s
    => => naming to docker.io/library/overfast-api-nginx                                                                                                                                                           0.0s
    Stopping OverFastAPI and cleaning containers...
    docker compose down -v --remove-orphans
    WARN[0000] /home/dev/overfast-api/docker-compose.yml: `version` is obsolete 
    Launching OverFastAPI (production mode)...
    docker compose up -d
    WARN[0000] /home/dev/overfast-api/docker-compose.yml: `version` is obsolete 
    [+] Running 5/5
    ✔ Network overfast-api_default     Created                                                                                                                                                                     0.1s 
    ✔ Container overfast-api-redis-1   Healthy                                                                                                                                                                     4.6s 
    ✘ Container overfast-api-app-1     Error                                                                                                                                                                      19.6s 
    ✔ Container overfast-api-worker-1  Started                                                                                                                                                                     4.1s 
    ✔ Container overfast-api-nginx-1   Created                                                                                                                                                                     0.0s 
    dependency failed to start: container overfast-api-app-1 is unhealthy
    make: *** [Makefile:65: up] Error 1

Expected behavior overfast-api runs well

Screenshots

Additional context my server specs: image

and docker version: image

TeKrop commented 2 weeks ago

@itzdrli Found an issue with healthcheck since Docker update on my server, updating ⌛

TeKrop commented 2 weeks ago

I fixed the issue on my side, let me know if it solved it for you 👍

itzdrli commented 2 weeks ago

@TeKrop I have done the whole thing again and still errored, here is the full log

root@itzdrli-dev-armv8:/home/dev# git clone https://github.com/TeKrop/overfast-api
Cloning into 'overfast-api'...
remote: Enumerating objects: 2792, done.
remote: Counting objects: 100% (776/776), done.
remote: Compressing objects: 100% (391/391), done.
remote: Total 2792 (delta 586), reused 406 (delta 385), pack-reused 2016
Receiving objects: 100% (2792/2792), 14.24 MiB | 21.96 MiB/s, done.
Resolving deltas: 100% (1963/1963), done.
root@itzdrli-dev-armv8:/home/dev# cd overfast-api/
root@itzdrli-dev-armv8:/home/dev/overfast-api# make up
Building OverFastAPI (production mode)...
docker compose build
WARN[0000] The "APP_VOLUME_PATH" variable is not set. Defaulting to a blank string. 
WARN[0000] The "APP_PORT" variable is not set. Defaulting to a blank string. 
[+] Building 42.0s (22/33)                                                                                                                                                                            docker:default
 => [redis internal] load build definition from Dockerfile                                                                                                                                                      0.0s
 => => transferring dockerfile: 109B                                                                                                                                                                            0.0s
 => [redis internal] load metadata for docker.io/library/redis:alpine                                                                                                                                           0.8s
 => [redis internal] load .dockerignore                                                                                                                                                                         0.0s
 => => transferring context: 2B                                                                                                                                                                                 0.0s
 => [redis 1/4] FROM docker.io/library/redis:alpine@sha256:0389bb8416d7c6ed065c25745179bf5d358e5d9472dd30a687ab36ffbb650262                                                                                     0.0s
 => [redis internal] load build context                                                                                                                                                                         0.0s
 => => transferring context: 878B                                                                                                                                                                               0.0s
 => CACHED [redis 2/4] WORKDIR /redis                                                                                                                                                                           0.0s
 => CACHED [redis 3/4] COPY init.sh ./                                                                                                                                                                          0.0s
 => CACHED [redis 4/4] RUN chmod +x init.sh                                                                                                                                                                     0.0s
 => [redis] exporting to image                                                                                                                                                                                  0.0s
 => => exporting layers                                                                                                                                                                                         0.0s
 => => writing image sha256:2c92f9ca2855eb09cbfdea5edabec9d27a207e0ca51a6d7dd5a51a1263b2e513                                                                                                                    0.0s
 => => naming to docker.io/library/overfast-api-redis                                                                                                                                                           0.0s
 => [worker internal] load build definition from Dockerfile                                                                                                                                                     0.0s
 => => transferring dockerfile: 1.04kB                                                                                                                                                                          0.0s
 => [app internal] load metadata for docker.io/library/python:3.12-alpine                                                                                                                                       0.7s
 => [app internal] load build definition from Dockerfile                                                                                                                                                        0.0s
 => => transferring dockerfile: 1.04kB                                                                                                                                                                          0.0s
 => [app internal] load .dockerignore                                                                                                                                                                           0.0s
 => => transferring context: 2B                                                                                                                                                                                 0.0s
 => [worker internal] load .dockerignore                                                                                                                                                                        0.0s
 => => transferring context: 2B                                                                                                                                                                                 0.0s
 => [worker main  1/10] FROM docker.io/library/python:3.12-alpine@sha256:d24ed567ee3b972478a232ceff84b0d002e18ee9f5d38234ecbffece23dfa084                                                                       0.0s
 => [app internal] load build context                                                                                                                                                                           0.1s
 => => transferring context: 10.25MB                                                                                                                                                                            0.1s
 => [worker internal] load build context                                                                                                                                                                        0.1s
 => => transferring context: 10.25MB                                                                                                                                                                            0.1s
 => CACHED [worker main  2/10] WORKDIR /code                                                                                                                                                                    0.0s
 => CACHED [worker main  3/10] RUN apk add build-base &&   apk add libffi-dev &&   pip install poetry==1.8.2                                                                                                    0.0s
 => [app main  4/10] COPY pyproject.toml /code/                                                                                                                                                                 0.1s
 => [worker main  5/10] COPY poetry.lock /code/                                                                                                                                                                 0.0s
 => ERROR [app main  6/10] RUN poetry config virtualenvs.create false &&  poetry install --only main --no-interaction --no-ansi                                                                                40.2s
------
 > [app main  6/10] RUN poetry config virtualenvs.create false &&       poetry install --only main --no-interaction --no-ansi:
1.580 Skipping virtualenv creation, as specified in config file.
1.881 Installing dependencies from lock file
2.118 
2.118 Package operations: 41 installs, 1 update, 0 removals
2.118 
2.118   - Installing mdurl (0.1.2)
2.119   - Installing sniffio (1.3.1)
39.88 
39.88   gaierror
39.88 
39.88   [Errno -3] Try again
39.88 
39.88   at /usr/local/lib/python3.12/socket.py:964 in getaddrinfo
39.90       960│     """
39.90       961│     # We override this function since we want to translate the numeric family
39.90       962│     # and socket type values to enum constants.
39.90       963│     addrlist = []
39.90     → 964│     for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
39.90       965│         af, socktype, proto, canonname, sa = res
39.90       966│         addrlist.append((_intenum_converter(af, AddressFamily),
39.90       967│                          _intenum_converter(socktype, SocketKind),
39.90       968│                          proto, canonname, sa))
39.90 
39.90 The following error occurred when trying to handle this error:
39.90 
39.90 
39.90   NameResolutionError
39.90 
39.90   <urllib3.connection.HTTPSConnection object at 0xffff8c0d8950>: Failed to resolve 'pypi.org' ([Errno -3] Try again)
39.90 
39.90   at /usr/local/lib/python3.12/site-packages/urllib3/connection.py:205 in _new_conn
39.91       201│                 source_address=self.source_address,
39.91       202│                 socket_options=self.socket_options,
39.91       203│             )
39.91       204│         except socket.gaierror as e:
39.91     → 205│             raise NameResolutionError(self.host, self, e) from e
39.91       206│         except SocketTimeout as e:
39.91       207│             raise ConnectTimeoutError(
39.91       208│                 self,
39.91       209│                 f"Connection to {self.host} timed out. (connect timeout={self.timeout})",
39.91 
39.91 The following error occurred when trying to handle this error:
39.91 
39.91 
39.91   MaxRetryError
39.91 
39.91   HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /pypi/mdurl/0.1.2/json (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0xffff8c0d8950>: Failed to resolve 'pypi.org' ([Errno -3] Try again)"))
39.91 
39.91   at /usr/local/lib/python3.12/site-packages/urllib3/util/retry.py:515 in increment
39.92       511│         )
39.92       512│ 
39.92       513│         if new_retry.is_exhausted():
39.92       514│             reason = error or ResponseError(cause)
39.92     → 515│             raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
39.92       516│ 
39.92       517│         log.debug("Incremented Retry for (url='%s'): %r", url, new_retry)
39.92       518│ 
39.92       519│         return new_retry
39.92 
39.92 The following error occurred when trying to handle this error:
39.92 
39.92 
39.92   ConnectionError
39.92 
39.92   HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /pypi/mdurl/0.1.2/json (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0xffff8c0d8950>: Failed to resolve 'pypi.org' ([Errno -3] Try again)"))
39.92 
39.92   at /usr/local/lib/python3.12/site-packages/requests/adapters.py:700 in send
39.93       696│             if isinstance(e.reason, _SSLError):
39.93       697│                 # This branch is for urllib3 v1.22 and later.
39.93       698│                 raise SSLError(e, request=request)
39.93       699│ 
39.93     → 700│             raise ConnectionError(e, request=request)
39.93       701│ 
39.93       702│         except ClosedPoolError as e:
39.93       703│             raise ConnectionError(e, request=request)
39.93       704│ 
39.93 
39.93 Cannot install mdurl.
39.93 
39.93 
39.93   gaierror
39.93 
39.93   [Errno -3] Try again
39.93 
39.93   at /usr/local/lib/python3.12/socket.py:964 in getaddrinfo
39.95       960│     """
39.95       961│     # We override this function since we want to translate the numeric family
39.95       962│     # and socket type values to enum constants.
39.95       963│     addrlist = []
39.95     → 964│     for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
39.95       965│         af, socktype, proto, canonname, sa = res
39.95       966│         addrlist.append((_intenum_converter(af, AddressFamily),
39.95       967│                          _intenum_converter(socktype, SocketKind),
39.95       968│                          proto, canonname, sa))
39.95 
39.95 The following error occurred when trying to handle this error:
39.95 
39.95 
39.95   NameResolutionError
39.95 
39.95   <urllib3.connection.HTTPSConnection object at 0xffff8c0d8590>: Failed to resolve 'pypi.org' ([Errno -3] Try again)
39.95 
39.95   at /usr/local/lib/python3.12/site-packages/urllib3/connection.py:205 in _new_conn
39.96       201│                 source_address=self.source_address,
39.96       202│                 socket_options=self.socket_options,
39.96       203│             )
39.96       204│         except socket.gaierror as e:
39.96     → 205│             raise NameResolutionError(self.host, self, e) from e
39.96       206│         except SocketTimeout as e:
39.97       207│             raise ConnectTimeoutError(
39.97       208│                 self,
39.97       209│                 f"Connection to {self.host} timed out. (connect timeout={self.timeout})",
39.97 
39.97 The following error occurred when trying to handle this error:
39.97 
39.97 
39.97   MaxRetryError
39.97 
39.97   HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /pypi/sniffio/1.3.1/json (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0xffff8c0d8590>: Failed to resolve 'pypi.org' ([Errno -3] Try again)"))
39.97 
39.97   at /usr/local/lib/python3.12/site-packages/urllib3/util/retry.py:515 in increment
39.97       511│         )
39.97       512│ 
39.97       513│         if new_retry.is_exhausted():
39.97       514│             reason = error or ResponseError(cause)
39.97     → 515│             raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
39.97       516│ 
39.97       517│         log.debug("Incremented Retry for (url='%s'): %r", url, new_retry)
39.97       518│ 
39.97       519│         return new_retry
39.97 
39.97 The following error occurred when trying to handle this error:
39.97 
39.97 
39.97   ConnectionError
39.97 
39.97   HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /pypi/sniffio/1.3.1/json (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0xffff8c0d8590>: Failed to resolve 'pypi.org' ([Errno -3] Try again)"))
39.97 
39.97   at /usr/local/lib/python3.12/site-packages/requests/adapters.py:700 in send
39.98       696│             if isinstance(e.reason, _SSLError):
39.98       697│                 # This branch is for urllib3 v1.22 and later.
39.98       698│                 raise SSLError(e, request=request)
39.98       699│ 
39.98     → 700│             raise ConnectionError(e, request=request)
39.98       701│ 
39.98       702│         except ClosedPoolError as e:
39.98       703│             raise ConnectionError(e, request=request)
39.98       704│ 
39.98 
39.98 Cannot install sniffio.
39.98 
------
failed to solve: process "/bin/sh -c poetry config virtualenvs.create false && \tpoetry install --only main --no-interaction --no-ansi" did not complete successfully: exit code: 1
make: *** [Makefile:61: up] Error 17
TeKrop commented 2 weeks ago

It seems you had a ponctual DNS issue with pypi.org (where python packages are downloaded), so it failed before the healthcheck. Can you retry now and tell me if it's still the case?

itzdrli commented 2 weeks ago

Can you retry now and tell me if it's still the case?

yes, I have retried and still the same, but when I do ping pypi.org, it shows fine (maybe?

image

TeKrop commented 2 weeks ago

Hmm that's weird 🤔 Can you try to clean Docker cache before build? I'm usually doing make clean for that. Be careful as it will do a general cleaning, not only the images and layers concerning the API

docker image prune -af
docker network prune -f
itzdrli commented 2 weeks ago

Thanks, I'll try that later when I'm free. Another working theory is that my docker has some DNS related issues. Bcz another container of mine has the same issue, so I'll try to fix it by both way.


From: Valentin Porchet @.> Sent: Tuesday, June 11, 2024 9:16:12 AM To: TeKrop/overfast-api @.> Cc: Itz_Dr_Li @.>; Mention @.> Subject: Re: [TeKrop/overfast-api] Error while trying to start overfast-api (Issue #130)

Hmm that's weird 🤔 Can you try to clean Docker cache before build? I'm usually doing make clean for that. Be careful as it will do a general cleaning, not only the images and layers concerning the API

docker image prune -af docker network prune -f

— Reply to this email directly, view it on GitHubhttps://github.com/TeKrop/overfast-api/issues/130#issuecomment-2160083414, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMPKALDFIFWYCLSD3O3JSQTZG2W4ZAVCNFSM6AAAAABJA2ANEGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRQGA4DGNBRGQ. You are receiving this because you were mentioned.Message ID: @.***>

TeKrop commented 2 weeks ago

@itzdrli OK 👍 Don't hesitate to give me an update when you'll have some news, in order to know if the healthcheck issue is solved for you

itzdrli commented 2 weeks ago

@TeKrop hey, the issue up there is solved by changing DNS server, but now another issue came up:

after I created a new instance (removed all old containers) then I cloned the repo and edited .env, then I did make up, everything seems fine: image then I checked my docker panel and it showed like this: image so I went to see the log of overfast-api-nginx-1:

/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration

/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/

/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh

10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf

10-listen-on-ipv6-by-default.sh: info: /etc/nginx/conf.d/default.conf differs from the packaged version

/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh

/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh

/docker-entrypoint.sh: Configuration complete; ready for start up

2024/06/11 17:33:38 [emerg] 1#1: dlopen() "/usr/lib/nginx/modules/ngx_http_redis_module.so" failed (Error relocating /usr/lib/nginx/modules/ngx_http_redis_module.so: unsupported relocation type 7) in /etc/nginx/nginx.conf:7

nginx: [emerg] dlopen() "/usr/lib/nginx/modules/ngx_http_redis_module.so" failed (Error relocating /usr/lib/nginx/modules/ngx_http_redis_module.so: unsupported relocation type 7) in /etc/nginx/nginx.conf:7

any idea how this happend?

TeKrop commented 2 weeks ago

@itzdrli I just noticed you're using ARM-based environment, and I didn't test the API on this kind of environment 😅 The ngx_http_redis.so nginx module I'm using in the project has only been compiled once for the project, and it may explain the issue you're encountering.

I'm currently working on dynamically compiling it on image build instead, I hope it will solve your issue, I'll keep you updated 👍

TeKrop commented 2 weeks ago

@itzdrli I made the update in the last release, let me know if it works better on your end now

itzdrli commented 2 weeks ago

@TeKrop everything is running now, and they are working fine! Thank you for all the help!