Discussion:
DataSource command results in "General Error"
ksolademi
2011-11-04 22:59:41 UTC
Permalink
ksolademi [http://community.zenoss.org/people/ksolademi] created the discussion

"DataSource command results in "General Error""

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

--------------------------------------------------------------
I'm using Zenoss 2.5.2

So I've got a datasource command that is successful when I test it via the "test against device" button in the Data Source editing window, but it fails when bound to that very same device. The error is "- Code: 1 - Msg: General error"

The test looks like this:

Executing command
/usr/local/zenoss/python/bin/python2.4 /usr/local/zenoss/zenoss/scripts/check-mysql-slave.py -u myuser -p 'mypassword' -s 123.456.789.10 -q --get-secs-behind-master
against motherbrain.engagingenglish.com
|seconds_behind_master=0

DONE in 0 seconds

But when bound to the device itself this is the result:

Cmd: /usr/local/zenoss/python/bin/python2.4 /usr/local/zenoss/zenoss/scripts/check-mysql-slave.py -u myuser -p 'mypassword' -s 123.456.789.10 -q --get-secs-behind-master - Code: 1 - Msg: General error

The command is also successful if I log into the server and execute it as the zenoss user. Because of these mixed results I don't know how to go about troubleshooting this problem. What does "Code: 1 - Msg: General error" mean in this case? What is the difference between testing a command against a device, and that same command being bound to a device and run automatically?

Thanks very much ahead of time.
--------------------------------------------------------------

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

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
jmp242
2011-11-07 13:16:33 UTC
Permalink
jmp242 [http://community.zenoss.org/people/jmp242] created the discussion

"Re: DataSource command results in "General Error""

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

--------------------------------------------------------------
The test command doesn't get the same environment as the template. Basically, the Test command is misleadingly named - it does test the command, but only in so far as you would test it at a command line. It's somewhat useful to make sure the command would ever work at all, but not that it's going to work in a template.

To test the command in situ, you need to use the daemons, you could in fact do
zencommand run -d device -v10
AS THE ZENOSS USER.

See:
http://community.zenoss.org/docs/DOC-7752 http://community.zenoss.org/docs/DOC-7752
for docs on zencommand.

Finally, UPGRADE!!! - literally thousands of bugs have been fixed between 2.5.2 and 3.2.1.

--
James Pulver
ZCA Member
LEPP Computer Group
Cornell University
--------------------------------------------------------------

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

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
ksolademi
2011-11-07 21:18:54 UTC
Permalink
ksolademi [http://community.zenoss.org/people/ksolademi] created the discussion

"Re: DataSource command results in "General Error""

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

--------------------------------------------------------------
Thank you, you beautiful genius!

I'll bring the upgrade thing up with our sys admins.
--------------------------------------------------------------

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

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