AWS Thinkbox Discussion Forums

Struggling to connect to Pulse with standalone API

Hi,

I tried using the standalone API as the documentation suggests it but I’m having an error and I can’t find out what could be wrong.

Pulse is running fine and I got pulseName and pulsePort from it. However I_still get the error below with the code preceding :

from Deadline.DeadlineConnect import DeadlineCon as Connect
con = Connect('workstation001', 45359)

root = con.Repository.GetRootDirectory()
print root

Traceback (most recent call last):
File “/server/dev/deadline/testStandaloneAPI.py”, line 12, in
root = con.Repository.GetRootDirectory()
File “/server/deadline/repository/api/python/Deadline/Repository.py”, line 47, in GetRootDirectory
return str((self.connectionProperties.get("/api/repository?Directory=root")))
File “/server/deadline/repository/api/python/Deadline/ConnectionProperty.py”, line 35, in get
return DeadlineSend.send(self.address,commandString, “GET”, self.useAuth, self.user, self.password)
File “/server/deadline/repository/api/python/Deadline/DeadlineSend.py”, line 29, in send
response = opener.open(request)
File “/usr/lib/python2.7/urllib2.py”, line 429, in open
response = self._open(req, data)
File “/usr/lib/python2.7/urllib2.py”, line 447, in _open
‘_open’, req)
File “/usr/lib/python2.7/urllib2.py”, line 407, in _call_chain
result = func(*args)
File “/usr/lib/python2.7/urllib2.py”, line 1228, in http_open
return self.do_open(httplib.HTTPConnection, req)
File “/usr/lib/python2.7/urllib2.py”, line 1201, in do_open
r = h.getresponse(buffering=True)
File “/usr/lib/python2.7/httplib.py”, line 1136, in getresponse
response.begin()
File “/usr/lib/python2.7/httplib.py”, line 453, in begin
version, status, reason = self._read_status()
File “/usr/lib/python2.7/httplib.py”, line 417, in _read_status
raise BadStatusLine(line)
httplib.BadStatusLine: ‘’

Any idea or way to debugging element would be very welcome :slight_smile:

Thanks !
Chris

Hey Chris,

Can you check in a we browser that you can see all the jobids:
workstation001:45359/api/jobs?IdOnly=true

This should return a page that has jobis of what is on the farm.

Can you also check in the deadline monitor that the pulse node is up via:
DL monitor > View > new panel> pulse

lastly what version of DL are you running?

Cheers
Kym

Hi Kym,

thanks for your quick suggestions !

  • Web page is not accessible
  • My machine appears in the pulse Windows, I did check this one before
  • We are using Deadline 9

I cannot try right now but I’m suspicious about one thing, I was sourcing the Deadline Standalone API library using sys.path.append for my test. But I realize that maybe Pulse doesn’t look at the repository by itself ? Maybe it needs it in its PYTHONPATH absolutely ? Does Pulse needs those libraries at all ?

Cheers
Chris

It looks like you’re trying to connect to Pulse and this is your problem. You have to setup Web Service and connect to it instead.

As written in http://docs.thinkboxsoftware.com/products/deadline/9.0/1_User%20Manual/manual/standalone-python.html#using-the-api you have to setup the web service

To do so follow this http://docs.thinkboxsoftware.com/products/deadline/9.0/1_User%20Manual/manual/web-service.html

Cheers

Have a look here for explanation:
deadline.thinkboxsoftware.com/fe … dependence

Hey guys !

Thanks for your help ! I was focusing on the Pulse example and didn’t notice I just had to run the deadlinewebservice application, those Python samples are too eye catchy :stuck_out_tongue:

It works well now, I can’t find out if it’s possible to filter Jobs by user or status though, I can get all Jobs but can’t see any function including any types of filter. I would imagine that we should not have to parse through the entire list, any suggestion ?

Cheers !
Chris

Appologies, have been using pulse too long, very easy to get the terminology mixed up.

Does the Python standalone API now needs to connect to the Web Service or Pulse Server?
Which one is more stable and which one would give me the best performance for about 2000+ machines which interact with Deadline via Python API?

Pulse no longer contains the web service, so you don’t have much of a choice since Deadline 8 was released. :slight_smile:

For performance, I would start looking into load balancing. We have some examples with nginx here:
docs.thinkboxsoftware.com/produc … nginx.html

Depending on how fresh that information needs to be, you can also use a web cache. The issue here is that Deadline doesn’t provide a new “Last modified” time or “ETag”, so you’ll have to rely on specifying your own storage timeout there. If it’s things where a round-trip update needs to be confirmed in your software, the cache may not be a great plan. For things such as generic Slave state, having a cache of 10 seconds would be fine.

Privacy | Site terms | Cookie preferences