Symptoms

A backup to a remote server fails with an error like the following:

Error message : 422 : Failed to connect to backup server: Can't connect: System errors : unauthorized request

Cause

The issue might be caused by one of the following reasons:

  • A large number of concurrent sessions being opened on the Backup Storage node.
  • Incorrect network routing configuration to the Backup Storage node.

Resolution

For the large number of sessions:

  1. Log on to the Backup Storage node shell.

  2. Send the following XML API request locally, using vzlcon as per the article KB#111220:

    <packet id="2" version="4.0.0">
    <target>sessionm</target>
    <data>
    <sessionm>
    <list_sessions/>
    </sessionm>
    </data>
    </packet>
    

    Or using the following command:

    ~# echo "<packet><target>sessionm</target><data><sessionm><list_sessions/></sessionm></data></packet>" | /opt/pva/agent/bin/sendRequestViaTCP.pl local -
    
  3. Store the output to a text file, e.g., sessions.txt.

  4. Count the number of sessions, e.g.:

    ~# strings sessions.txt | grep -c '<ns2:id>'
    

    If the number is close to 20 or higher, it is necessary to increase the limit in the PVA Agent configuration file.

  5. Add <user_session_limit>200</user_session_limit> to the sessionm section in vzagent.conf so that the resulting section looks like this:

    <sessionm>
    <configuration>
    <user_session_limit>200</user_session_limit>
    <session_expiration>1200</session_expiration>
    <persistent_session_expiration>180</persistent_session_expiration>
    <inactive_session_expiration>30</inactive_session_expiration>
    </configuration>
    </sessionm>
    
  6. Restart PVA Agent.

To confirm if the problem is caused by incorrect routing:

Check the C:\vzlog\PVA\Agent\yyyy.mm.dd-vzagent or /var/log/pva/agent/yyyy.mm.dd-vzagent.log log on the node to be backed up for the presence of similar error messages:

T=01:30:13:611; L=(err); PID=2536; TID=1a98; P=VZLBackupManagerLocal [VZL::VZLBackupMLocal::getBackupServer] [VZLBackupMLocal::getBackupServer] Failed to connect to backup server: . 10.11.12.13:4434

The specified address (10.11.12.13) is the IP address of the Backup Storage node used for PVA Agent connections (the node can have several NICs but only one IP address is used for PVA Agent communication.) This address should be reachable from all the nodes storing backups on the backup Storage node in question, and the 4434 port on the Backup Storage node should be open.

Additional information

112904 How to set preferred IP address for PVA Agent communications

Internal content