title: jclouds: getBucketLocation timeout on getBlob
body: <p>I'm using jclouds 2.5.0. It's working perfectly in all of our deployments except for one. In this case, we're seeing the following jclouds message in our log4j2 logs:</p>
  <pre><code>2022-07-14 21:37:29.263 +0000,3124098302712886 {} ERROR o.j.h.h.BackoffLimitedRetryHandler [clrd-highpri-1] Cannot retry after server error, command has exceeded retry limit 5: [method=org.jclouds.aws.s3.AWSS3Client.public abstract java.lang.String org.jclouds.s3.S3Client.getBucketLocation(java.lang.String)[hammerspace-data-bucket-us-west-2], request=GET https://s3.amazonaws.com/hammerspace-data-bucket-us-west-2?location HTTP/1.1]
  </code></pre>
  <p>This message occurs during a getBlob call, so I'm assuming part of getBlob is to determine the bucket from which the blob should be retrieved. This call is failing 5 times - but not just failing with a bad return code - it's hanging and timing out, so these 5 retries are taking up the lion's share of the time it takes to download the blob.</p>
  <p>After getBlob finally stops calling getBucketLocation, it then tries the download with the default region (us-east-1). Since the bucket is actually in us-west-2, the download takes a bit longer than it should, but - again - the actual download bottleneck is the failed calls to getBucketLocation.</p>
  <p>Has anyone seen anything like this before?</p>
  <p>I'd also be interested in knowing how to turn on more jclouds logging. I used to uncomment lines like this in my log4j2.xml file:</p>
  <pre><code>        &lt;!-- &lt;logger name=&quot;org.jclouds&quot; level=&quot;debug&quot; additivity=&quot;true&quot; /&gt; --&gt;
          &lt;!-- &lt;logger name=&quot;jclouds.compute&quot; level=&quot;debug&quot; additivity=&quot;true&quot; /&gt; --&gt;
          &lt;!-- &lt;logger name=&quot;jclouds.wire&quot; level=&quot;debug&quot; additivity=&quot;true&quot; /&gt; --&gt;
          &lt;!-- &lt;logger name=&quot;jclouds.headers&quot; level=&quot;debug&quot; additivity=&quot;true&quot; /&gt; --&gt;
          &lt;!-- &lt;logger name=&quot;jclouds.ssh&quot; level=&quot;debug&quot; additivity=&quot;true&quot; /&gt; --&gt;
          &lt;!-- &lt;logger name=&quot;software.amazon.awssdk&quot; level=&quot;debug&quot; additivity=&quot;true&quot; /&gt; --&gt;
          &lt;!-- &lt;logger name=&quot;org.apache.http.wire&quot; level=&quot;debug&quot; additivity=&quot;true&quot; /&gt; --&gt;
  </code></pre>
  <p>But these don't seem to have any effect in 2.5.0 anymore.</p>
  <p>Finally, if anyone knows how I can stop getBlob from calling getBucketLocation, I'd much appreciate some advice here. I'm thinking there must be a way to specify the desired bucket to the jclouds blob context up front so it doesn't have to resolve it.</p>
  <p>John</p>
  <p>[Update 1]</p>
  <p>We thought originally the problem was we didn't have our AIM profile configured correctly for the bucket, but after playing with it, we were able to run the AWS command line tool from the same host on that bucket and it didn't hang, but jclouds is still hanging on getBucketLocation on the same box. I'm completely stumped by this. It HAS to be something internal to jclouds 2.5.0 with the AWS provider.</p>