brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aled Sage (JIRA)" <j...@apache.org>
Subject [jira] [Created] (BROOKLYN-487) Persistence to aws-ec2:eu-west-1 fails in jclouds, parsing "301 Moved Permanently" response
Date Tue, 25 Apr 2017 12:47:04 GMT
Aled Sage created BROOKLYN-487:
----------------------------------

             Summary: Persistence to aws-ec2:eu-west-1 fails in jclouds, parsing "301 Moved
Permanently" response
                 Key: BROOKLYN-487
                 URL: https://issues.apache.org/jira/browse/BROOKLYN-487
             Project: Brooklyn
          Issue Type: Bug
            Reporter: Aled Sage


With Brooklyn 0.11.0-rc2, working around https://issues.apache.org/jira/browse/BROOKLYN-486
by including {{jclouds.regions=eu-west-1}}, it fails when jclouds tries to parse the {{301
Moved Permanently}} response.

This looks like a jclouds (2.0.1) error.

The {{brooklyn.cfg}} contains:

{noformat}
brooklyn.location.named.my-s3=aws-s3:eu-west-1
brooklyn.location.named.my-s3.identity=********************
brooklyn.location.named.my-s3.credential=****************************************
brooklyn.location.named.my-s3.jclouds.regions=eu-west-1
{noformat}

The log shows:

{noformat}
2017-04-25 13:36:13,134 DEBUG 106 o.j.r.i.InvokeHttpMethod [FelixStartLevel] >> invoking
BucketExists
2017-04-25 13:36:13,160 DEBUG 106 j.signature [FelixStartLevel] << HEAD
/

host:my-bucket2.s3-eu-west-1.amazonaws.com
x-amz-content-sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
x-amz-date:20170425T123613Z

host;x-amz-content-sha256;x-amz-date
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
2017-04-25 13:36:13,160 DEBUG 106 j.signature [FelixStartLevel] << AWS4-HMAC-SHA256
20170425T123613Z
20170425/eu-west-1/s3/aws4_request
a8d139d2fc0ad0aa9e59e49a3df61cf4e22d597cce9439585bc1662e12b60e13

2017-04-25 13:36:13,319 DEBUG 106 o.j.h.i.JavaUrlHttpCommandExecutorService [FelixStartLevel]
Sending request -1333068804: HEAD https://my-bucket2.s3-eu-west-1.amazonaws.com/ HTTP/1.1

2017-04-25 13:36:13,319 DEBUG 106 j.headers [FelixStartLevel] >> HEAD https://my-bucket2.s3-eu-west-1.amazonaws.com/
HTTP/1.1
2017-04-25 13:36:13,319 DEBUG 106 j.headers [FelixStartLevel] >> Host: my-bucket2.s3-eu-west-1.amazonaws.com
2017-04-25 13:36:13,319 DEBUG 106 j.headers [FelixStartLevel] >> x-amz-content-sha256:
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
2017-04-25 13:36:13,319 DEBUG 106 j.headers [FelixStartLevel] >> X-Amz-Date: 20170425T123613Z
2017-04-25 13:36:13,320 DEBUG 106 j.headers [FelixStartLevel] >> Authorization: AWS4-HMAC-SHA256
Credential=********/20170425/eu-west-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date,
Signature=********

2017-04-25 13:36:14,273 DEBUG 106 o.j.h.i.JavaUrlHttpCommandExecutorService [FelixStartLevel]
Receiving response -1333068804: HTTP/1.1 301 Moved Permanently

2017-04-25 13:36:14,273 DEBUG 106 j.headers [FelixStartLevel] << HTTP/1.1 301 Moved
Permanently
2017-04-25 13:36:14,274 DEBUG 106 j.headers [FelixStartLevel] << Transfer-Encoding:
chunked
2017-04-25 13:36:14,274 DEBUG 106 j.headers [FelixStartLevel] << Server: AmazonS3
2017-04-25 13:36:14,274 DEBUG 106 j.headers [FelixStartLevel] << x-amz-request-id: 9D5E061041151706
2017-04-25 13:36:14,274 DEBUG 106 j.headers [FelixStartLevel] << x-amz-id-2: ********
2017-04-25 13:36:14,274 DEBUG 106 j.headers [FelixStartLevel] << Date: Tue, 25 Apr 2017
12:36:13 GMT
2017-04-25 13:36:14,274 DEBUG 106 j.headers [FelixStartLevel] << x-amz-bucket-region:
us-east-1
2017-04-25 13:36:14,274 DEBUG 106 j.headers [FelixStartLevel] << Content-Type: application/xml

2017-04-25 13:36:14,287 WARN  106 o.j.a.u.AWSUtils [FelixStartLevel] error parsing error
2017-04-25 13:36:14,287 WARN  106 o.j.a.u.AWSUtils [FelixStartLevel] error parsing error
java.lang.RuntimeException: request: HEAD https://my-bucket2.s3-eu-west-1.amazonaws.com/ HTTP/1.1;
response: HTTP/1.1 301 Moved Permanently; cause: java.lang.RuntimeException: request: HEAD
https://my-bucket2.s3-eu-west-1.amazonaws.com/ HTTP/1.1; response: HTTP/1.1 301 Moved Permanently;
source:
; cause: java.lang.IllegalArgumentException: not an xml document [] 
        at org.jclouds.http.functions.ParseSax.addDetailsAndPropagate(ParseSax.java:173)
        at org.jclouds.http.functions.ParseSax.addDetailsAndPropagate(ParseSax.java:145)
        at org.jclouds.http.functions.ParseSax.apply(ParseSax.java:85)
        at org.jclouds.aws.util.AWSUtils.parseAWSErrorFromContent(AWSUtils.java:90)
        at org.jclouds.s3.handlers.S3RedirectionRetryHandler.shouldRetryRequest(S3RedirectionRetryHandler.java:55)
        at org.jclouds.http.handlers.DelegatingRetryHandler.shouldRetryRequest(DelegatingRetryHandler.java:65)
        at org.jclouds.http.internal.BaseHttpCommandExecutorService.shouldContinue(BaseHttpCommandExecutorService.java:137)
        at org.jclouds.http.internal.BaseHttpCommandExecutorService.invoke(BaseHttpCommandExecutorService.java:109)
        at org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:90)
        at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:73)
        at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:44)
        at org.jclouds.rest.internal.DelegatesToInvocationFunction.handle(DelegatesToInvocationFunction.java:156)
        at org.jclouds.rest.internal.DelegatesToInvocationFunction.invoke(DelegatesToInvocationFunction.java:123)
        at com.sun.proxy.$Proxy70.bucketExists(Unknown Source)
        at org.jclouds.s3.blobstore.S3BlobStore.containerExists(S3BlobStore.java:131)
        at org.jclouds.aws.s3.blobstore.AWSS3BlobStore.createContainerInLocation(AWSS3BlobStore.java:99)
        at org.jclouds.s3.blobstore.S3BlobStore.createContainerInLocation(S3BlobStore.java:144)
        at org.apache.brooklyn.core.mgmt.persist.jclouds.JcloudsBlobStoreBasedObjectStore.getBlobStoreContext(JcloudsBlobStoreBasedObjectStore.java:101)
        at org.apache.brooklyn.core.mgmt.persist.jclouds.JcloudsBlobStoreBasedObjectStore.<init>(JcloudsBlobStoreBasedObjectStore.java:80)
        at org.apache.brooklyn.location.jclouds.JcloudsLocation.newPersistenceObjectStore(JcloudsLocation.java:2970)
        at org.apache.brooklyn.core.mgmt.persist.BrooklynPersistenceUtils.newPersistenceObjectStore(BrooklynPersistenceUtils.java:96)
        at org.apache.brooklyn.launcher.common.BasicLauncher.initPersistence(BasicLauncher.java:581)
        at org.apache.brooklyn.launcher.common.BasicLauncher.handlePersistence(BasicLauncher.java:514)
        at org.apache.brooklyn.launcher.common.BasicLauncher.start(BasicLauncher.java:433)
        at org.apache.brooklyn.launcher.osgi.OsgiLauncher.start(OsgiLauncher.java:77)
        at org.apache.brooklyn.launcher.osgi.OsgiLauncher.init(OsgiLauncher.java:101)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_121]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_121]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_121]
        at java.lang.reflect.Method.invoke(Method.java:498)[:1.8.0_121]
        at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:299)[17:org.apache.aries.blueprint.core:1.7.1]
        at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:980)[17:org.apache.aries.blueprint.core:1.7.1]
        at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:736)[17:org.apache.aries.blueprint.core:1.7.1]
        at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:848)[17:org.apache.aries.blueprint.core:1.7.1]
        at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:811)[17:org.apache.aries.blueprint.core:1.7.1]
        at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[17:org.apache.aries.blueprint.core:1.7.1]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_121]
        at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[17:org.apache.aries.blueprint.core:1.7.1]
        at org.apache.aries.blueprint.di.RefRecipe.internalCreate(RefRecipe.java:62)[17:org.apache.aries.blueprint.core:1.7.1]
        at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:106)[17:org.apache.aries.blueprint.core:1.7.1]
        at org.apache.aries.blueprint.container.BeanRecipe.getFactoryObj(BeanRecipe.java:308)[17:org.apache.aries.blueprint.core:1.7.1]
        at org.apache.aries.blueprint.container.BeanRecipe.getInstanceFromFactory(BeanRecipe.java:288)[17:org.apache.aries.blueprint.core:1.7.1]
        at org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecipe.java:278)[17:org.apache.aries.blueprint.core:1.7.1]
        at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:830)[17:org.apache.aries.blueprint.core:1.7.1]
        at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:811)[17:org.apache.aries.blueprint.core:1.7.1]
        at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[17:org.apache.aries.blueprint.core:1.7.1]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_121]
        at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[17:org.apache.aries.blueprint.core:1.7.1]
        at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:255)[17:org.apache.aries.blueprint.core:1.7.1]
        at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:186)[17:org.apache.aries.blueprint.core:1.7.1]
        at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:724)[17:org.apache.aries.blueprint.core:1.7.1]
        at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:411)[17:org.apache.aries.blueprint.core:1.7.1]
        at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:276)[17:org.apache.aries.blueprint.core:1.7.1]
        at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:300)[17:org.apache.aries.blueprint.core:1.7.1]
        at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:269)[17:org.apache.aries.blueprint.core:1.7.1]
        at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:265)[17:org.apache.aries.blueprint.core:1.7.1]
        at org.apache.aries.blueprint.container.BlueprintExtender.modifiedBundle(BlueprintExtender.java:255)[17:org.apache.aries.blueprint.core:1.7.1]
        at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:500)[21:org.apache.aries.util:1.1.1]
        at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:433)[21:org.apache.aries.util:1.1.1]
        at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$AbstractTracked.track(BundleHookBundleTracker.java:725)[21:org.apache.aries.util:1.1.1]
        at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.bundleChanged(BundleHookBundleTracker.java:463)[21:org.apache.aries.util:1.1.1]
        at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$BundleEventHook.event(BundleHookBundleTracker.java:422)[21:org.apache.aries.util:1.1.1]
        at org.apache.felix.framework.util.SecureAction.invokeBundleEventHook(SecureAction.java:1179)[org.apache.felix.framework-5.6.1.jar:]
        at org.apache.felix.framework.EventDispatcher.createWhitelistFromHooks(EventDispatcher.java:730)[org.apache.felix.framework-5.6.1.jar:]
        at org.apache.felix.framework.EventDispatcher.fireBundleEvent(EventDispatcher.java:485)[org.apache.felix.framework-5.6.1.jar:]
        at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4541)[org.apache.felix.framework-5.6.1.jar:]
        at org.apache.felix.framework.Felix.startBundle(Felix.java:2172)[org.apache.felix.framework-5.6.1.jar:]
        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1371)[org.apache.felix.framework-5.6.1.jar:]
        at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)[org.apache.felix.framework-5.6.1.jar:]
        at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]
Caused by: java.lang.RuntimeException: request: HEAD https://my-bucket2.s3-eu-west-1.amazonaws.com/
HTTP/1.1; response: HTTP/1.1 301 Moved Permanently; source:
; cause: java.lang.IllegalArgumentException: not an xml document [] 
        at org.jclouds.http.functions.ParseSax.addDetailsAndPropagate(ParseSax.java:173)
        at org.jclouds.http.functions.ParseSax.convertStreamToStringAndParse(ParseSax.java:101)
        at org.jclouds.http.functions.ParseSax.apply(ParseSax.java:81)
        ... 67 more
Caused by: java.lang.IllegalArgumentException: not an xml document [] 
        at com.google.common.base.Preconditions.checkArgument(Preconditions.java:145)
        at org.jclouds.http.functions.ParseSax.validateXml(ParseSax.java:116)
        at org.jclouds.http.functions.ParseSax.convertStreamToStringAndParse(ParseSax.java:97)
        ... 68 more

2017-04-25 13:36:14,300 DEBUG 124 o.a.b.l.c.BasicLauncher [FelixStartLevel] Error initializing
persistence subsystem (rethrowing): org.jclouds.http.HttpResponseException: null connecting
to HEAD htt
ps://my-bucket2.s3-eu-west-1.amazonaws.com/ HTTP/1.1
org.jclouds.http.HttpResponseException: null connecting to HEAD https://my-bucket2.s3-eu-west-1.amazonaws.com/
HTTP/1.1
        ...
{noformat}




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message