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.
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 ]
Locate PVA Agent configuration file,
vzagent.conf
NOTE: If you already know where
vzagent.conf
is located, you may skip to step 3vzagent.conf
is located inetc_folder
directory of PVA Agent, therefore task to findvzagent.conf
narrows down to finding location of theetc_folder
. Directory mapping can be found inpva.conf
which is passed to the service on startup, as an argument to the binary:On Windows:
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 aspvaagentd.exe
Find path to
etc_folder
in thepva.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 beC:\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 getetc_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
Create backup for
vzagent.conf
before you edit itOn 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
Edit
vzagent.conf
fileInstructions are same for both Windows and Linux machines
- Open
vzagent.conf
for editing with the text editor of your choice - Locate
<master>...</master>
tag and remove it along with its content - 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>
- Open
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?