2

我正在尝试在我的蓝图中使用子网(在 AWS 中预先创建)在 Apache Brooklyn 中运行它。

我有以下没有子网的蓝图,它可以正常工作。(Ambari 服务器,具有两个 Hadoop 节点的集群)

name: IDA Ambari All Services without Security Group
description: This Application is used to build one Ambari Server and a Cluster of Ambari Agents
origin: vendor
location: 
  jclouds:aws-ec2:
    region: eu-central-1
    identity: identity
    credential: credential
    osFamily: RHEL
    osVersionRegex: 6.*
    hardwareId: m3.medium
services:
- type: io.brooklyn.ambari.AmbariCluster
  brooklyn.config:
    initialSize: 2
    install.version: 2.1.0
    services:
      - FALCON

在我添加子网的新名称(以下蓝图的最后几行)的那一刻,Apache Brooklyn 中的部署失败。

name: IDA Ambari All Services without Security Group
description: This Application is used to build one Ambari Server and a Cluster of Ambari Agents
origin: vendor
location: 
  jclouds:aws-ec2:
    region: eu-central-1
    identity: identity
    credential: credential
    osFamily: RHEL
    osVersionRegex: 6.*
    hardwareId: m3.medium
services:
- type: io.brooklyn.ambari.AmbariCluster
  brooklyn.config:
    initialSize: 2
    install.version: 2.1.0
    services:
      - FALCON
    provisioning.properties:
      networkName: subnet-003dfb7b

我想问题出在蓝图中的 jclouds 配置上。但是我不知道。

错误:

在节点中

启动失败并出现错误:java.lang.IllegalStateException:集群中的节点 DynamicClusterImpl{id=tEESwAU9} 失败:2 个并行子任务中的 2 个失败,2 个错误包括:在 AmbariAgentImpl{id=AS9jZ9AC} 调用启动时出错:org.jclouds.compute .RunNodesException:运行 1 个节点组时出错(brooklyn-gaho-root-ida-ambar-xydd-ambariagent-as9j-as9j)位置(eu-central-1)图像(ami-6cd3ee71)大小(m3.medium)选项({ inboundPorts=[22, 2],scriptPresent=true,userMetadata={Name=brooklyn-gaho-root-ida-ambar-xydd-ambariagent-as9j-as9j-jn19,brooklyn-user=root,brooklyn-app-id=XYDdTpTx , brooklyn-app-name=IDA Ambari All Services without Security Group, brooklyn-entity-id=AS9jZ9AC, brooklyn-entity-name=AmbariAgent:AS9j, brooklyn-server-creation-date=2015-08-10-1421}, userDataCksum=2f4a740b,subnetId = subnet-003dfb7b})执行失败:0错误[s]节点故障:1)节点eu-central-1 / i-4af7818b上的NoSuchElementException:java.util.NoSuchElementException:无法连接到节点上的任何IP地址端口22 {id=eu-central-1/i-4af7818b, providerId=i-4af7818b, location={scope=ZONE, id=eu-central-1b, description=eu-central-1b, parent=eu-central-1, iso3166Codes=[DE-HE]},组=brooklyn-gaho-root-ida-ambar-xydd-ambariagent-as9j-as9j,imageId=eu-central-1/ami-6cd3ee71,os={family=rhel,arch= hvm,版本=6.6,描述=411009282317/RightImage_RHEL_6.6_x64_v14.2.1_HVM_EBS,is64Bit=true},状态=运行[运行],登录端口=22,主机名=ip-172-31-17-195,私有地址=[172.31。 17.195],publicAddresses=[52.28.233.226],硬件={id=m3.medium,providerId=m3.medium,处理器=[{cores=1.0,速度=3.0}],ram=3840,卷=[{type=LOCAL,size=4.0,device=/dev/sdb,bootDevice=false,durable=false},{id=vol-e940020b,type=SAN,device=/dev/sda1,bootDevice=true, Durable=true}],hypervisor=xen,supportsImage=Predicates.and(Predicates.alwaysTrue(),Predicates.or(requiresVirtualizationType(hvm),requiresVirtualizationType(paravirtual)),Predicates.alwaysTrue(),Predicates.alwaysTrue())} ,在 org.jclouds.compute.functions.CreateSshClientOncePortIsListeningOnNode.apply(CreateSshClientOncePortIsListeningOnNode.java:66) 的 org.jclouds.compute.util.ConcurrentOpenSocketFinder.findOpenSocketOnNode(ConcurrentOpenSocketFinder.java:107) 的 loginUser=root}。 org.jclouds.compute.callables.SudoAwareInitManager 中的函数.CreateSshClientOncePortIsListeningOnNode.apply(CreateSshClientOncePortIsListeningOnNode.java:40)。init(SudoAwareInitManager.java:67) at org.jclouds.compute.callables.RunScriptOnNodeAsInitScriptUsingSsh.init(RunScriptOnNodeAsInitScriptUsingSsh.java:64) at org.jclouds.compute.callables.RunScriptOnNodeAsInitScriptUsingSshAndBlockUntilComplete.init(RunScriptOnNodeAsInitScriptUsingSshAndBlockUntilComplete.java:77) .compute.callables.RunScriptOnNodeAsInitScriptUsingSshAndBlockUntilComplete.init(RunScriptOnNodeAsInitScriptUsingSshAndBlockUntilComplete.java:38) at org.jclouds.compute.strategy.InitializeRunScriptOnNodeOrPlaceInBadMap.call(InitializeRunScriptOnNodeOrPlaceInBadMap.java:61) at org.jclouds.compute.strategy.InitializeRunScriptOnNodeOrPlaceInBadMap.call(InitializeRunScriptOnNodeOrPlaceInBadMap.java :34) 在 org.jclouds.compute.strategy.CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap。在 java.util.concurrent.FutureTask.run(FutureTask.java:262) 在 java.util.concurrent 调用 (CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.java:119) 在 org.jclouds.compute.strategy.CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.call(CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.java:49) .ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) 1 个错误[s]启动 2 个节点(并行)的运行任务失败(OnIRxglV):2 个并行子任务中的 2 个失败,2 个错误包括:在 AmbariAgentImpl{id=AS9jZ9AC} 调用启动时出错:org.jclouds.compute.RunNodesException:运行 1 个节点组时出错(brooklyn-gaho-root-ida-ambar-xydd-ambariagent-as9j-as9j)位置(eu-central-1)图像(ami-6cd3ee71)大小(m3.medium)选项({inboundPorts=[ 22, 2], scriptPresent=true, userMetadata={Name=brooklyn-gaho-root-ida-ambar-xydd-ambariagent-as9j-as9j-jn19, brooklyn-user=root, brooklyn-app-id=XYDdTpTx, brooklyn- app-name=IDA Ambari All Services without Security Group, brooklyn-entity-id=AS9jZ9AC, brooklyn-entity-name=AmbariAgent:AS9j, brooklyn-server-creation-date=2015-08-10-1421}, userDataCksum=2f4a740b ,subnetId = subnet-003dfb7b})执行失败:0错误[s]节点故障:1)节点eu-central-1 / i-4af7818b上的NoSuchElementException:java.util.NoSuchElementException:无法连接到任何IP地址端口22节点 {id=eu-central-1/i-4af7818b, providerId=i-4af7818b, location={scope=ZONE,id=eu-central-1b, description=eu-central-1b, parent=eu-central-1, iso3166Codes=[DE-HE]}, group=brooklyn-gaho-root-ida-ambar-xydd-ambariagent-as9j -as9j,imageId=eu-central-1/ami-6cd3ee71,os={family=rhel,arch=hvm,version=6.6,description=411009282317/RightImage_RHEL_6.6_x64_v14.2.1_HVM_EBS,is64Bit=true},status=RUNNING[运行],loginPort=22,主机名=ip-172-31-17-195,privateAddresses=[172.31.17.195],publicAddresses=[52.28.233.226],硬件={id=m3.medium,providerId=m3.medium,处理器=[{cores=1.0, speed=3.0}],ram=3840,volumes=[{type=LOCAL,size=4.0,device=/dev/sdb,bootDevice=false,durable=false},{id=vol -e940020b,type=SAN,device=/dev/sda1,bootDevice=true,durable=true}],hypervisor=xen,supportsImage=Predicates.and(Predicates.alwaysTrue(),Predicates.or(requiresVirtualizationType(hvm),requiresVirtualizationType(paravirtual)),Predicates.alwaysTrue(),Predicates.alwaysTrue())}, loginUser=root} at org.jclouds.compute.util.ConcurrentOpenSocketFinder.findOpenSocketOnNode(ConcurrentOpenSocketFinder.java:107) at org.jclouds.compute。 org.jclouds.compute.functions.CreateSshClientOncePortIsListeningOnNode.apply(CreateSshClientOncePortIsListeningOnNode.java:40) 处的函数.CreateSshClientOncePortIsListeningOnNode.apply(CreateSshClientOncePortIsListeningOnNode.java:66)。在 org.jclouds.compute.callables.RunScriptOnNodeAsInitScriptUsingSshAndBlockUntilComplete 的 org.jclouds.compute.callables.RunScriptOnNodeAsInitScriptUsingSsh.init(RunScriptOnNodeAsInitScriptUsingSsh.java:64)。init(RunScriptOnNodeAsInitScriptUsingSshAndBlockUntilComplete.java:77) at org.jclouds.compute.callables.RunScriptOnNodeAsInitScriptUsingSshAndBlockUntilComplete.init(RunScriptOnNodeAsInitScriptUsingSshAndBlockUntilComplete.java:38) at org.jclouds.compute.strategy.InitializeRunScriptOnNodeOrPlaceInBadMap.call(InitializeRunScriptOnNodeOrPlaceInBadMap.java:61) at org.jclouds .compute.strategy.InitializeRunScriptOnNodeOrPlaceInBadMap.call(InitializeRunScriptOnNodeOrPlaceInBadMap.java:34) at org.jclouds.compute.strategy.CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.call(CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.java:119) at org.jclouds.compute.strategy.CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.call(CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.java :49) 在 java.util.concurrent.FutureTask。在 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 在 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 在 java.lang.Thread 运行(FutureTask.java:262) .run(Thread.java:745) 1 个错误[s]

在 Ambari 服务器中

启动失败并出现错误:java.lang.IllegalStateException:集群中的节点 DynamicClusterImpl{id=tEESwAU9} 失败:2 个并行子任务中的 2 个失败,2 个错误包括:在 AmbariAgentImpl{id=AS9jZ9AC} 调用启动时出错:org.jclouds.compute .RunNodesException:运行 1 个节点组时出错(brooklyn-gaho-root-ida-ambar-xydd-ambariagent-as9j-as9j)位置(eu-central-1)图像(ami-6cd3ee71)大小(m3.medium)选项({ inboundPorts=[22, 2],scriptPresent=true,userMetadata={Name=brooklyn-gaho-root-ida-ambar-xydd-ambariagent-as9j-as9j-jn19,brooklyn-user=root,brooklyn-app-id=XYDdTpTx , brooklyn-app-name=IDA Ambari All Services without Security Group, brooklyn-entity-id=AS9jZ9AC, brooklyn-entity-name=AmbariAgent:AS9j, brooklyn-server-creation-date=2015-08-10-1421}, userDataCksum=2f4a740b,subnetId = subnet-003dfb7b})执行失败:0错误[s]节点故障:1)节点eu-central-1 / i-4af7818b上的NoSuchElementException:java.util.NoSuchElementException:无法连接到节点上的任何IP地址端口22 {id=eu-central-1/i-4af7818b, providerId=i-4af7818b, location={scope=ZONE, id=eu-central-1b, description=eu-central-1b, parent=eu-central-1, iso3166Codes=[DE-HE]},组=brooklyn-gaho-root-ida-ambar-xydd-ambariagent-as9j-as9j,imageId=eu-central-1/ami-6cd3ee71,os={family=rhel,arch= hvm,版本=6.6,描述=411009282317/RightImage_RHEL_6.6_x64_v14.2.1_HVM_EBS,is64Bit=true},状态=运行[运行],登录端口=22,主机名=ip-172-31-17-195,私有地址=[172.31。 17.195],publicAddresses=[52.28.233.226],硬件={id=m3.medium,providerId=m3.medium,处理器=[{cores=1.0,速度=3.0}],ram=3840,卷=[{type=LOCAL,size=4.0,device=/dev/sdb,bootDevice=false,durable=false},{id=vol-e940020b,type=SAN,device=/dev/sda1,bootDevice=true, Durable=true}],hypervisor=xen,supportsImage=Predicates.and(Predicates.alwaysTrue(),Predicates.or(requiresVirtualizationType(hvm),requiresVirtualizationType(paravirtual)),Predicates.alwaysTrue(),Predicates.alwaysTrue())} ,在 org.jclouds.compute.functions.CreateSshClientOncePortIsListeningOnNode.apply(CreateSshClientOncePortIsListeningOnNode.java:66) 的 org.jclouds.compute.util.ConcurrentOpenSocketFinder.findOpenSocketOnNode(ConcurrentOpenSocketFinder.java:107) 的 loginUser=root}。 org.jclouds.compute.callables.SudoAwareInitManager 中的函数.CreateSshClientOncePortIsListeningOnNode.apply(CreateSshClientOncePortIsListeningOnNode.java:40)。init(SudoAwareInitManager.java:67) at org.jclouds.compute.callables.RunScriptOnNodeAsInitScriptUsingSsh.init(RunScriptOnNodeAsInitScriptUsingSsh.java:64) at org.jclouds.compute.callables.RunScriptOnNodeAsInitScriptUsingSshAndBlockUntilComplete.init(RunScriptOnNodeAsInitScriptUsingSshAndBlockUntilComplete.java:77) .compute.callables.RunScriptOnNodeAsInitScriptUsingSshAndBlockUntilComplete.init(RunScriptOnNodeAsInitScriptUsingSshAndBlockUntilComplete.java:38) at org.jclouds.compute.strategy.InitializeRunScriptOnNodeOrPlaceInBadMap.call(InitializeRunScriptOnNodeOrPlaceInBadMap.java:61) at org.jclouds.compute.strategy.InitializeRunScriptOnNodeOrPlaceInBadMap.call(InitializeRunScriptOnNodeOrPlaceInBadMap.java :34) 在 org.jclouds.compute.strategy.CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap。在 java.util.concurrent.FutureTask.run(FutureTask.java:262) 在 java.util.concurrent 调用 (CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.java:119) 在 org.jclouds.compute.strategy.CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.call(CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.java:49) .ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) 1 个错误[s]启动 2 个节点(并行)的运行任务失败(OnIRxglV):2 个并行子任务中的 2 个失败,2 个错误包括:在 AmbariAgentImpl{id=AS9jZ9AC} 调用启动时出错:org.jclouds.compute.RunNodesException:运行 1 个节点组时出错(brooklyn-gaho-root-ida-ambar-xydd-ambariagent-as9j-as9j)位置(eu-central-1)图像(ami-6cd3ee71)大小(m3.medium)选项({inboundPorts=[ 22, 2], scriptPresent=true, userMetadata={Name=brooklyn-gaho-root-ida-ambar-xydd-ambariagent-as9j-as9j-jn19, brooklyn-user=root, brooklyn-app-id=XYDdTpTx, brooklyn- app-name=IDA Ambari All Services without Security Group, brooklyn-entity-id=AS9jZ9AC, brooklyn-entity-name=AmbariAgent:AS9j, brooklyn-server-creation-date=2015-08-10-1421}, userDataCksum=2f4a740b ,subnetId = subnet-003dfb7b})执行失败:0错误[s]节点故障:1)节点eu-central-1 / i-4af7818b上的NoSuchElementException:java.util.NoSuchElementException:无法连接到任何IP地址端口22节点 {id=eu-central-1/i-4af7818b, providerId=i-4af7818b, location={scope=ZONE,id=eu-central-1b, description=eu-central-1b, parent=eu-central-1, iso3166Codes=[DE-HE]}, group=brooklyn-gaho-root-ida-ambar-xydd-ambariagent-as9j -as9j,imageId=eu-central-1/ami-6cd3ee71,os={family=rhel,arch=hvm,version=6.6,description=411009282317/RightImage_RHEL_6.6_x64_v14.2.1_HVM_EBS,is64Bit=true},status=RUNNING[运行],loginPort=22,主机名=ip-172-31-17-195,privateAddresses=[172.31.17.195],publicAddresses=[52.28.233.226],硬件={id=m3.medium,providerId=m3.medium,处理器=[{cores=1.0, speed=3.0}],ram=3840,volumes=[{type=LOCAL,size=4.0,device=/dev/sdb,bootDevice=false,durable=false},{id=vol -e940020b,type=SAN,device=/dev/sda1,bootDevice=true,durable=true}],hypervisor=xen,supportsImage=Predicates.and(Predicates.alwaysTrue(),Predicates.or(requiresVirtualizationType(hvm),requiresVirtualizationType(paravirtual)),Predicates.alwaysTrue(),Predicates.alwaysTrue())}, loginUser=root} at org.jclouds.compute.util.ConcurrentOpenSocketFinder.findOpenSocketOnNode(ConcurrentOpenSocketFinder.java:107) at org.jclouds.compute。 org.jclouds.compute.functions.CreateSshClientOncePortIsListeningOnNode.apply(CreateSshClientOncePortIsListeningOnNode.java:40) 处的函数.CreateSshClientOncePortIsListeningOnNode.apply(CreateSshClientOncePortIsListeningOnNode.java:66)。在 org.jclouds.compute.callables.RunScriptOnNodeAsInitScriptUsingSshAndBlockUntilComplete 的 org.jclouds.compute.callables.RunScriptOnNodeAsInitScriptUsingSsh.init(RunScriptOnNodeAsInitScriptUsingSsh.java:64)。init(RunScriptOnNodeAsInitScriptUsingSshAndBlockUntilComplete.java:77) at org.jclouds.compute.callables.RunScriptOnNodeAsInitScriptUsingSshAndBlockUntilComplete.init(RunScriptOnNodeAsInitScriptUsingSshAndBlockUntilComplete.java:38) at org.jclouds.compute.strategy.InitializeRunScriptOnNodeOrPlaceInBadMap.call(InitializeRunScriptOnNodeOrPlaceInBadMap.java:61) at org.jclouds .compute.strategy.InitializeRunScriptOnNodeOrPlaceInBadMap.call(InitializeRunScriptOnNodeOrPlaceInBadMap.java:34) at org.jclouds.compute.strategy.CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.call(CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.java:119) at org.jclouds.compute.strategy.CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.call(CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.java :49) 在 java.util.concurrent.FutureTask。在 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 在 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 在 java.lang.Thread 运行(FutureTask.java:262) .run(Thread.java:745) 1 个错误[s]

任何想法??

4

1 回答 1

0

堆栈跟踪有点密集,但在其中我们可以看到:

could not connect to any ip address port 22 on node

这表明 jclouds 正在尝试连接到新节点,但它无法这样做。

最可能的原因是实例没有正确配置的安全组。

如果给定子网 ID,jclouds 有一个错误会阻止它创建安全组:请参阅JCLOUDS-987:AWS EC2:如果指定子网 ID,则不创建安全组

您可以通过提前创建一个打开所需端口的安全组来解决此问题 - 这将是端口 22,加上实体所需的任何端口(在本例中为 Ambari)。templateOptions然后,您使用蓝图中的Brooklyn 属性将其传递给 jclouds 。

例如:

name: IDA Ambari All Services with explicit Security Group
description: This Application is used to build one Ambari Server and a Cluster of Ambari Agents
origin: vendor
location: 
  jclouds:aws-ec2:
    region: eu-central-1
    identity: identity
    credential: credential
    osFamily: RHEL
    osVersionRegex: 6.*
    hardwareId: m3.medium
services:
- type: io.brooklyn.ambari.AmbariCluster
  brooklyn.config:
    initialSize: 2
    install.version: 2.1.0
    services:
      - FALCON
    provisioning.properties:
      networkName: subnet-003dfb7b
      templateOptions:
        securityGroupIds: sg-12345678
于 2015-08-11T12:58:11.990 回答