503 response to a taxii 1.1 discovery request when using Libtaxii againt limo



If you are attempting to do a taxii 1.1 discovery with libtaxii against limo you may encounter the following issue:

HTTP ERROR Code 503 Service Unavailable.


You will need to make sure that you pass the header “Host: limo.anomali.com” to the Discovery Request, see example below (esp. the lines in **bold**):

import libtaxii as taxii

import libtaxii.clients as taxii_clients

import libtaxii.messages_11 as tm11

from urllib2 import URLError

Set taxii version, message id and extended headers


message_id = str(tm11.generate_message_id())

Set up the taxii client

credentials = {‘username’: ‘guest’, ‘password’: ‘guest’}

client = taxii_clients.HttpClient()




Set up the discovery request

req_msg = tm11.DiscoveryRequest(message_id=message_id)

headers = {

‘host’: ‘limo.anomali.com


print ‘Discovery Request: \n{}\n’.format(req_msg.to_xml(pretty_print=True))


resp = client.call_taxii_service2(“limo.anomali.com”, “/api/v1/taxii/taxii-discovery-service/”, TAXII_VERSION, req_msg.to_xml(pretty_print=True), headers=headers)

except URLError as e:

print e

sys.exit(‘Could not connect to taxii service.’)

Let me know if find this helpful by simply clicking the Like Button or comment below if you have any further questions or issues?


This issue was also present when using api.threatstream.com when going through a proxy. Thanks for the recommendation, did not see any supporting documentation otherwise.