BaseAdresseNationale / addok-docker

Conteneurs Addok pour Docker
157 stars 29 forks source link

Problème sur mac m1 #26

Closed philchass closed 2 years ago

philchass commented 3 years ago

Sur mon mac m1, l'installation se déroule correctement mais le test ne fonctionne pas

curl "http://localhost:7878/search?q=1+rue+de+la+paix+paris" renvoie

<html>
  <head>
    <title>Internal Server Error</title>
  </head>
  <body>
    <h1><p>Internal Server Error</p></h1>

  </body>
</html>

Log Docker agentbis-addok-1 | [2021-10-30 08:33:46 +0000] [26] [ERROR] Error handling request /search?q=1+rue+de+la+paix+paris agentbis-addok-1 | Traceback (most recent call last): agentbis-addok-1 | File "/usr/local/lib/python3.7/site-packages/redis/connection.py", line 484, in connect agentbis-addok-1 | sock = self._connect() agentbis-addok-1 | File "/usr/local/lib/python3.7/site-packages/redis/connection.py", line 511, in _connect agentbis-addok-1 | socket.SOCK_STREAM): agentbis-addok-1 | File "/usr/local/lib/python3.7/socket.py", line 752, in getaddrinfo agentbis-addok-1 | for res in _socket.getaddrinfo(host, port, family, type, proto, flags): agentbis-addok-1 | socket.gaierror: [Errno -3] Temporary failure in name resolution agentbis-addok-1 | agentbis-addok-1 | During handling of the above exception, another exception occurred: agentbis-addok-1 | agentbis-addok-1 | Traceback (most recent call last): agentbis-addok-1 | File "/usr/local/lib/python3.7/site-packages/redis/client.py", line 667, in execute_command agentbis-addok-1 | connection.send_command(args) agentbis-addok-1 | File "/usr/local/lib/python3.7/site-packages/redis/connection.py", line 610, in send_command agentbis-addok-1 | self.send_packed_command(self.pack_command(args)) agentbis-addok-1 | File "/usr/local/lib/python3.7/site-packages/redis/connection.py", line 585, in send_packed_command agentbis-addok-1 | self.connect() agentbis-addok-1 | File "/usr/local/lib/python3.7/site-packages/redis/connection.py", line 489, in connect agentbis-addok-1 | raise ConnectionError(self._error_message(e)) agentbis-addok-1 | redis.exceptions.ConnectionError: Error -3 connecting to redis:6379. Temporary failure in name resolution. agentbis-addok-1 | agentbis-addok-1 | During handling of the above exception, another exception occurred: agentbis-addok-1 | agentbis-addok-1 | Traceback (most recent call last): agentbis-addok-1 | File "/usr/local/lib/python3.7/site-packages/redis/connection.py", line 484, in connect agentbis-addok-1 | sock = self._connect() agentbis-addok-1 | File "/usr/local/lib/python3.7/site-packages/redis/connection.py", line 511, in _connect agentbis-addok-1 | socket.SOCK_STREAM): agentbis-addok-1 | File "/usr/local/lib/python3.7/socket.py", line 752, in getaddrinfo agentbis-addok-1 | for res in _socket.getaddrinfo(host, port, family, type, proto, flags): agentbis-addok-1 | socket.gaierror: [Errno -3] Temporary failure in name resolution agentbis-addok-1 | agentbis-addok-1 | During handling of the above exception, another exception occurred: agentbis-addok-1 | agentbis-addok-1 | Traceback (most recent call last): agentbis-addok-1 | File "/usr/local/lib/python3.7/site-packages/gunicorn/workers/sync.py", line 134, in handle agentbis-addok-1 | self.handle_request(listener, req, client, addr) agentbis-addok-1 | File "/usr/local/lib/python3.7/site-packages/gunicorn/workers/sync.py", line 175, in handle_request agentbis-addok-1 | respiter = self.wsgi(environ, resp.start_response) agentbis-addok-1 | File "/usr/local/lib/python3.7/site-packages/falcon/api.py", line 227, in call agentbis-addok-1 | responder(req, resp, params) agentbis-addok-1 | File "/usr/local/lib/python3.7/site-packages/addok/http/base.py", line 134, in on_get agentbis-addok-1 | lat=lat, lon=lon, filters) agentbis-addok-1 | File "/usr/local/lib/python3.7/site-packages/addok/core.py", line 331, in search agentbis-addok-1 | return helper(query, lat=lat, lon=lon, *filters) agentbis-addok-1 | File "/usr/local/lib/python3.7/site-packages/addok/core.py", line 158, in call agentbis-addok-1 | func(self) agentbis-addok-1 | File "/usr/local/lib/python3.7/site-packages/addok/helpers/search.py", line 21, in search_tokens agentbis-addok-1 | token.search() agentbis-addok-1 | File "/usr/local/lib/python3.7/site-packages/addok/helpers/text.py", line 47, in search agentbis-addok-1 | if DB.exists(self.key): agentbis-addok-1 | File "/usr/local/lib/python3.7/site-packages/redis/client.py", line 951, in exists agentbis-addok-1 | return self.execute_command('EXISTS', name) agentbis-addok-1 | File "/usr/local/lib/python3.7/site-packages/redis/client.py", line 673, in execute_command agentbis-addok-1 | connection.send_command(args) agentbis-addok-1 | File "/usr/local/lib/python3.7/site-packages/redis/connection.py", line 610, in send_command agentbis-addok-1 | self.send_packed_command(self.pack_command(*args)) agentbis-addok-1 | File "/usr/local/lib/python3.7/site-packages/redis/connection.py", line 585, in send_packed_command agentbis-addok-1 | self.connect() agentbis-addok-1 | File "/usr/local/lib/python3.7/site-packages/redis/connection.py", line 489, in connect agentbis-addok-1 | raise ConnectionError(self._error_message(e)) agentbis-addok-1 | redis.exceptions.ConnectionError: Error -3 connecting to redis:6379. Temporary failure in name resolution. agentbis-addok-1 | 172.18.0.1 - - [30/Oct/2021:08:33:46 +0000] "GET /search?q=1+rue+de+la+paix+paris HTTP/1.1" 500 0 "-" "-"

jdesboeufs commented 2 years ago

Il est possible que cette image Docker ne soit pas compatible M1. Si quelqu'un a des éclairages sur le sujet, on est preneurs. Personne n'a de M1 dans l'équipe, à ma connaissance c'est le premier cas d'usage qui se présente.

jdesboeufs commented 2 years ago

L'image n'est pas compatible M1 mais Docker peut la lancer en mode compatibilité. Par ailleurs addok fonctionne très bien sur Apple Silicon. Les performances sont même exceptionnelles.

SamG92 commented 2 years ago

Bonjour,

Je suis intéressé pour savoir comment lancer l'image en mode compatibilité dans docker. J'ai tenté d'ajouter "platform: linux/amd64" dans le fichier docker-compose.yml sans succès.

D'avance merci !

jdesboeufs commented 2 years ago

Les images sont désormais disponibles pour la plateforme linux/arm64.