These errors are generated in logs using barman v2.12 and PostgreSQL 13:
barman@postgres ERROR: unrecognized configuration parameter "wal_keep_segments"
barman@postgres STATEMENT: SHOW "wal_keep_segments"
barman@postgres ERROR: current transaction is aborted, commands ignored until end of transaction block
barman@postgres STATEMENT: SELECT 1
I think you get this error because Barman 2.12 does not support PG 13, and here's why - with PostgreSQL 13 wal_keep_segments is replaced by wal_keep_size.