我们正在使用Python 2.7和Python Softlayer 3.0.1包并在get_records
类上调用DNSManager
方法。目前返回Internal Server
错误:
2016-05-11T11:18:04.117406199Z Traceback (most recent call last):
2016-05-11T11:18:04.117715505Z File "/opt/**/**/***.py", line 745, in <module>
2016-05-11T11:18:04.117927757Z httpDnsRecords = dnsManager.get_records(httpDomainRecordId, data=dataspace, type="cname")
2016-05-11T11:18:04.118072183Z File "/usr/local/lib/python2.7/dist-packages/SoftLayer/managers/dns.py", line 152, in get_records
2016-05-11T11:18:04.118152705Z filter=_filter.to_dict(),
2016-05-11T11:18:04.118302389Z File "/usr/local/lib/python2.7/dist-packages/SoftLayer/API.py", line 347, in call_handler
2016-05-11T11:18:04.118398852Z return self(name, *args, **kwargs)
2016-05-11T11:18:04.118512777Z File "/usr/local/lib/python2.7/dist-packages/SoftLayer/API.py", line 316, in call
2016-05-11T11:18:04.118632422Z return self.client.call(self.name, name, *args, **kwargs)
2016-05-11T11:18:04.118814604Z File "/usr/local/lib/python2.7/dist-packages/SoftLayer/API.py", line 176, in call
2016-05-11T11:18:04.118907953Z timeout=self.timeout)
2016-05-11T11:18:04.118995360Z File "/usr/local/lib/python2.7/dist-packages/SoftLayer/transports.py", line 64, in make_xml_rpc_api_call
2016-05-11T11:18:04.119096993Z e.faultCode, e.faultString)
2016-05-11T11:18:04.119547899Z SoftLayer.exceptions.SoftLayerAPIError: SoftLayerAPIError(SOAP-ENV:Server): Internal Error
httpDomainRecordId是从softlayer获取的域的Id,数据空间是字符串&#39; uk&#39;。
有谁知道为什么这会从服务器返回Internal Error
?
答案 0 :(得分:0)
可能错误是由于响应包含大量数据,此错误记录为here,因此您可以尝试:
1.-增加客户端的超时时间。
2.-在您的请求中添加更多过滤器以限制结果,目前使用datqa并输入try try host或ttl
3.-您可以尝试使用限制,但经理不提供该选项。所以你需要使用API调用,例如
import SoftLayer
client = SoftLayer.Client()
zoneId = 12345
objectMask = "id,expire,domainId,host,minimum,refresh,retry, mxPriority,ttl,type,data,responsiblePerson"
result = client['Dns_Domain'].getResourceRecords(id=zoneId, mask=objectMask, limit=200, offset=0)
print (result)