vsphere-automation-sdk-java icon indicating copy to clipboard operation
vsphere-automation-sdk-java copied to clipboard

Connection timeout

Open zhmingyong opened this issue 4 years ago • 0 comments

  • [x] I am using the latest SDK version
  • [x] This API is compatible with my vCenter version (You can get this info from the API documentation )
  • [x] I have searched existing issues

Description

I use the latest code and version 6.7.0 have connection timeout, but I use the browser and use the same user password is normal access, has been unable to resolve.

java.lang.NullPointerException at vmware.samples.common.authentication.VimAuthenticationHelper.logout(VimAuthenticationHelper.java:105) at vmware.samples.common.SamplesAbstractBase.logout(SamplesAbstractBase.java:411) at vmware.samples.common.SamplesAbstractBase.execute(SamplesAbstractBase.java:448) at vmware.samples.vcenter.vm.list.ListVMs.main(ListVMs.java:128) Exception in thread "main" com.vmware.vapi.client.exception.ConnectionException: https://172.23.3.105:443/api invocation failed with "org.apache.http.conn.ConnectTimeoutException: Connect to 172.23.3.105:443 [/172.23.3.105] failed: connect timed out" at com.vmware.vapi.internal.protocol.client.rpc.http.HttpClient.send(HttpClient.java:188) at com.vmware.vapi.internal.protocol.client.msg.json.JsonApiProvider.sendRequest(JsonApiProvider.java:186) at com.vmware.vapi.internal.protocol.client.msg.json.JsonApiProvider.invoke(JsonApiProvider.java:539) at com.vmware.vapi.internal.bindings.Stub.invoke(Stub.java:241) at com.vmware.vapi.internal.bindings.Stub.invokeMethodAsync(Stub.java:191) at com.vmware.vapi.internal.bindings.Stub.invokeMethod(Stub.java:137) at com.vmware.cis.SessionStub.create(SessionStub.java:46) at com.vmware.cis.SessionStub.create(SessionStub.java:37) at vmware.samples.common.authentication.VapiAuthenticationHelper.loginByUsernameAndPassword(VapiAuthenticationHelper.java:73) at vmware.samples.common.SamplesAbstractBase.login(SamplesAbstractBase.java:309) at vmware.samples.common.SamplesAbstractBase.execute(SamplesAbstractBase.java:433) at vmware.samples.vcenter.vm.list.ListVMs.main(ListVMs.java:128)

Environment

  • SDK version:

6.7.0 and 7.0.3.0

  • Java version:

1.8

  • vSphere version: 6.7.0

Steps or code snippet to reproduce

Actual behavior

Abnormal connection

Expected behavior

Normal connection

zhmingyong avatar Jan 18 '22 03:01 zhmingyong