2016-03-08 55 views
0

我应该解释一点历史。有一段时间我作为发出HTTP:尝试列出数据中心中VSI的SSL读取超时

https://api.softlayer.com/rest/v3/SoftLayer_Account/getVirtualGuests.json? objectMask=mask[datacenter.name,status,globalIdentifier,primaryBackendIpAddress,primaryIpAddress,billingItem.categoryCode,billingItem.description,billingItem.createDate,billingItem.orderItem.order.userRecord.username,billingItem.orderItem.order.userRecord.email,users.username,users.email,users.userStatus,operatingSystemReferenceCode,softwareComponents.passwords,operatingSystem,hourlyBillingFlag,localDiskFlag,managedResourceFlag,privateNetworkOnlyFlag,powerState,blockDeviceTemplateGroup.name,blockDeviceTemplateGroup.id;blockDevices.diskImage,networkVlans,activeTransactionCount,activeTransactions,consoleIpAddressRecord.type,consoleIpAddressRecord.port,consoleIpAddressRecord.ipAddress.ipAddress] 

这检索到的所有VSI的所有数据中心,我开始每次都得到同样的错误,所以我现在通过每个SoftLayer的数据中心环获得VSI的。我使用下面的EST API:

https://api.softlayer.com/rest/v3/SoftLayer_Account/getVirtualGuests.json?objectMask=mask[datacenter.name,status,globalIdentifier,primaryBackendIpAddress,primaryIpAddress,billingItem.categoryCode,billingItem.description,billingItem.createDate,billingItem.orderItem.order.userRecord.username,billingItem.orderItem.order.userRecord.email,users.username,users.email,users.userStatus,operatingSystemReferenceCode,softwareComponents.passwords,operatingSystem,hourlyBillingFlag,localDiskFlag,managedResourceFlag,privateNetworkOnlyFlag,powerState,blockDeviceTemplateGroup.name,blockDeviceTemplateGroup.id;blockDevices.diskImage,networkVlans,activeTransactionCount,activeTransactions,consoleIpAddressRecord.type,consoleIpAddressRecord.port,consoleIpAddressRecord.ipAddress.ipAddress]&objectFilter={"virtualGuests":{"datacenter":{"name":{"operation":"_=sjc01"}}}} 

一切工作正常,除了我得到:在SJC01和TOR01的SoftLayer数据中心发生

'_content' => '500 SSL read timeout: 
', 
'_rc' => 500, 
'_headers' => bless({ 
'client-warning' => 'Internal response', 
'client-date' => 'Mon, 07 Mar 2016 16:23:33 GMT', 
'content-type' => 'text/plain' 
}, 'HTTP::Headers'), 
'_msg' => 'SSL read timeout: ', 

此错误。为什么会发生这种超时。

注意此循环中其他数据中心的工作,但在SJC01和TOR01上失败。

回答

0

的问题是你的objectMask,你是从SOFTLAYER数据库中获取大量的数据,并导致了失败,你可以尝试使用限制看到,这里http://sldn.softlayer.com/article/Rest

的信息,如果不工作,你会需要打破你的对象掩码在部分例如你使用一个请求来获取一些属性,这些属性使用具有几个属性的对象掩码,然后是另一个请求来获取其他属性,等等,直到你拥有所有你想要的属性。

Regards

+0

谢谢。我正在查看resultLimit。 –

+0

如果我一起指定resultLimit和objeckMask,则objectMask将被忽略。举个例子。 https://api.softlayer.com/rest/v3/SoftLayer_Account/getVirtualGuests?resultLimit=300,100?objectMask=mask[datacenter,status,还有更多的objectMask值,并不是所有的都返回,因为它们之前我添加了resultLimit –

+0

混合您需要使用&的结果限制和对象掩码?例如SoftLayer_Account/getVirtualGuests?resultLimit = 10,20&objectMask = mask [id,datacenter] –

相关问题