从 Softlayer DNSManager 返回的内部错误 API

Internal Error returned from Softlayer DNSManager API

我们正在使用 Python 2.7 和 Python Softlayer 3.0.1 包,并在 DNSManager class 上调用 get_records 方法。这当前正在返回 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 和 dataspace 中获取的域的 Id 是字符串 'uk'。

有谁知道为什么这会从服务器返回 Internal Error

错误可能是由于响应包含大量数据,此错误已记录 here,因此您可以尝试:

1.- 增加客户端的超时时间。

2.- 在您的请求中添加更多过滤器以限制结果,目前您使用的是 datqa 并键入尝试添加主机或 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)