Skip to content

Commit

Permalink
utils: increase the FTP timeout
Browse files Browse the repository at this point in the history
Fix infra issues with the fridge:

```
0:02:20.991012 Recipe 'gst-fluendo-mp3dec-1.0' failed at the build step 'upload_binary'
Traceback (most recent call last):
  File "./cerbero/cerbero/build/oven.py", line 249, in _cook_recipe
    _run_step(stepfunc, recipe)
  File "./cerbero/cerbero/build/oven.py", line 235, in _run_step
    stepfunc(*args)
  File "./cerbero/cerbero/build/fridge.py", line 275, in upload_binary
    self.binaries_remote.upload_binary(fetch_package, self.binaries_local,
  File "./cerbero/cerbero/build/fridge.py", line 144, in upload_binary
    with Ftp(self.remote, user=self.username, password=self.password) as ftp:
  File "./cerbero/cerbero/utils/shell.py", line 506, in __init__
    self.ftp.connect(remote.hostname, remote.port or 0)
  File "/usr/lib/python3.8/ftplib.py", line 154, in connect
    self.sock = socket.create_connection((self.host, self.port), self.timeout,
  File "/usr/lib/python3.8/socket.py", line 808, in create_connection
    raise err
  File "/usr/lib/python3.8/socket.py", line 796, in create_connection
    sock.connect(sa)
TimeoutError: [Errno 110] Connection timed out
```
  • Loading branch information
rgonzalezfluendo committed Jun 21, 2023
1 parent d03c864 commit 4e4415a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cerbero/utils/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ class Ftp:
def __init__(self, remote_url, user=None, password=None):
remote = urllib.parse.urlparse(remote_url)
self.ftp = FTP()
self.ftp.connect(remote.hostname, remote.port or 0)
self.ftp.connect(remote.hostname, remote.port or 0, timeout=5)
self.ftp.login(user, password)

def close(self):
Expand Down

0 comments on commit 4e4415a

Please sign in to comment.