0

当我们尝试使用 wal-e 推送备份时出现以下错误:

2020-07-16T21:18:55Z <Greenlet at 0x7f2a59fadc48: <wal_e.worker.upload.PartitionUploader object at 0x7f2a59f96cc0>([ExtendedTarInfo(submitted_path='/var/lib/postgres)> failed with PermissionError

wal_e.operator.backup WARNING  MSG: blocking on sending WAL segments
  DETAIL: The backup was not completed successfully, but we have to wait anyway.  See README: TODO about pg_cancel_backup
  STRUCTURED: time=2020-07-16T21:18:55.651073-00 pid=19697
wal_e.main   CRITICAL MSG: An unprocessed exception has avoided all error handling
  DETAIL: Traceback (most recent call last):
    File "/var/lib/postgresql/virtualenvs/wal-e/lib/python3.5/site-packages/wal_e/operator/backup.py", line 197, in database_backup
      **kwargs)
    File "/var/lib/postgresql/virtualenvs/wal-e/lib/python3.5/site-packages/wal_e/operator/backup.py", line 500, in _upload_pg_cluster_dir
      pool.put(tpart)
    File "/var/lib/postgresql/virtualenvs/wal-e/lib/python3.5/site-packages/wal_e/worker/upload_pool.py", line 108, in put
      self._wait()
    File "/var/lib/postgresql/virtualenvs/wal-e/lib/python3.5/site-packages/wal_e/worker/upload_pool.py", line 65, in _wait
      raise val
    File "src/gevent/greenlet.py", line 766, in gevent._greenlet.Greenlet.run
    File "/var/lib/postgresql/virtualenvs/wal-e/lib/python3.5/site-packages/wal_e/worker/upload.py", line 96, in __call__
      gpg_key=self.gpg_key) as pl:
    File "/var/lib/postgresql/virtualenvs/wal-e/lib/python3.5/site-packages/wal_e/pipeline.py", line 92, in __enter__
      self.stdin = pipebuf.NonBlockBufferedWriter(stdin)
    File "/var/lib/postgresql/virtualenvs/wal-e/lib/python3.5/site-packages/wal_e/pipebuf.py", line 225, in __init__
      _setup_fd(self._fd)
    File "/var/lib/postgresql/virtualenvs/wal-e/lib/python3.5/site-packages/wal_e/pipebuf.py", line 62, in _setup_fd
      set_buf_size(fd)
    File "/var/lib/postgresql/virtualenvs/wal-e/lib/python3.5/site-packages/wal_e/pipebuf.py", line 53, in set_buf_size
      fcntl.fcntl(fd, fcntl.F_SETPIPE_SZ, OS_PIPE_SZ)
  PermissionError: [Errno 1] Operation not permitted

不清楚为什么 fcntl 调用可能导致 PermissionError。

PostgreSQL 版本:9.6,Python:3.5,Wal-e:1.1.1(也尝试了 1.0.3 和 1.1.0)。

它以前可以工作并且在某个时候停止工作(没有任何明显的变化)。

4

1 回答 1

0

好吧,我比赛迟到了。见https://github.com/wal-e/wal-e/issues/270

我已经通过修补 wal-e 来解决它以不设置它。

于 2022-02-08T19:48:34.157 回答