Upgrade Veeam MS365 to 8.0.2.159 fails with – Unable to connect to the specified server
I just started a upgrading procedure of Veeam MS365 to the latest 8.0.2.159, but fails with error message Unable to connect to the specified server. Error: Failed to connect to: <IP>:<port>. I wanna use an existing PostgreSQL Instance, which was created by Veeam Backup & Replication, the Veeam Backup for Microsoft 365.
its caused by the configuration settings applied to PostgreSQL by Veeam Backup & Replication are incompatible with those required by Veeam Backup for Microsoft 365.
How to resolve it ?
To enable Veeam Backup for Microsoft 365 and Veeam Backup & Replication to share the existing PostgreSQL instance, you must modify several PostgreSQL configuration files described below.
- Stop all task in Veeam Backup and Replication and MS365
- Stop all veeam services via – „Get-Service Veeam* | Stop-Service -Force„
- Open an Administrative PowerShell Console
Run the the following PowerShell script to update the configuration files and restart the PostgreSQL service:
#Modify postgresql.conf to change listen_addresses from 'localhost' to '*' to allow remote connections.
(Get-Content -Path "C:\Program Files\PostgreSQL\15\data\postgresql.conf") -replace "listen_addresses = 'localhost'", "listen_addresses = '*'" | Set-Content -Path "C:\Program Files\PostgreSQL\15\data\postgresql.conf"
# Modify pg_hba.conf to enforce SSPI authentication for 'postgres' user and allow password-based connections (SCRAM-SHA-256) for all other users.
Add-Content -Path "C:\Program Files\PostgreSQL\15\data\pg_hba.conf" "`n# non-localhost host with user 'postgres' and SSPI
host all postgres 0.0.0.0/0 sspi map=veeam
host all postgres ::/0 sspi map=veeam
# non-localhost host with user 'all' and password
host all all 0.0.0.0/0 scram-sha-256
host all all ::/0 scram-sha-256"
# Ensure pg_ident.conf allows SSPI (Windows-based) authentication for the Local System account and the current user, mapped to the postgres account.
If (!(Select-string -Path "C:\Program Files\PostgreSQL\15\data\pg_ident.conf" -Pattern "veeam"))
{
Add-Content -Path "C:\Program Files\PostgreSQL\15\data\pg_ident.conf" "veeam `"SYSTEM@NT AUTHORITY`" postgres
veeam `"$env:UserName@$env:Computername`" postgres"}
#Restart the PostgreSQL Service
Restart-Service -Name "postgresql*"
- Reattempt the Veeam Backup for Microsoft 365 install.