Discovery publishing failed - what happened?

4 posts / 0 new
Last post
Smcginnis
Smcginnis's picture
Offline
Last seen: 1 month 1 week ago
Joined: 02/08/2017 - 15:06
Posts: 2
Discovery publishing failed - what happened?

I've started to write a ZenPack for our device following the zenpacklib SDK documentation (https://zenpack-sdk.zenoss.com/en/latest/tutorial-http-api/modeler-plugin.html).

For now I am just hard coding a dummy relationship in the collect() call of my monitoring plugin.

When I attempt to "discover" these objects, it appears that everything is fine, but then the last line in the output says publishing failed. There's no prior indication that there's a problem. Is there a way to get more detailed logs to determine what caused it to fail?

Here is the console output:

$ zendisc run --deviceclass=/Storage/DellEMCSCSeries --device=172.23.139.51
2017-02-08 21:19:48,224 INFO zen.ZenDisc: Connecting to localhost:8789
2017-02-08 21:19:48,243 INFO zen.ZenDisc: Connected to the zenhub/0 instance
2017-02-08 21:19:48,323 INFO zen.ZenDisc: Looking for 172.23.139.51
2017-02-08 21:19:48,323 INFO zen.ZenDisc: Found IP 172.23.139.51 for device 172.23.139.51
2017-02-08 21:19:56,147 INFO zen.ZenDisc: Finished scanning device with address 172.23.139.51
2017-02-08 21:19:56,147 INFO zen.ZenDisc: Discovered device 172.23.139.51.
2017-02-08 21:19:56,147 INFO zen.ZenDisc: Result: 172.23.139.51
2017-02-08 21:19:56,155 INFO zen.ZenDisc: skipping WMI-based collection, PySamba zenpack not installed
2017-02-08 21:19:56,156 INFO zen.ZenDisc: Python collection device 172.23.139.51
2017-02-08 21:19:56,156 INFO zen.ZenDisc: plugins: DellEMCSCStorage.SCMap
2017-02-08 21:19:56,156 INFO zen.PythonClient: Collecting SC storage objects for 172.23.139.51
2017-02-08 21:19:56,157 INFO zen.PythonClient: Python client finished collection for 172.23.139.51
2017-02-08 21:19:56,157 INFO zen.ZenDisc: Processing SC storage object results for 172.23.139.51: [<RelationshipMap {'compname': '',
 'objmaps': [<ObjectMap {'id': 'sn60055',
 'modname': 'ZenPacks.zenoss.DellEMCSCStorage.StorageSystem',
 'system_serialnumber': '60055'}>],
 'parentId': '',
 'relname': 'storageSystems'}>]
2017-02-08 21:19:56,158 INFO zen.ZenDisc: No command plugins found for 172.23.139.51
2017-02-08 21:19:56,159 INFO zen.ZenDisc: SNMP monitoring off for 172.23.139.51
2017-02-08 21:19:56,159 INFO zen.ZenDisc: No portscan plugins found for 172.23.139.51
2017-02-08 21:19:56,172 INFO zen.ZenDisc: No change in configuration detected
2017-02-08 21:19:56,172 INFO zen.ZenDisc: Scan time: 0.03 seconds
2017-02-08 21:19:56,173 INFO zen.ZenDisc: Daemon ZenDisc shutting down
2017-02-08 21:19:56,177 INFO zen.publisher: publishing failed: Connection was closed cleanly.

Jcurry
Jcurry's picture
Offline
Last seen: 1 day 11 hours ago
Joined: 01/02/2014 - 13:04
Posts: 391
Looks like zendisc has run

Looks like zendisc has run zenmodeler and your modeler is a Python one?

I would try:

zenmodeler run -v 10 -d <your test device> > /tmp/test_model.out 2>&1

and

zenpython run -v 10 -d <your test device> > /tmp/test_zenpython.out 2>&1

And then check those 2 files.  The -v 10 is verbose logging.  Make sure you redirect stderr to stdout with the "2>&1" bit on the end.

Do you have the ZenPack Developers' Guide?  https://www.skills-1st.co.uk/papers/jane/zpdevguide/ 

Cheers,

Jane

NB Please note that we are away from Feb 10 to March 10, 2017

Smcginnis
Smcginnis's picture
Offline
Last seen: 1 month 1 week ago
Joined: 02/08/2017 - 15:06
Posts: 2
Thanks Jane! That at least

Thanks Jane! That at least gives me a path to start looking down. I get these errors for both:

 

2017-02-14 20:31:24,205 DEBUG zen.pbclientfactory: Lost connection to localhost:8789 - Connection to the other side was lost in a non-clean fashion: Connection lost.
2017-02-14 20:31:24,206 INFO zen.publisher: publishing failed: [<twisted.python.failure.Failure twisted.internet.error.ConnectionLost: Connection to the other side was lost in a non-clean fashion: Connection lost.>]

 

So at least I have something to go on to start.

 

Thanks for the Dev Guide link. I've found about 10 other outdated ones. Looks like yours may actually help. ;)

Jstanley
Jstanley's picture
Offline
Last seen: 6 hours 3 min ago
Joined: 07/10/2014 - 09:31
Posts: 213
Can you show us what you are

Can you show us what you are using for the relmap in your modeler code?

 

Also, is this actually a Zenoss ZenPack? or did you just use 'zenoss' as the company/owner name of the ZenPack?

Log in to post comments