Aug 29, 2011 7:07 AM
Remote python clients interfere with each other.
-
Like (0)
I have a zenoss external method which returns job or device information depending on a parameter in the request. When I have a single python client invoking this external method via urllib2.urlopen() it works fine. If I have two concurrent python clients, they interfere with each other. After a few seconds one of the clients receives a response with the wrong type of data (ie a response that should have gone to the other client), and fails. What am I doing wrong?
David, can you explain what you mean by 'zenoss external method' and 'remote python client'? We may cover this topic in our bi-weekly IRC chat this coming Thur Sept 1. I want to get information on it before hand. If you attend, it is more likely to be discussed.
Also, are each of these multiple python clients on different machines, or the same machine (wondering about IP address)? What is the use case for multiple calls?
> We may cover this topic in our bi-weekly [4]IRC chat this
> coming Thur Sept 1.
Apologies for not attending this. I had gone on holidays,
and didn't know about it until I got back to work today.
> David, can you explain what you mean by 'zenoss
> external method' and
I probably mean a Zope "ExternalMethod" added via the /manage web interface
and implemented in Python.
> 'remote python client'?
A python program running on different machine from the zenoss server stack,
POSTing to the URL corresponding to the external method.
> Also, are each of these multiple python clients on
> different machines, or the same machine (wondering
> about IP address)?
Yes, they were on the same machine => same IP Address.
>What is the use case for multiple calls?
I am implementing a python API which supports starting and
stopping zenoss Jobs and monitoring the state of the Jobs and of
devices with which they are associated.
I decided to facilitate testing by running two python
instances, one repeatedly dumping the job state, and one
dumping out the device state. I was surprised to find the
one of the state dumps failing because it got the wrong type
of state.
The type of state returned by the ExternalMethod was
controlled by a POST parameter. I thought maybe it would work
better if I had two ExternalMethods, one for each type of
state. However that didn't seem to work either.
Regards,
David.
Follow Us On Twitter »
|
Latest from the Zenoss Blog » | Community | Products | Services Resources | Customers Partners | About Us | ||
Copyright © 2005-2011 Zenoss, Inc.
|
||||||||