Hi all,

I'm using Jcloud in order to access HP Cloud object store.
I am able to connect and perform different operations, but the upload\download 
speed is poor and I need to set a proxy in order to overcome the speed issue.
I have followed the instructions I have found in 
http://jclouds.apache.org/reference/logging/#proxy
But when I'm setting the proxy configuration I'm getting the following error:
Exception in thread "main" org.jclouds.http.HttpResponseException: Unable to 
tunnel through proxy. Proxy returns "HTTP/1.1 403 Forbidden" connecting to POST 
https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0/tokens 
HTTP/1.1<https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0/tokens%20HTTP/1.1>
        Iterable<Module> modules = ImmutableSet.<Module> of(
                new SLF4JLoggingModule());
        Properties overrides = new Properties();
        overrides.setProperty(PROPERTY_PROXY_HOST, PROXY_HOST);
        overrides.setProperty(PROPERTY_PROXY_PORT, PROXY_PORT);
        overrides.setProperty(PROPERTY_TRUST_ALL_CERTS, "true");
        BlobStoreContext context = ContextBuilder.newBuilder(PROVIDER)
                .credentials(identity, credential)
                //if i will remove the override, it will pass
                .overrides(overrides)
                .modules(modules)
                .buildView(BlobStoreContext.class);
        BlobStore blobStore = context.getBlobStore();
        //this is where the failure happens
        boolean exists = blobStore.containerExists(container);
        System.out.println("Container exists? " + exists );

The proxy configuration (host + port) that I'm using seems to be ok. I tried to 
use them by directly invoking a request using the apache HTTP client and it 
worked as expected
See the code bellow:
        HttpHost proxy = new HttpHost(hostname, port);
        DefaultProxyRoutePlanner routePlanner = new 
DefaultProxyRoutePlanner(proxy);
        HttpClient httpClient = HttpClients.custom()
               .setRoutePlanner(routePlanner)
               .build();
        HttpResponse httpResponse = httpClient.execute(request);

Did anyone encountered such issue or have any idea what can go wrong here?

Thanks

Eyal Zitony

Reply via email to