Discussion:
Permission denied on CMDS
Simone Del Pinto
2013-04-02 16:02:24 UTC
Permalink
Simone Del Pinto [http://community.zenoss.org/people/s.delpinto] created the discussion

"Permission denied on CMDS"

To view the discussion, visit: http://community.zenoss.org/message/72685#72685

--------------------------------------------------------------
Hi guys!

We needed to monitor a java process so we have created a shell script that connect via ssh to server and get the status process. We made this because Zenoss truncate process name to "n" character so we could not monitor that process.

After several tryed we found that sometimes, random, we got this error ( below an extract of zencommand debug logging ):

2013-04-02 17:54:34,676 DEBUG zen.SshClient: 10.134.97.213 channel 1 Opening command channel for $ZENHOME/libexec/check_ps_extended.sh -p snmpd -s warning -h 10.134.97.213
2013-04-02 17:54:34,719 DEBUG zen.SshClient: 10.134.97.213 channel 1 CommandChannel exit code for $ZENHOME/libexec/check_ps_extended.sh -p snmpd -s warning -h 10.134.97.213 is 126: Command invoked cannot execute, permissions problem or command is not an executable
2013-04-02 17:54:34,719 WARNING zen.SshClient: 10.134.97.213 channel 1 The command $ZENHOME/libexec/check_ps_extended.sh -p snmpd -s warning -h 10.134.97.213 returned stderr data (1) from the device: bash: /opt/zenoss/libexec/check_ps_extended.sh: Permission denied


2013-04-02 17:54:34,719 DEBUG zen.SshClient: Unable to send event for {'severity': 4, 'component': 'zencommand', 'agent': 'zencommand', 'summary': 'The command $ZENHOME/libexec/check_ps_extended.sh -p snmpd -s warning -h 10.134.97.213 returned stderr data (1) from the device: bash: /opt/zenoss/libexec/check_ps_extended.sh: Permission denied\n', 'device': '10.134.97.213', 'eventClass': '/Cmd/Fail'}
2013-04-02 17:54:34,720 DEBUG zen.SshClient: 10.134.97.213 channel 0 SshConnection closing
2013-04-02 17:54:34,720 DEBUG zen.SshClient: 10.134.97.213 channel 1 CommandChannel closing command channel for command $ZENHOME/libexec/check_ps_extended.sh -p snmpd -s warning -h 10.134.97.213 with data: ''
2013-04-02 17:54:34,720 DEBUG zen.zencommand: Process PS_EXTENDED_TEMPLATE/check_process_custom stopped (126), 0.13 seconds elapsed
2013-04-02 17:54:34,721 DEBUG zen.collector.scheduler: Task 10.134.97.213 60 Remote changing state from FETCH_DATA to PARSING_DATA
2013-04-02 17:54:34,721 WARNING zen.zencommand: 10.134.97.213 60 Remote PS_EXTENDED_TEMPLATE/check_process_custom No data returned for command


The strange thing is that sometimes it works and other times it dont work! Actually we have 2 templates that do different thing but just onw is working with same criteria...

Any ideas?

Thanks in advance

Simone
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/72685#72685]

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
jcurry
2013-04-05 16:17:10 UTC
Permalink
jcurry [http://community.zenoss.org/people/jcurry] created the discussion

"Re: Permission denied on CMDS"

To view the discussion, visit: http://community.zenoss.org/message/72714#72714

--------------------------------------------------------------
Could this be a timeout issue if it is intermittent?  There is a Configuration Property that you can set for either a device class or override specifically for a device, called zCommandCommandTimeout.  The default is 15 seconds.  You might try increasing this for a test device and see if it works more consistently.

Cheers,
Jane
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/72714#72714]

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Loading...