Article ID: 123209, created on Oct 22, 2014, last review on Jun 17, 2016

  • Applies to:
  • Virtuozzo
  • Virtuozzo containers
  • Virtuozzo hypervisor
  • Virtual Automation

Symptoms

PVA Management Node is not available, and it is necessary to unregister Slave Node from the Master group. Executing vzagroup removeFromGroup fails with the following error:

On Windows:

C:\> vzagroup removeFromGroup 10.39.87.2
Connecting to a remote host...
Login to 10.39.87.2: root
root@10.39.87.2's password:
Can't initialize connection: Connection to vzagent was closed [error 10060 (A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)]

On Linux:

[root@pvc ~]# vzagroup removeFromGroup 10.39.87.2
Connecting to a remote host...
Login to 10.39.87.2: root
root@10.39.87.2's password:
Can't initialize connection: Connection to vzagent was closed []

Cause

vzagroup removeFromGroup command requires Management Node (Master Node) to be online in order to unregister the Slave.

Resolution

When Master is unavailable the only option is to unregister the node manually by ediiting vzagent.conf file.

  1. Stop PVA Agent and PVA Power Panel services

    On Windows:

    C:\> net stop pvaagent /Y && net stop pvapp /Y 
    
    The PVA Agent service was stopped successfully.
    
    The PVA Power Panel Director service was stopped successfully.
    

    On Linux:

    [root@pvc ~]# pvaagent stop; pvapp stop
    Shutting pvaagentd:                                        [  OK  ]
    Stopping pvappd:                                           [  OK  ]
    
  2. Locate PVA Agent configuration file, vzagent.conf

    NOTE: If you already know where vzagent.conf is located, you may skip to step 3

    vzagent.conf is located in etc_folder directory of PVA Agent, therefore task to find vzagent.conf narrows down to finding location of the etc_folder. Directory mapping can be found in pva.conf which is passed to the service on startup, as an argument to the binary:

    On Windows:

    1. Find path to pva.conf:

      C:\>sc qc pvaagent | findstr BINARY
      BINARY_PATH_NAME   : C:\Program Files (x86)\Parallels\Parallels Virtual Automation\Agent\bin\pvaagentd.exe pva.conf
      

      NOTE: by default, and in this example, path to pva.conf is relative, which means it is in the same directory as pvaagentd.exe

    2. Find path to etc_folder in the pva.conf file:

      C:\>findstr etc "C:\Program Files (x86)\Parallels\Parallels Virtual Automation\Agent\bin\pva.conf"
          <name>etc_folder</name>
          <value>C:\vz\PVA\Agent\Data\etc</value>
      

      This means that full path to vzagent.conf will be C:\vz\PVA\Agent\Data\etc\vzagent.conf

    On Linux:

    On Linux machines path to pva.conf is hardcoded, thus it is safe to assume pva.conf will always be in /opt/pva/agent/bin/pva.conf. What's left is to get etc_folder path from it:

    [root@pvc ~]# grep etc /opt/pva/agent/bin/pva.conf
        <name>etc_folder</name>
        <value>/var/opt/pva/agent/etc</value>
    

    This means that full path to vzagent.conf will be /var/opt/pva/agent/etc/vzagent.conf

  3. Create backup for vzagent.conf before you edit it

    On Windows:

    C:\>copy C:\vz\PVA\Agent\Data\etc\vzagent.conf C:\vz\PVA\Agent\Data\etc\vzagent.conf.backup
        1 file(s) copied.
    

    On Linux:

    [root@pvc ~]# cp /var/opt/pva/agent/etc/vzagent.conf{,.backup}
    [root@pvc ~]# ll /var/opt/pva/agent/etc/vzagent.conf*
    -rw-r--r-- 1 root root 12844 Oct 10 14:28 /var/opt/pva/agent/etc/vzagent.conf
    -rw-r--r-- 1 root root 12844 Oct 23 01:33 /var/opt/pva/agent/etc/vzagent.conf.backup
    
  4. Edit vzagent.conf file

    Instructions are same for both Windows and Linux machines

    1. Open vzagent.conf for editing with the text editor of your choice
    2. Locate <master>...</master> tag and remove it along with its content
    3. Locate <map>...</map> tag, within it locate <node> entry that contains reference to the management node, remove this <node>entry completely.

    Below you may find diff file that shows which lines should be removed (lines that start with dash symbol are the ones that were removed):

    [root@pvc ~]# diff /var/opt/pva/agent/etc/vzagent.conf.backup /var/opt/pva/agent/etc/vzagent.conf -pruN
    --- /var/opt/pva/agent/etc/vzagent.conf.backup  2014-10-23 01:33:25.658519166 +0700
    +++ /var/opt/pva/agent/etc/vzagent.conf 2014-10-23 01:36:04.989519128 +0700
    @@ -55,20 +55,6 @@
     <ns1:address>local</ns1:address>
     </conn_info>
     </node>
    -<node>
    -<id>d3d1115d-d7da-0744-8b24-20adaf063519</id>
    -<host>10.39.87.2</host>
    -<conn_info xsi:type="ns1:connection_infoType">
    -<ns1:login xsi:type="ns1:auth_nameType">
    -<ns1:domain></ns1:domain>
    -<ns1:name></ns1:name>
    -<ns1:realm>00000000-0000-0000-0000-000000000006</ns1:realm>
    -</ns1:login>
    -<ns1:protocol>SSL</ns1:protocol>
    -<ns1:port>4534</ns1:port>
    -<ns1:address>10.39.87.2</ns1:address>
    -</conn_info>
    -</node>
     </map>
     <log>off</log>
     <log_level>3</log_level>
    @@ -514,9 +500,6 @@
     <queue>1000</queue>
     </custom>
     <slave_license_update_timeout>120</slave_license_update_timeout>
    -<master>
    -<id>d3d1115d-d7da-0744-8b24-20adaf063519</id>
    -</master>
     </configuration>
     </server_group>
     <env_event_mon>
    
  5. Start back PVA Agent and PVA Power Panel services

    On Windows:

    C:\>net start pvaagent && net start pvapp
    The PVA Agent service is starting.
    The PVA Agent service was started successfully.
    
    The PVA Power Panel Director service is starting.
    The PVA Power Panel Director service was started successfully.
    

    On Linux:

    [root@pvc ~]# pvaagent start; pvapp start
    Starting pvaagentd:                                        [  OK  ]
    Starting pvappd:
    Starting httpd:
    
    [root@pvc ~]#
    

Also see

6893 [HOW TO] Unregister offline slave node from PVA MN?

9516 Which ports should be opened on Parallels Virtual Automation (PVA) Slave Nodes and on PVA Management Node?

Search Words

how to unregister pcs

-

how to unregister pva slave from pvamn manually

pva mn down

vzgroup

how to unregister psbm

all hardware nodes showing offline

a26b38f94253cdfbf1028d72cf3a498b 2897d76d56d2010f4e3a28f864d69223 d02f9caf3e11b191a38179103495106f 319940068c5fa20655215d590b7be29b 0dd5b9380c7d4884d77587f3eb0fa8ef

Email subscription for changes to this article
Save as PDF