ServerCreate sc = Builders.server().name(serverName).flavor(flavorId).image(imageId).build();
Server server = getOSClientV3().compute().servers().boot(sc);
but this cannot work.
What's wrong?
How to fix it?
org.openstack4j.api.exceptions.ConnectionException: RESTEASY004655: Unable to invoke request
at org.openstack4j.connectors.resteasy.HttpExecutorServiceImpl.invoke(HttpExecutorServiceImpl.java:57) ~[openstack4j-3.2.0-withdeps.jar!/:na]
at org.openstack4j.connectors.resteasy.HttpExecutorServiceImpl.execute(HttpExecutorServiceImpl.java:31) ~[openstack4j-3.2.0-withdeps.jar!/:na]
at org.openstack4j.core.transport.internal.HttpExecutor.execute(HttpExecutor.java:51) ~[openstack4j-3.2.0-withdeps.jar!/:na]
at org.openstack4j.openstack.internal.BaseOpenStackService$Invocation.execute(BaseOpenStackService.java:213) ~[openstack4j-3.2.0-withdeps.jar!/:na]
at org.openstack4j.openstack.internal.BaseOpenStackService$Invocation.execute(BaseOpenStackService.java:207) ~[openstack4j-3.2.0-withdeps.jar!/:na]
at org.openstack4j.openstack.storage.block.internal.BlockVolumeServiceImpl.create(BlockVolumeServiceImpl.java:126) ~[openstack4j-3.2.0-withdeps.jar!/:na]
...
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590) [na:1.8.0_211]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_211]
Caused by: javax.ws.rs.ProcessingException: RESTEASY004655: Unable to invoke request
at org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient4Engine.invoke(ApacheHttpClient4Engine.java:316) ~[openstack4j-3.2.0-withdeps.jar!/:na]
at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.invoke(ClientInvocation.java:462) ~[openstack4j-3.2.0-withdeps.jar!/:na]
at org.openstack4j.connectors.resteasy.HttpCommand.execute(HttpCommand.java:71) ~[openstack4j-3.2.0-withdeps.jar!/:na]
at org.openstack4j.connectors.resteasy.HttpExecutorServiceImpl.invokeRequest(HttpExecutorServiceImpl.java:62) ~[openstack4j-3.2.0-withdeps.jar!/:na]
at org.openstack4j.connectors.resteasy.HttpExecutorServiceImpl.invoke(HttpExecutorServiceImpl.java:55) ~[openstack4j-3.2.0-withdeps.jar!/:na]
... 12 common frames omitted
Caused by: java.net.UnknownHostException: controller: Name or service not known
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) ~[na:1.8.0_211]
at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:929) ~[na:1.8.0_211]
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1324) ~[na:1.8.0_211]
at java.net.InetAddress.getAllByName0(InetAddress.java:1277) ~[na:1.8.0_211]
at java.net.InetAddress.getAllByName(InetAddress.java:1193) ~[na:1.8.0_211]
at java.net.InetAddress.getAllByName(InetAddress.java:1127) ~[na:1.8.0_211]
at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45) ~[httpclient-4.5.10.jar!/:4.5.10]
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:112) ~[httpclient-4.5.10.jar!/:4.5.10]
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:374) ~[httpclient-4.5.10.jar!/:4.5.10]
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:393) ~[httpclient-4.5.10.jar!/:4.5.10]
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) ~[httpclient-4.5.10.jar!/:4.5.10]
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186) ~[httpclient-4.5.10.jar!/:4.5.10]
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89) ~[httpclient-4.5.10.jar!/:4.5.10]
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) ~[httpclient-4.5.10.jar!/:4.5.10]
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) ~[httpclient-4.5.10.jar!/:4.5.10]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) ~[httpclient-4.5.10.jar!/:4.5.10]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56) ~[httpclient-4.5.10.jar!/:4.5.10]
at org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient4Engine.invoke(ApacheHttpClient4Engine.java:312) ~[openstack4j-3.2.0-withdeps.jar!/:na]
... 16 common frames omitted
I encountered the same situation, but the problem was not solved:
OSClient.OSClientV3 os = getV3Client();
NetFloatingIP result = os.networking().floatingip().associateToPort("xxxx", "yyyy");
private OSClient.OSClientV3 getOSClientV3(){ return OSFactory.builderV3() .withConfig(Config.newConfig()) .endpoint(OS_URL) .credentials(OS_USER_NAME, OS_PASSWORD, Identifier.byName(OS_DOMAIN)) .scopeToProject(Identifier.byId(OS_PROJECT_ID)) .authenticate(); }
ServerCreate sc = Builders.server().name(serverName).flavor(flavorId).image(imageId).build(); Server server = getOSClientV3().compute().servers().boot(sc);
This can work.
Volume volume = getOSClientV3().blockStorage().volumes().create( Builders.volume().name("test").description("Bootable install volume").snapshot(snapshotId).bootable(true).build() );
but this cannot work. What's wrong? How to fix it?
org.openstack4j.api.exceptions.ConnectionException: RESTEASY004655: Unable to invoke request at org.openstack4j.connectors.resteasy.HttpExecutorServiceImpl.invoke(HttpExecutorServiceImpl.java:57) ~[openstack4j-3.2.0-withdeps.jar!/:na] at org.openstack4j.connectors.resteasy.HttpExecutorServiceImpl.execute(HttpExecutorServiceImpl.java:31) ~[openstack4j-3.2.0-withdeps.jar!/:na] at org.openstack4j.core.transport.internal.HttpExecutor.execute(HttpExecutor.java:51) ~[openstack4j-3.2.0-withdeps.jar!/:na] at org.openstack4j.openstack.internal.BaseOpenStackService$Invocation.execute(BaseOpenStackService.java:213) ~[openstack4j-3.2.0-withdeps.jar!/:na] at org.openstack4j.openstack.internal.BaseOpenStackService$Invocation.execute(BaseOpenStackService.java:207) ~[openstack4j-3.2.0-withdeps.jar!/:na] at org.openstack4j.openstack.storage.block.internal.BlockVolumeServiceImpl.create(BlockVolumeServiceImpl.java:126) ~[openstack4j-3.2.0-withdeps.jar!/:na] ... at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590) [na:1.8.0_211] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_211] Caused by: javax.ws.rs.ProcessingException: RESTEASY004655: Unable to invoke request at org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient4Engine.invoke(ApacheHttpClient4Engine.java:316) ~[openstack4j-3.2.0-withdeps.jar!/:na] at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.invoke(ClientInvocation.java:462) ~[openstack4j-3.2.0-withdeps.jar!/:na] at org.openstack4j.connectors.resteasy.HttpCommand.execute(HttpCommand.java:71) ~[openstack4j-3.2.0-withdeps.jar!/:na] at org.openstack4j.connectors.resteasy.HttpExecutorServiceImpl.invokeRequest(HttpExecutorServiceImpl.java:62) ~[openstack4j-3.2.0-withdeps.jar!/:na] at org.openstack4j.connectors.resteasy.HttpExecutorServiceImpl.invoke(HttpExecutorServiceImpl.java:55) ~[openstack4j-3.2.0-withdeps.jar!/:na] ... 12 common frames omitted Caused by: java.net.UnknownHostException: controller: Name or service not known at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) ~[na:1.8.0_211] at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:929) ~[na:1.8.0_211] at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1324) ~[na:1.8.0_211] at java.net.InetAddress.getAllByName0(InetAddress.java:1277) ~[na:1.8.0_211] at java.net.InetAddress.getAllByName(InetAddress.java:1193) ~[na:1.8.0_211] at java.net.InetAddress.getAllByName(InetAddress.java:1127) ~[na:1.8.0_211] at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45) ~[httpclient-4.5.10.jar!/:4.5.10] at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:112) ~[httpclient-4.5.10.jar!/:4.5.10] at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:374) ~[httpclient-4.5.10.jar!/:4.5.10] at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:393) ~[httpclient-4.5.10.jar!/:4.5.10] at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) ~[httpclient-4.5.10.jar!/:4.5.10] at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186) ~[httpclient-4.5.10.jar!/:4.5.10] at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89) ~[httpclient-4.5.10.jar!/:4.5.10] at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) ~[httpclient-4.5.10.jar!/:4.5.10] at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) ~[httpclient-4.5.10.jar!/:4.5.10] at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) ~[httpclient-4.5.10.jar!/:4.5.10] at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56) ~[httpclient-4.5.10.jar!/:4.5.10] at org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient4Engine.invoke(ApacheHttpClient4Engine.java:312) ~[openstack4j-3.2.0-withdeps.jar!/:na] ... 16 common frames omitted