When user runs vbr.py --task backup command, got error Permission denied publickey gssapi-with-mic password
search cancel

When user runs vbr.py --task backup command, got error Permission denied publickey gssapi-with-mic password

book

Article ID: 20099

calendar_today

Updated On:

Products

CA Infrastructure Performance

Issue/Introduction

Description:

Problem:

When user runs vertica database backup first time, got this error:

[dradmin@IM4RHDR ~]$ /opt/vertica/bin/vbr.py --task backup --config-file /export/dradmin/backup-cfg.ini
Preparing...
Found Database port: 5433
The authenticity of host '<HOST IP> (<HOST IP>)' can't be established.
RSA key fingerprint is 5f::...<redacted>...:00:00.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '<HOST IP>' (RSA) to the list of known hosts.
Permission denied (publickey,gssapi-with-mic,password).
Unable to ssh to host: <HOST IP>
backup failed!

Environment

Release:
Component: IMAGGR

Resolution

Solution:

Workaround:

This is because user has not setup the passwordless ssh key yet.

Without it, user can not backup the Data Repository.

  1. Create a backup config file first, see example below:
    [dradmin@<hostname> ~]$ /opt/vertica/bin/vbr.py --setupconfig
    Snapshot name (backup_snapshot): backup-cfg
    Backup vertica configurations? (n) [y/n]: y
    Number of restore points (1):
    Specify objects (no default):
    Vertica user name (dradmin):
    Save password to avoid runtime prompt? (n) [y/n]: y
    Password to save in vbr config file (no default):
    Node v_da_dr_node0001
    Backup host name (no default): <hostname>
    Backup directory (no default): /export/dradmin/dbbackup
    Config file name (backup-cfg.ini):
    Change advanced settings? (n) [y/n]: n
    Saved vbr configuration to backup-cfg.ini.
    [dradmin@<hostname> ~]$ ls -l
    total 78180
    -rw-rw-r-- 1 dradmin dradmin 260 Jun 17 15:27 backup-cfg.ini

  2. Type the following commands to set up the Linux user account for the database administrator user with a passwordless ssh key:

    Login as the vertica db admin user, run command:

    1. ssh-keygen -N "" -t rsa -f ~/.ssh/id_rsa

    2. cp ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys2

    3. chmod 644 ~/.ssh/authorized_keys2

      Log out the database administrator user account and then log in as root user to run this command:

    4. /etc/init.d/sshd restart

      log out root user and relogin as the vertica database administrator user
      After above steps, user should be able to continue back up the database.

      See below as example:

      [dradmin@<hostname> ~]$ /opt/vertica/bin/vbr.py --task backup --config-file /export/dradmin/backup-cfg.ini
      Preparing...
      Found Database port: 5433
      Copying...
      322270290 out of 322270290, 100%
      All child processes terminated successfully.
      Committing changes on all backup sites...
      backup done!