Hello,
I have set up a Barman server on macOS Ventura with MacPorts.
The primary PostgreSQL server is running on a different machine, also with macOS Ventura.
On the Barman server, everything seems to be in order, but the PostgreSQL server keeps logging the following error:
2023-08-21 13:33:26.077 CEST [91942] LOG: archive command failed with exit code 2
2023-08-21 13:33:26.077 CEST [91942] DETAIL: The failed archive command was: barman-wal-archive 192.163.1.38 pg36 pg_wal/00000001000000D400000077
2023-08-21 13:33:26.077 CEST [91942] WARNING: archiving write-ahead log file "00000001000000D400000077" failed too many times, will try again later
ERROR: Error executing ssh: [Errno 32] Broken pipe
Exception ignored in: <function _Stream.__del__ at 0x101438f40>
Traceback (most recent call last):
File "/opt/macports-bin-pkg-version/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/tarfile.py", line 415, in __del__
self.close()
File "/opt/macports-bin-pkg-version/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/tarfile.py", line 465, in close
self.fileobj.write(self.buf)
ValueError: write to closed file
The Postgres server (identified as "pg36" in the Barman configuration) can open an SSH connection for the barman user on the Barman server (ip .38). The command
returns no output, as expected.
If I try the barman-wal-archive in the terminal on the Postgres server, I get a similar result as the in the log:
> barman-wal-archive 192.163.1.38 pg36 pg_wal/00000001000000D400000077
sh: barman: command not found
ERROR: Error executing ssh: [Errno 32] Broken pipe
Exception ignored in: <function _Stream.__del__ at 0x104df4f40>
Traceback (most recent call last):
File "/opt/macports-bin-pkg-version/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/tarfile.py", line 415, in __del__
self.close()
File "/opt/macports-bin-pkg-version/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/tarfile.py", line 465, in close
self.fileobj.write(self.buf)
ValueError: write to closed file
Any idea why I keep getting this error?