"Connect time out" 通过代理的 jClouds 错误

"Connect time out" error for jClouds via proxy

我正在尝试运行一个jcloud的简单程序。程序如下:

String provider = "openstack-nova";
String identity = "Tenant:usename"; // tenantName:userName
String credential = "pass";

novaApi = ContextBuilder.newBuilder(provider).endpoint("http://openstack.infosys.tuwien.ac.at/identity/v2.0")
    .credentials(identity, credential).modules(modules).buildApi(NovaApi.class);
regions = novaApi.getConfiguredRegions();

openstack.infosys 通过端口 7777 上的 SOCKS 代理连接。我也在 eclipse 上启用了相同的功能(Window->首选项->常规->网络配置->SOCKS(手动) ) 。但是,每次我 运行 代码都会出现以下错误:

ERROR o.j.h.i.JavaUrlHttpCommandExecutorService - Command not considered safe to retry because request method is POST:

然后是

造成的

Caused by: java.net.SocketTimeoutException: connect timed out

我可以毫无问题地访问 horizon 的 Web 界面。

谁能帮我理解可能的问题是什么。

您需要在创建上下文时将您的代理配置告知 Apache jclouds。查看这些属性,并将您需要的属性传递给 ContextBuilder:

overrides 方法