Ibm cloud SoftLayerAPIError(SoftLayer\u Exception\u Public):添加用户时发生超时

Ibm cloud SoftLayerAPIError(SoftLayer\u Exception\u Public):添加用户时发生超时,ibm-cloud,ibm-cloud-infrastructure,Ibm Cloud,Ibm Cloud Infrastructure,我正在尝试使用SoftLayer python API在我们的SoftLayer帐户中创建一个新用户。下面是我在python解释器中运行的代码: import SoftLayer client = SoftLayer.create_client_from_env("<user-id>", "<api -key>",SoftLayer.API_PUBLIC_ENDPOINT,240) client['Account'].getCurrentUser() # This r

我正在尝试使用SoftLayer python API在我们的SoftLayer帐户中创建一个新用户。下面是我在python解释器中运行的代码:

import SoftLayer

client = SoftLayer.create_client_from_env("<user-id>", "<api -key>",SoftLayer.API_PUBLIC_ENDPOINT,240)

client['Account'].getCurrentUser() # This returns some info about the user, showing that I've successfully connected to the SoftLayer public API endpoint.

username="april19csctest1"
first="april19csc"
last="test1"
email="<my-email>"
user_template = {'username': username,'firstName': first,'lastName': last,'email': email,'companyName': '<companyName>','address1': 'my-address','city': '<city>','state': 'ON','country': 'CA','postalCode': '<my-postal-code>','userStatusId': 1001,'timezoneId': 120,'sslVpnAllowedFlag': True,'vpnManualConfig': False,'secondaryPasswordTimeoutDays' : 90}
password="<some-random-password>"

newUser = client['User_Customer'].createObject(user_template,password,password)
问题:

  • 这真的是软层方面的问题吗?或者,我能做些什么来解决这个问题
  • SoftLayer正在调查这个问题吗

当前API服务器存在问题,客户在该服务器上收到超时错误。此问题正在调查中,但估计没有时间解决。我只能建议您捕获错误并重试。

对于我们来说,此错误100%都会发生。所以,重试对我们没有帮助。真的吗??我尝试了你的代码,在第一次尝试时它对我起了作用,你不应该得到超时错误——100%的时间它只会偶尔发生,请检查你的网络连接,你可能会遇到问题。正如我在原始问题中的tcpdump输出所示,我与78.77.e442.ip4.static.sl-reverse.com的连接工作正常。 Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python2.7/dist-packages/SoftLayer/API.py", line 363, in call_handler return self(name, *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/SoftLayer/API.py", line 331, in call return self.client.call(self.name, name, *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/SoftLayer/API.py", line 227, in call return self.transport(request) File "/usr/local/lib/python2.7/dist-packages/SoftLayer/transports.py", line 160, in __call__ raise _ex(ex.faultCode, ex.faultString) SoftLayer.exceptions.SoftLayerAPIError: SoftLayerAPIError(SoftLayer_Exception_Public): Time out occurred while adding user 16:53:02.554555 IP 10.10.8.121.59366 > 78.77.e442.ip4.static.sl-reverse.com.https: Flags [S], seq 1152464108, win 28200, options [mss 1410,sackOK,TS val 755142197 ecr 0,nop,wscale 7], length 0 16:53:02.587518 IP 78.77.e442.ip4.static.sl-reverse.com.https > 10.10.8.121.59366: Flags [S.], seq 2170195113, ack 1152464109, win 8190, options [mss 1360,nop,wscale 4,nop,nop,sackOK], length 0 16:53:02.587618 IP 10.10.8.121.59366 > 78.77.e442.ip4.static.sl-reverse.com.https: Flags [.], ack 1, win 221, length 0 16:53:02.602741 IP 10.10.8.121.59366 > 78.77.e442.ip4.static.sl-reverse.com.https: Flags [P.], seq 1:310, ack 1, win 221, length 309 16:53:02.635693 IP 78.77.e442.ip4.static.sl-reverse.com.https > 10.10.8.121.59366: Flags [P.], seq 1:1361, ack 310, win 2191, length 1360 16:53:02.635730 IP 10.10.8.121.59366 > 78.77.e442.ip4.static.sl-reverse.com.https: Flags [.], ack 1361, win 243, length 0 16:53:02.635743 IP 78.77.e442.ip4.static.sl-reverse.com.https > 10.10.8.121.59366: Flags [P.], seq 1361:2717, ack 310, win 2191, length 1356 16:53:02.635753 IP 10.10.8.121.59366 > 78.77.e442.ip4.static.sl-reverse.com.https: Flags [.], ack 2717, win 265, length 0 16:53:02.655966 IP 78.77.e442.ip4.static.sl-reverse.com.https > 10.10.8.121.59366: Flags [P.], seq 2717:3059, ack 310, win 2191, length 342 16:53:02.656022 IP 10.10.8.121.59366 > 78.77.e442.ip4.static.sl-reverse.com.https: Flags [.], ack 3059, win 286, length 0 16:53:02.657166 IP 10.10.8.121.59366 > 78.77.e442.ip4.static.sl-reverse.com.https: Flags [P.], seq 310:436, ack 3059, win 286, length 126 16:53:02.689966 IP 78.77.e442.ip4.static.sl-reverse.com.https > 10.10.8.121.59366: Flags [.], ack 436, win 2184, length 0 16:53:02.710273 IP 78.77.e442.ip4.static.sl-reverse.com.https > 10.10.8.121.59366: Flags [P.], seq 3059:3110, ack 436, win 2184, length 51 16:53:02.711410 IP 10.10.8.121.59366 > 78.77.e442.ip4.static.sl-reverse.com.https: Flags [P.], seq 436:2672, ack 3110, win 286, length 2236 16:53:02.744620 IP 78.77.e442.ip4.static.sl-reverse.com.https > 10.10.8.121.59366: Flags [.], ack 2672, win 2044, length 0 ## nothing printed for a while. 60 seconds later, the following is printed: 16:54:10.162548 IP 78.77.e442.ip4.static.sl-reverse.com.https > 10.10.8.121.59366: Flags [P.], seq 3110:3626, ack 2672, win 65535, length 516 16:54:10.165530 IP 10.10.8.121.59366 > 78.77.e442.ip4.static.sl-reverse.com.https: Flags [P.], seq 2672:2703, ack 3626, win 307, length 31 16:54:10.167088 IP 10.10.8.121.59366 > 78.77.e442.ip4.static.sl-reverse.com.https: Flags [F.], seq 2703, ack 3626, win 307, length 0 16:54:10.198582 IP 78.77.e442.ip4.static.sl-reverse.com.https > 10.10.8.121.59366: Flags [.], ack 2703, win 2559, length 0 16:54:10.198675 IP 78.77.e442.ip4.static.sl-reverse.com.https > 10.10.8.121.59366: Flags [F.], seq 3626:3657, ack 2703, win 2559, length 31 16:54:10.198723 IP 10.10.8.121.59366 > 78.77.e442.ip4.static.sl-reverse.com.https: Flags [R], seq 1152466811, win 0, length 0