Ask Your Question
0

Jclouds connect to openstack

asked 2015-09-17 16:59:11 -0500

Li gravatar image

updated 2015-09-18 02:39:14 -0500

String provider = "openstack-nova";
    String identity = "demo:admin"; // tenantName:userName
    String credential = "nova";

    novaApi = ContextBuilder.newBuilder(provider)
            .endpoint("http://xxx.xx.xx.xxx/:5000/v2.0/")
            .credentials(identity, credential)
            .modules(modules)
            .buildApi(NovaApi.class);
    regions = novaApi.getConfiguredRegions();


14:44:51.530 [main] DEBUG o.j.rest.internal.InvokeHttpMethod - >> invoking AuthenticationApi.authenticateWithTenantNameAndCredentials
14:44:51.533 [main] DEBUG o.j.h.i.JavaUrlHttpCommandExecutorService - Sending request -1395735804: POST http://xxx.xx.xx.xxx/:5000/v2.0/tokens HTTP/1.1
14:44:51.534 [main] DEBUG jclouds.wire - >> "Sensitive data in payload, use PROPERTY_LOGGER_WIRE_LOG_SENSITIVE_INFO override to enable logging this data."
14:44:51.534 [main] DEBUG jclouds.headers - >> POST http://xxx.xx.xx.xxx/:5000/v2.0/tokens HTTP/1.1
14:44:51.534 [main] DEBUG jclouds.headers - >> Accept: application/json
14:44:51.534 [main] DEBUG jclouds.headers - >> Content-Type: application/json
14:44:51.535 [main] DEBUG jclouds.headers - >> Content-Length: 91
14:44:51.562 [main] DEBUG o.j.h.i.JavaUrlHttpCommandExecutorService - Receiving response -1395735804: HTTP/1.1 404 Not Found
14:44:51.562 [main] DEBUG jclouds.headers - << HTTP/1.1 404 Not Found
14:44:51.562 [main] DEBUG jclouds.headers - << Date: Thu, 17 Sep 2015 14:43:08 GMT
14:44:51.562 [main] DEBUG jclouds.headers - << Keep-Alive: timeout=5, max=100
14:44:51.563 [main] DEBUG jclouds.headers - << Connection: Keep-Alive
14:44:51.563 [main] DEBUG jclouds.headers - << Server: Apache/2.4.7 (Ubuntu)
14:44:51.563 [main] DEBUG jclouds.headers - << Content-Type: text/html; charset=iso-8859-1
14:44:51.563 [main] DEBUG jclouds.headers - << Content-Length: 293
14:44:51.567 [main] DEBUG jclouds.wire - << "<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">[\n]"
14:44:51.567 [main] DEBUG jclouds.wire - << "<html><head>[\n]"
14:44:51.567 [main] DEBUG jclouds.wire - << "<title>404 Not Found</title>[\n]"
14:44:51.567 [main] DEBUG jclouds.wire - << "</head><body>[\n]"
14:44:51.567 [main] DEBUG jclouds.wire - << "<h1>Not Found</h1>[\n]"
14:44:51.567 [main] DEBUG jclouds.wire - << "<p>The requested URL /:5000/v2.0/tokens was not found on this server.</p>[\n]"
14:44:51.567 [main] DEBUG jclouds.wire - << "<hr>[\n]"
14:44:51.567 [main] DEBUG jclouds.wire - << "<address>Apache/2.4.7 (Ubuntu) Server at xxx.xx.xx.xxx Port 80</address>[\n]"
14:44:51.567 [main] DEBUG jclouds.wire - << "</body></html>[\n]"
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-09-18 09:39:00 -0500

Jeff Jing gravatar image

First thing, get endpoint url right: "http://xxx.xx.xx.xxx/:5000/v2.0/" should be "http://xxx.xx.xx.xxx:5000/v2.0/

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2015-09-17 16:59:11 -0500

Seen: 325 times

Last updated: Sep 18 '15