Welcome to the new Schneider Electric Community

It's your place to connect with experts and peers, get continuous support, and share knowledge.

  • Explore the new navigation for even easier access to your community.
  • Bookmark and use our new, easy-to-remember address (community.se.com).
  • Get ready for more content and an improved experience.

Contact SchneiderCommunity.Support@se.com if you have any questions.

Close
Invite a Co-worker
Send a co-worker an invite to the Exchange portal.Just enter their email address and we’ll connect them to register. After joining, they will belong to the same company.
Send Invite Cancel
84549members
353810posts

PCNS cannot execute command file. vMa 6 on free ESXi 6.0 u2 setup

APC UPS Data Center & Enterprise Solutions Forum

Schneider Electric support forum for our Data Center and Business Power UPS, UPS Accessories, Software, Services, and associated commercial products designed to share knowledge, installation, and configuration.

Solved
BillP
Administrator Administrator
Administrator
0 Likes
3
245

PCNS cannot execute command file. vMa 6 on free ESXi 6.0 u2 setup

This question was originally posted by Johnathan on APC forums on 9/28/2016


I have an SUA 1000 UPS with a AP9617 network card. 

I wish to use the network card to shut down the ESXi 6.0u2 server that it connects to. 

ln PCNS, I configured the shutdown settings to run the command file /opt/APC/PowerChute/group1/bin/doshutdown1.sh when UPS on battery

doshutdown1.sh is simply an executable script that does this:

#!/bin/sh

ssh  root@xxx.xxx.xxx.xxx "/sbin/shutdown && /sbin/poweroff"  

This script works fine when I am in vMa 6 and executes the script from there directly.

However, when UPS is on battery, it does not execute the command file .

I have attached the cmdfile.log and the error.log

Please help. thank you

Attachments
Tags (4)

Accepted Solutions
BillP
Administrator Administrator
Administrator
0 Likes
0
245

Re: PCNS cannot execute command file. vMa 6 on free ESXi 6.0 u2 setup

This reply was originally posted by Bill on APC forums on 10/3/2016


Hi,

When PowerChute is installed on a vMA it is installed as root user.

The command file log shows permission denied and publickey, password. 

[Tue Sep 27 12:04:48 SGT 2016] - Permission denied, please try again.
[Tue Sep 27 12:04:48 SGT 2016] - Permission denied, please try again.
[Tue Sep 27 12:04:48 SGT 2016] - Permission denied (publickey,password).

When you run the file from the command prompt are you logged in as root or vi-admin? It is possible that root is being blocked. See this web site for more information. 

http://linuxcommando.blogspot.com/2013/04/one-liner-to-shutdown-remote-host.html?_sm_au_=ijVFHr4kTZQ...

VMware also offers knowledge base 1013193 "ESXi/ESX 4.x and ESXi 5.x/6.0 shutdown and reboot commands"

See Answer In Context

3 Replies 3
BillP
Administrator Administrator
Administrator
0 Likes
0
245

Re: PCNS cannot execute command file. vMa 6 on free ESXi 6.0 u2 setup

This reply was originally posted by Bill on APC forums on 9/29/2016


Hi,

Most likely the issue is PCNS does not have the proper permissions to shutdown the host so it is running the script but the command is not being acted on.

NOTE: The free version of ESXi is not supported by Schneider Electric. If you purchase the appropriate license from VMware PCNS will shutdown the host without the need for you to write your own script.

BillP
Administrator Administrator
Administrator
0 Likes
0
245

Re: PCNS cannot execute command file. vMa 6 on free ESXi 6.0 u2 setup

This reply was originally posted by Johnathan on APC forums on 9/29/2016


Hi Bill ,

Thank you for responding. I was hoping for a more helpful answer rather than " the free version of ESXi is not supported .." For various reasons, not all of us need or are able to afford the paid version of ESXi. 

If PCNS does not have the proper permissions, how do we enable it to have the right permissions?

There was previous workarounds using perl scripts, but that was for an older vMa, PCNS and ESXi. Using the same scripts , errors regarding the "hostfile" came up. Would you be able to advise or give pointers on that?

I am hopeful the purchase of the network card would not be a total waste

BillP
Administrator Administrator
Administrator
0 Likes
0
246

Re: PCNS cannot execute command file. vMa 6 on free ESXi 6.0 u2 setup

This reply was originally posted by Bill on APC forums on 10/3/2016


Hi,

When PowerChute is installed on a vMA it is installed as root user.

The command file log shows permission denied and publickey, password. 

[Tue Sep 27 12:04:48 SGT 2016] - Permission denied, please try again.
[Tue Sep 27 12:04:48 SGT 2016] - Permission denied, please try again.
[Tue Sep 27 12:04:48 SGT 2016] - Permission denied (publickey,password).

When you run the file from the command prompt are you logged in as root or vi-admin? It is possible that root is being blocked. See this web site for more information. 

http://linuxcommando.blogspot.com/2013/04/one-liner-to-shutdown-remote-host.html?_sm_au_=ijVFHr4kTZQ...

VMware also offers knowledge base 1013193 "ESXi/ESX 4.x and ESXi 5.x/6.0 shutdown and reboot commands"