whishper
whishper copied to clipboard
[BUG] Libretranslate on Synology NAS trace error
Description
When running docker compose, I am getting the following trace error on the libretranslate container. Is this a port problem? Or maybe a directory permissions problem?
This stems from an issue where when I upload a video, I get a "Failed Upload" message, but the video does in fact upload. Not sure if this issue is related to that.
To Reproduce
Steps to reproduce the behavior:
- Run docker compose.
Expected behavior
No errors.
Environment
- OS: Synology NAS (Linux)
- Browser: Brave
- Hosting: Synology NAS Docker
Logs and Configuration
LibreTranslate log:
Traceback (most recent call last): File "/app/venv/lib/python3.10/site-packages/urllib3/connection.py", line 174, in _new_conn conn = connection.create_connection( File "/app/venv/lib/python3.10/site-packages/urllib3/util/connection.py", line 95, in create_connection raise err File "/app/venv/lib/python3.10/site-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 "/app/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/app/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 416, in _make_request conn.request(method, url, **httplib_request_kw) File "/app/venv/lib/python3.10/site-packages/urllib3/connection.py", line 244, in request super(HTTPConnection, self).request(method, url, body=body, headers=headers) File "/usr/local/lib/python3.10/http/client.py", line 1282, in request self._send_request(method, url, body, headers, encode_chunked) File "/usr/local/lib/python3.10/http/client.py", line 1328, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/usr/local/lib/python3.10/http/client.py", line 1277, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/local/lib/python3.10/http/client.py", line 1037, in _send_output self.send(msg) File "/usr/local/lib/python3.10/http/client.py", line 975, in send self.connect() File "/app/venv/lib/python3.10/site-packages/urllib3/connection.py", line 205, in connect conn = self._new_conn() File "/app/venv/lib/python3.10/site-packages/urllib3/connection.py", line 186, in _new_conn raise NewConnectionError( urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f0f3c20a7a0>: 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 "/app/venv/lib/python3.10/site-packages/requests/adapters.py", line 489, in send resp = conn.urlopen( File "/app/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 799, in urlopen retries = retries.increment( File "/app/venv/lib/python3.10/site-packages/urllib3/util/retry.py", line 592, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='0.0.0.0', port=5000): Max retries exceeded with url: /translate (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f0f3c20a7a0>: 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 "/app/scripts/healthcheck.py", line 3, in <module> response = requests.post( File "/app/venv/lib/python3.10/site-packages/requests/api.py", line 115, in post return request("post", url, data=data, json=json, **kwargs) File "/app/venv/lib/python3.10/site-packages/requests/api.py", line 59, in request return session.request(method=method, url=url, **kwargs) File "/app/venv/lib/python3.10/site-packages/requests/sessions.py", line 587, in request resp = self.send(prep, **send_kwargs) File "/app/venv/lib/python3.10/site-packages/requests/sessions.py", line 701, in send r = adapter.send(request, **kwargs) File "/app/venv/lib/python3.10/site-packages/requests/adapters.py", line 565, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPConnectionPool(host='0.0.0.0', port=5000): Max retries exceeded with url: /translate (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f0f3c20a7a0>: Failed to establish a new connection: [Errno 111] Connection refused'))
Docker Compose File
translate:
container_name: whisper-libretranslate
image: libretranslate/libretranslate:latest
restart: unless-stopped
volumes:
- /volume1/docker/whishper/libretranslate/data:/home/libretranslate/.local/share
- /volume1/docker/whishper/libretranslate/cache:/home/libretranslate/.local/cache
env_file:
- /whishper/whishper.env
tty: true
environment:
LT_DISABLE_WEB_UI: True
LT_UPDATE_MODELS: True
PUID: 1024
PGID: 100
expose:
- 5950
networks:
default:
aliases:
- translate
healthcheck:
test: ['CMD-SHELL', './venv/bin/python scripts/healthcheck.py']
interval: 2s
timeout: 3s
retries: 5
I'm also getting this error:
PermissionError: [Errno 13] Permission denied: '/home/libretranslate/.local/share/argos-translate'
I've read that I need to change permissions to 1032 and I have done that, but I am still getting the same error.
I'm running rootless podman
and I see a similar error ever after chown
ing.
Traceback (most recent call last):
File "/app/./venv/bin/libretranslate", line 5, in <module>
from libretranslate.main import main
File "/app/venv/lib/python3.11/site-packages/libretranslate/__init__.py", line 2, in <module>
from .main import main
File "/app/venv/lib/python3.11/site-packages/libretranslate/main.py", line 5, in <module>
from libretranslate.app import create_app
File "/app/venv/lib/python3.11/site-packages/libretranslate/app.py", line 12, in <module>
import argostranslatefiles
File "/app/venv/lib/python3.11/site-packages/argostranslatefiles/__init__.py", line 1, in <module>
from argostranslatefiles.argostranslatefiles import *
File "/app/venv/lib/python3.11/site-packages/argostranslatefiles/argostranslatefiles.py", line 1, in <module>
from argostranslate.translate import ITranslation
File "/app/venv/lib/python3.11/site-packages/argostranslate/translate.py", line 10, in <module>
from argostranslate import apis, fewshot, package, sbd, settings
File "/app/venv/lib/python3.11/site-packages/argostranslate/package.py", line 13, in <module>
from argostranslate import networking, settings
File "/app/venv/lib/python3.11/site-packages/argostranslate/networking.py", line 6, in <module>
from argostranslate.utils import error, info
File "/app/venv/lib/python3.11/site-packages/argostranslate/utils.py", line 4, in <module>
from argostranslate import settings
File "/app/venv/lib/python3.11/site-packages/argostranslate/settings.py", line 19, in <module>
os.makedirs(data_dir, exist_ok=True)
File "<frozen os>", line 225, in makedirs
PermissionError: [Errno 13] Permission denied: '/home/libretranslate/.local/share/argos-translate'