Giter Club home page Giter Club logo

ecs-embedded's People

Contributors

enozcan avatar jakescahill avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

ecs-embedded's Issues

https://guides.hazelcast.org/ecs-embedded/ hazelcast-aws dependency issue?

Hi, I'm trying to follow this guide: https://guides.hazelcast.org/ecs-embedded/

Our environment is slightly different so I'm taking a few steps differently, but nonetheless following the guide, and the documentation: https://github.com/hazelcast/hazelcast-aws

The guide has a number of steps:

Create an Application
Use Hazelcast AWS ECS Configuration
Containerize the Application

These three I skip by following this part of the guide:
"If you want to use your image in the following steps, please also make sure your Docker Hub registry is public. However, for the purpose of this guide, you can also use the already built hazelcastguides/hazelcast-embedded-ecs Docker image."

I have a Dockerfile (I tried both yaml and xml configurations, hence copying both. I also tried starting from the embedded ecs image - hazelcastguides/hazelcast-embedded-ecs):

from hazelcast/hazelcast:4.0.3

COPY hazelcast.xml /configFolder/hazelcast.xml
COPY hazelcast.yaml /configFolder/hazelcast.yaml

For example, my hazelcast.yaml looks like so:

hazelcast:
  network:
    join:
      multicast:
        enabled: false
      aws:
        enabled: true
    interfaces:
      enabled: true
      interfaces:
        - 10.0.*.*

I build and deploy this image to my ECR repo, which my task definition pulls from to create the service:

def build_docker(image, repository=image, directory=image){
        AWS_ECR_REPO="<MY-AWS-ACCOUNT-ID>.dkr.ecr.us-east-2.amazonaws.com"
        AWS_REGION="us-east-2"

        sh "docker build -t ${image} ./${directory}"
        TAGID=sh(returnStdout: true, script: "docker images -q ${image} | head -n1 | tr -d ' \t\n\r'")
        echo "TAGID: ${TAGID}"
        sh """
                docker tag ${TAGID} ${AWS_ECR_REPO}/${repository}
                aws ecr get-login-password --region ${AWS_REGION} | docker login --username AWS --password-stdin ${AWS_ECR_REPO}
                docker push ${AWS_ECR_REPO}/${repository}
        """
}
build_docker("hazelcast", "hazelcast", "config")

Once it's in ECR, my task definition picks it up (I don't follow the guides task-definition, because our hazelcast relies on kafka, and zookeeper to run):
example-all.json

{
  "ipcMode": null,
  "executionRoleArn": "arn:aws:iam::<MY-AWS-ACCOUNT-ID>:role/ecs-execution-role",
  "containerDefinitions": [
    {
      "dnsSearchDomains": null,
      "environmentFiles": null,
      "logConfiguration": {
        "logDriver": "awslogs",
        "secretOptions": null,
        "options": {
          "awslogs-group": "/ecs/example-all",
          "awslogs-region": "us-east-2",
          "awslogs-stream-prefix": "ecs"
        }
      },
      "entryPoint": null,
      "portMappings": [
        {
          "hostPort": 2181,
          "protocol": "tcp",
          "containerPort": 2181
        }
      ],
      "command": null,
      "linuxParameters": null,
      "cpu": 0,
      "environment": [
        {
          "name": "ALLOW_ANONYMOUS_LOGIN",
          "value": "yes"
        }
      ],
      "resourceRequirements": null,
      "ulimits": null,
      "dnsServers": null,
      "mountPoints": [],
      "workingDirectory": null,
      "secrets": null,
      "dockerSecurityOptions": null,
      "memory": null,
      "memoryReservation": null,
      "volumesFrom": [],
      "stopTimeout": null,
      "image": "<MY-AWS-ACCOUNT-ID>.dkr.ecr.us-east-2.amazonaws.com/zookeeper",
      "startTimeout": null,
      "firelensConfiguration": null,
      "dependsOn": null,
      "disableNetworking": null,
      "interactive": null,
      "healthCheck": {
        "retries": 10,
        "command": [
          "CMD-SHELL",
          "/bin/echo \"ruok\" | /bin/nc localhost 2181 || exit 1"
        ],
        "timeout": 5,
        "interval": 45,
        "startPeriod": 30
      },
      "essential": false,
      "links": null,
      "hostname": null,
      "extraHosts": null,
      "pseudoTerminal": null,
      "user": null,
      "readonlyRootFilesystem": null,
      "dockerLabels": null,
      "systemControls": null,
      "privileged": null,
      "name": "zookeeper"
    },
    {
      "dnsSearchDomains": null,
      "environmentFiles": null,
      "logConfiguration": {
        "logDriver": "awslogs",
        "secretOptions": null,
        "options": {
          "awslogs-group": "/ecs/example-all",
          "awslogs-region": "us-east-2",
          "awslogs-stream-prefix": "ecs"
        }
      },
      "entryPoint": null,
      "portMappings": [],
      "command": null,
      "linuxParameters": null,
      "cpu": 0,
      "environment": [
        {
          "name": "KAFKA_ADVERTISED_HOST_NAME",
          "value": "localhost"
        },
        {
          "name": "KAFKA_ADVERTISED_LISTENERS",
          "value": "PLAINTEXT://localhost:9092"
        },
        {
          "name": "KAFKA_ADVERTISED_PORT",
          "value": "9092"
        },
        {
          "name": "KAFKA_AUTO_CREATE_TOPICS_ENABLE",
          "value": "true"
        },
        {
          "name": "KAFKA_LISTENERS",
          "value": "PLAINTEXT://:9092"
        },
        {
          "name": "KAFKA_ZOOKEEPER_CONNECT",
          "value": "localhost:2181"
        }
      ],
      "resourceRequirements": null,
      "ulimits": null,
      "dnsServers": null,
      "mountPoints": [],
      "workingDirectory": null,
      "secrets": null,
      "dockerSecurityOptions": null,
      "memory": null,
      "memoryReservation": null,
      "volumesFrom": [],
      "stopTimeout": null,
      "image": "<MY-AWS-ACCOUNT-ID>.dkr.ecr.us-east-2.amazonaws.com/kafka",
      "startTimeout": null,
      "firelensConfiguration": null,
      "dependsOn": [
        {
          "containerName": "zookeeper",
          "condition": "HEALTHY"
        }
      ],
      "disableNetworking": null,
      "interactive": null,
      "healthCheck": {
        "retries": 3,
        "command": [
          "CMD-SHELL",
          "echo \"ruok\" | nc localhost 9092 || exit 1"
        ],
        "timeout": 5,
        "interval": 30,
        "startPeriod": null
      },
      "essential": true,
      "links": [],
      "hostname": null,
      "extraHosts": null,
      "pseudoTerminal": null,
      "user": null,
      "readonlyRootFilesystem": null,
      "dockerLabels": null,
      "systemControls": null,
      "privileged": null,
      "name": "kafka"
    },
    {
      "dnsSearchDomains": null,
      "environmentFiles": null,
      "logConfiguration": {
        "logDriver": "awslogs",
        "secretOptions": null,
        "options": {
          "awslogs-group": "/ecs/example-all",
          "awslogs-region": "us-east-2",
          "awslogs-stream-prefix": "ecs"
        }
      },
      "entryPoint": null,
      "portMappings": [
        {
          "hostPort": 5701,
          "protocol": "tcp",
          "containerPort": 5701
        }
      ],
      "command": null,
      "linuxParameters": null,
      "cpu": 0,
      "environment": [
        {
          "name": "JAVA_OPTS",
          "value": "-Dhazelcast.config=/configFolder/hazelcast.xml -Dhazelcast.mancenter.url=http://localhost:8080/mancenter"
        }
      ],
      "resourceRequirements": null,
      "ulimits": null,
      "dnsServers": null,
      "mountPoints": [],
      "workingDirectory": null,
      "secrets": null,
      "dockerSecurityOptions": null,
      "memory": null,
      "memoryReservation": null,
      "volumesFrom": [],
      "stopTimeout": null,
      "image": "<MY-AWS-ACCOUNT-ID>.dkr.ecr.us-east-2.amazonaws.com/hazelcast",
      "startTimeout": null,
      "firelensConfiguration": null,
      "dependsOn": [
        {
          "containerName": "kafka",
          "condition": "HEALTHY"
        }
      ],
      "disableNetworking": null,
      "interactive": null,
      "healthCheck": null,
      "essential": true,
      "links": null,
      "hostname": null,
      "extraHosts": null,
      "pseudoTerminal": null,
      "user": null,
      "readonlyRootFilesystem": null,
      "dockerLabels": null,
      "systemControls": null,
      "privileged": null,
      "name": "hazelcast"
    }
  ],
  "placementConstraints": [],
  "memory": "3500",
  "taskRoleArn": "arn:aws:iam::<MY-AWS-ACCOUNT-ID>:role/hazelcast-ecs-role",
  "compatibilities": [
    "EC2"
  ],
  "taskDefinitionArn": "arn:aws:ecs:us-east-2:<MY-AWS-ACCOUNT-ID>:task-definition/example-all:9",
  "family": "example-all",
  "requiresAttributes": [
    {
      "targetId": null,
      "targetType": null,
      "value": null,
      "name": "com.amazonaws.ecs.capability.logging-driver.awslogs"
    },
    {
      "targetId": null,
      "targetType": null,
      "value": null,
      "name": "com.amazonaws.ecs.capability.docker-remote-api.1.24"
    },
    {
      "targetId": null,
      "targetType": null,
      "value": null,
      "name": "ecs.capability.execution-role-awslogs"
    },
    {
      "targetId": null,
      "targetType": null,
      "value": null,
      "name": "com.amazonaws.ecs.capability.ecr-auth"
    },
    {
      "targetId": null,
      "targetType": null,
      "value": null,
      "name": "com.amazonaws.ecs.capability.docker-remote-api.1.19"
    },
    {
      "targetId": null,
      "targetType": null,
      "value": null,
      "name": "com.amazonaws.ecs.capability.task-iam-role"
    },
    {
      "targetId": null,
      "targetType": null,
      "value": null,
      "name": "ecs.capability.container-health-check"
    },
    {
      "targetId": null,
      "targetType": null,
      "value": null,
      "name": "ecs.capability.container-ordering"
    },
    {
      "targetId": null,
      "targetType": null,
      "value": null,
      "name": "ecs.capability.execution-role-ecr-pull"
    },
    {
      "targetId": null,
      "targetType": null,
      "value": null,
      "name": "com.amazonaws.ecs.capability.docker-remote-api.1.18"
    },
    {
      "targetId": null,
      "targetType": null,
      "value": null,
      "name": "ecs.capability.task-eni"
    },
    {
      "targetId": null,
      "targetType": null,
      "value": null,
      "name": "com.amazonaws.ecs.capability.docker-remote-api.1.29"
    }
  ],
  "pidMode": null,
  "requiresCompatibilities": [
    "EC2"
  ],
  "networkMode": "awsvpc",
  "cpu": "1024",
  "revision": 9,
  "status": "ACTIVE",
  "inferenceAccelerators": null,
  "proxyConfiguration": null,
  "volumes": []
}

I'm running on EC2 instances, but my docker containers are running by awsvpc mode so I won't be using the host mode (more than one container per instance)

Getting back to the guide again. My Cluster is 2 EC2 instances, inside my VPC. Since all hazelcast traffic will operate within the private network, my security group covers this and I'm not using the guide's SG. Here are my SG rules:

INBOUND
Type | Protocol | Port range | Source | Description - optional
-- | -- | -- | -- | --
HTTP | TCP | 80 | 0.0.0.0/0 | –
All traffic | All | All | 10.0.0.0/8 | –
HTTPS | TCP | 443 | 0.0.0.0/0 | –
All ICMP - IPv4 | ICMP | All | 0.0.0.0/0 | –

OUTBOUND
Type | Protocol | Port range | Destination | Description - optional
-- | -- | -- | -- | --
All traffic | All | All | 0.0.0.0/0 | –
All ICMP - IPv4 | ICMP | All | 0.0.0.0/0 | –

For the section of the Guide: Create IAM Role. I followed this exactly, and you can see the roles defined as in my task-definition.json.
AWS Cloud watch logs are forwarding appropriately.

To create the service I run
aws ecs create-service --cli-input-json file://prod-service-definition.json
that file looks like this:

{
    "cluster": "prod",
    "serviceName": "example-all",
    "taskDefinition": "example-all",
    "desiredCount": 2,
    "clientToken": "",
    "launchType": "EC2",
    "deploymentConfiguration": {
        "maximumPercent": 200,
        "minimumHealthyPercent": 40
    },
    "networkConfiguration": {
        "awsvpcConfiguration": {
            "subnets": [
                "subnet-0a9a855f0fb73149f",
                "subnet-05a4a4fef6ac10156",
                "subnet-08f8f9c098e5f790c"
            ],
            "securityGroups": [
                "sg-010eaa7278a139b82"
            ],
            "assignPublicIp": "DISABLED"
        }
    },
    "healthCheckGracePeriodSeconds": 0,
    "schedulingStrategy": "REPLICA",
    "deploymentController": {
        "type": "ECS"
    },
    "enableECSManagedTags": true,
    "propagateTags": "SERVICE"
}

Again, these containers won't need public IPs, they're sitting in the private subnet and using awsvpc networking.

That's about it for steps to reproduce. Now as for the exception I'm getting. It's a null pointer, so it doesn't really help me identify what I need to fix next. This is what I see on cloudwatch:

2021-04-07T11:11:54.120-04:00 | . ____ _ __ _ _
-- | --
  | 2021-04-07T11:11:54.120-04:00 | /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
  | 2021-04-07T11:11:54.120-04:00 | ( ( )\___ \| '_ \| '_\| \| '_ \/ _` \| \ \ \ \
  | 2021-04-07T11:11:54.120-04:00 | \\/ ___)\| \|_)\| \| \| \| \| \|\| (_\| \| ) ) ) )
  | 2021-04-07T11:11:54.120-04:00 | ' \|____\| .__\|_\| \|_\|_\| \|_\__, \| / / / /
  | 2021-04-07T11:11:54.120-04:00 | =========\|_\|==============\|___/=/_/_/_/
  | 2021-04-07T11:11:54.122-04:00 | :: Spring Boot :: (v2.2.6.RELEASE)
  | 2021-04-07T11:11:54.493-04:00 | 2021-04-07 15:11:54.489 INFO 1 --- [ main] g.h.springboot.HazelcastApplication : Starting HazelcastApplication v0.1 on ip-10-0-201-249.us-east-2.compute.internal with PID 1 (/app.jar started by root in /)
  | 2021-04-07T11:11:54.494-04:00 | 2021-04-07 15:11:54.494 INFO 1 --- [ main] g.h.springboot.HazelcastApplication : No active profile set, falling back to default profiles: default
  | 2021-04-07T11:11:57.926-04:00 | 2021-04-07 15:11:57.925 INFO 1 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
  | 2021-04-07T11:11:57.994-04:00 | 2021-04-07 15:11:57.994 INFO 1 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
  | 2021-04-07T11:11:57.995-04:00 | 2021-04-07 15:11:57.994 INFO 1 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.33]
  | 2021-04-07T11:11:58.189-04:00 | 2021-04-07 15:11:58.188 INFO 1 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
  | 2021-04-07T11:11:58.189-04:00 | 2021-04-07 15:11:58.189 INFO 1 --- [ main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 3476 ms
  | 2021-04-07T11:11:58.916-04:00 | 2021-04-07 15:11:58.916 INFO 1 --- [ main] c.h.i.config.AbstractConfigLocator : Loading 'hazelcast.yaml' from the classpath.
  | 2021-04-07T11:12:00.189-04:00 | 2021-04-07 15:12:00.134 INFO 1 --- [ main] com.hazelcast.instance.AddressPicker : [LOCAL] [dev] [4.0.2] Interfaces is enabled, trying to pick one address matching to one of: [10.0.*.*]
  | 2021-04-07T11:12:00.190-04:00 | 2021-04-07 15:12:00.190 INFO 1 --- [ main] com.hazelcast.instance.AddressPicker : [LOCAL] [dev] [4.0.2] Prefer IPv4 stack is true, prefer IPv6 addresses is false
  | 2021-04-07T11:12:00.294-04:00 | 2021-04-07 15:12:00.294 INFO 1 --- [ main] com.hazelcast.instance.AddressPicker : [LOCAL] [dev] [4.0.2] Picked [10.0.201.249]:5701, using socket ServerSocket[addr=/0.0.0.0,localport=5701], bind any local is true
  | 2021-04-07T11:12:00.551-04:00 | 2021-04-07 15:12:00.550 INFO 1 --- [ main] com.hazelcast.system : [10.0.201.249]:5701 [dev] [4.0.2] Hazelcast 4.0.2 (20200702 - 2de3027) starting at [10.0.201.249]:5701
  | 2021-04-07T11:12:00.551-04:00 | 2021-04-07 15:12:00.550 INFO 1 --- [ main] com.hazelcast.system : [10.0.201.249]:5701 [dev] [4.0.2] Copyright (c) 2008-2020, Hazelcast, Inc. All Rights Reserved.
  | 2021-04-07T11:12:02.214-04:00 | 2021-04-07 15:12:02.213 INFO 1 --- [ main] c.h.s.i.o.impl.BackpressureRegulator : [10.0.201.249]:5701 [dev] [4.0.2] Backpressure is disabled
  | 2021-04-07T11:12:04.715-04:00 | 2021-04-07 15:12:04.713 INFO 1 --- [ main] com.hazelcast.aws.AwsDiscoveryStrategy : Using AWS discovery plugin with configuration: AwsConfig{accessKey='***', secretKey='***', iamRole='null', region='null', hostHeader='null', securityGroupName='null', tagKey='null', tagValue='null', hzPort=5701-5708, cluster='null', family='null', serviceName='null', connectionTimeoutSeconds=10, connectionRetries=3, readTimeoutSeconds=10}
  | 2021-04-07T11:12:04.804-04:00 | 2021-04-07 15:12:04.804 INFO 1 --- [ main] com.hazelcast.instance.impl.Node : [10.0.201.249]:5701 [dev] [4.0.2] Shutting down connection manager...
  | 2021-04-07T11:12:04.809-04:00 | 2021-04-07 15:12:04.808 INFO 1 --- [ main] com.hazelcast.instance.impl.Node : [10.0.201.249]:5701 [dev] [4.0.2] Shutting down node engine...
  | 2021-04-07T11:12:04.816-04:00 | 2021-04-07 15:12:04.816 INFO 1 --- [ main] c.hazelcast.instance.impl.NodeExtension : [10.0.201.249]:5701 [dev] [4.0.2] Destroying node NodeExtension.
  | 2021-04-07T11:12:04.820-04:00 | 2021-04-07 15:12:04.819 WARN 1 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'commandController': Unsatisfied dependency expressed through field 'hazelcastInstance'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hazelcastInstance' defined in class path resource [org/springframework/boot/autoconfigure/hazelcast/HazelcastServerConfiguration$HazelcastServerConfigFileConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.hazelcast.core.HazelcastInstance]: Factory method 'hazelcastInstance' threw exception; nested exception is java.lang.RuntimeException: Failed to configure discovery strategies
  | 2021-04-07T11:12:04.895-04:00 | 2021-04-07 15:12:04.894 INFO 1 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
  | 2021-04-07T11:12:05.011-04:00 | 2021-04-07 15:12:05.010 INFO 1 --- [ main] ConditionEvaluationReportLoggingListener :
  | 2021-04-07T11:12:05.011-04:00 | Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
  | 2021-04-07T11:12:05.093-04:00 | 2021-04-07 15:12:05.092 ERROR 1 --- [ main] o.s.boot.SpringApplication : Application run failed
  | 2021-04-07T11:12:05.093-04:00 | org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'commandController': Unsatisfied dependency expressed through field 'hazelcastInstance'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hazelcastInstance' defined in class path resource [org/springframework/boot/autoconfigure/hazelcast/HazelcastServerConfiguration$HazelcastServerConfigFileConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.hazelcast.core.HazelcastInstance]: Factory method 'hazelcastInstance' threw exception; nested exception is java.lang.RuntimeException: Failed to configure discovery strategies
  | 2021-04-07T11:12:05.093-04:00 | at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:643) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
  | 2021-04-07T11:12:05.093-04:00 | at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:130) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
  | 2021-04-07T11:12:05.093-04:00 | at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
  | 2021-04-07T11:12:05.093-04:00 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1422) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
  | 2021-04-07T11:12:05.093-04:00 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
  | 2021-04-07T11:12:05.093-04:00 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
  | 2021-04-07T11:12:05.093-04:00 | at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
  | 2021-04-07T11:12:05.093-04:00 | at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
  | 2021-04-07T11:12:05.093-04:00 | at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
  | 2021-04-07T11:12:05.093-04:00 | at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
  | 2021-04-07T11:12:05.093-04:00 | at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:882) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
  | 2021-04-07T11:12:05.093-04:00 | at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:878) ~[spring-context-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
  | 2021-04-07T11:12:05.093-04:00 | at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) ~[spring-context-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
  | 2021-04-07T11:12:05.093-04:00 | at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.2.6.RELEASE.jar!/:2.2.6.RELEASE]
  | 2021-04-07T11:12:05.093-04:00 | at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) [spring-boot-2.2.6.RELEASE.jar!/:2.2.6.RELEASE]
  | 2021-04-07T11:12:05.093-04:00 | at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.2.6.RELEASE.jar!/:2.2.6.RELEASE]
  | 2021-04-07T11:12:05.093-04:00 | at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-2.2.6.RELEASE.jar!/:2.2.6.RELEASE]
  | 2021-04-07T11:12:05.093-04:00 | at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.2.6.RELEASE.jar!/:2.2.6.RELEASE]
  | 2021-04-07T11:12:05.093-04:00 | at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.2.6.RELEASE.jar!/:2.2.6.RELEASE]
  | 2021-04-07T11:12:05.093-04:00 | at guides.hazelcast.springboot.HazelcastApplication.main(HazelcastApplication.java:11) [classes!/:0.1]
  | 2021-04-07T11:12:05.093-04:00 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_212]
  | 2021-04-07T11:12:05.093-04:00 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_212]
  | 2021-04-07T11:12:05.093-04:00 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_212]
  | 2021-04-07T11:12:05.093-04:00 | at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_212]
  | 2021-04-07T11:12:05.093-04:00 | at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [app.jar:0.1]
  | 2021-04-07T11:12:05.093-04:00 | at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [app.jar:0.1]
  | 2021-04-07T11:12:05.093-04:00 | at org.springframework.boot.loader.Launcher.launch(Launcher.java:51) [app.jar:0.1]
  | 2021-04-07T11:12:05.093-04:00 | at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:52) [app.jar:0.1]
  | 2021-04-07T11:12:05.093-04:00 | Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hazelcastInstance' defined in class path resource [org/springframework/boot/autoconfigure/hazelcast/HazelcastServerConfiguration$HazelcastServerConfigFileConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.hazelcast.core.HazelcastInstance]: Factory method 'hazelcastInstance' threw exception; nested exception is java.lang.RuntimeException: Failed to configure discovery strategies
  | 2021-04-07T11:12:05.093-04:00 | at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:656) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
  | 2021-04-07T11:12:05.093-04:00 | at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:636) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
  | 2021-04-07T11:12:05.093-04:00 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
  | 2021-04-07T11:12:05.093-04:00 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
  | 2021-04-07T11:12:05.093-04:00 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
  | 2021-04-07T11:12:05.093-04:00 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
  | 2021-04-07T11:12:05.093-04:00 | at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
  | 2021-04-07T11:12:05.093-04:00 | at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
  | 2021-04-07T11:12:05.093-04:00 | at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
  | 2021-04-07T11:12:05.093-04:00 | at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
  | 2021-04-07T11:12:05.093-04:00 | at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
  | 2021-04-07T11:12:05.093-04:00 | at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1290) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
  | 2021-04-07T11:12:05.093-04:00 | at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1210) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
  | 2021-04-07T11:12:05.093-04:00 | at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
  | 2021-04-07T11:12:05.093-04:00 | ... 27 common frames omitted
  | 2021-04-07T11:12:05.093-04:00 | Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.hazelcast.core.HazelcastInstance]: Factory method 'hazelcastInstance' threw exception; nested exception is java.lang.RuntimeException: Failed to configure discovery strategies
  | 2021-04-07T11:12:05.093-04:00 | at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
  | 2021-04-07T11:12:05.093-04:00 | at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:651) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
  | 2021-04-07T11:12:05.093-04:00 | ... 40 common frames omitted
  | 2021-04-07T11:12:05.093-04:00 | Caused by: java.lang.RuntimeException: Failed to configure discovery strategies
  | 2021-04-07T11:12:05.093-04:00 | at com.hazelcast.spi.discovery.impl.DefaultDiscoveryService.loadDiscoveryStrategies(DefaultDiscoveryService.java:149) ~[hazelcast-all-4.0.2.jar!/:4.0.2]
  | 2021-04-07T11:12:05.093-04:00 | at com.hazelcast.spi.discovery.impl.DefaultDiscoveryService.<init>(DefaultDiscoveryService.java:57) ~[hazelcast-all-4.0.2.jar!/:4.0.2]
  | 2021-04-07T11:12:05.093-04:00 | at com.hazelcast.spi.discovery.impl.DefaultDiscoveryServiceProvider.newDiscoveryService(DefaultDiscoveryServiceProvider.java:29) ~[hazelcast-all-4.0.2.jar!/:4.0.2]
  | 2021-04-07T11:12:05.093-04:00 | at com.hazelcast.instance.impl.Node.createDiscoveryService(Node.java:327) ~[hazelcast-all-4.0.2.jar!/:4.0.2]
  | 2021-04-07T11:12:05.093-04:00 | at com.hazelcast.instance.impl.Node.<init>(Node.java:264) ~[hazelcast-all-4.0.2.jar!/:4.0.2]
  | 2021-04-07T11:12:05.093-04:00 | at com.hazelcast.instance.impl.HazelcastInstanceImpl.createNode(HazelcastInstanceImpl.java:147) ~[hazelcast-all-4.0.2.jar!/:4.0.2]
  | 2021-04-07T11:12:05.093-04:00 | at com.hazelcast.instance.impl.HazelcastInstanceImpl.<init>(HazelcastInstanceImpl.java:116) ~[hazelcast-all-4.0.2.jar!/:4.0.2]
  | 2021-04-07T11:12:05.093-04:00 | at com.hazelcast.instance.impl.HazelcastInstanceFactory.constructHazelcastInstance(HazelcastInstanceFactory.java:211) ~[hazelcast-all-4.0.2.jar!/:4.0.2]
  | 2021-04-07T11:12:05.093-04:00 | at com.hazelcast.instance.impl.HazelcastInstanceFactory.newHazelcastInstance(HazelcastInstanceFactory.java:190) ~[hazelcast-all-4.0.2.jar!/:4.0.2]
  | 2021-04-07T11:12:05.093-04:00 | at com.hazelcast.instance.impl.HazelcastInstanceFactory.newHazelcastInstance(HazelcastInstanceFactory.java:128) ~[hazelcast-all-4.0.2.jar!/:4.0.2]
  | 2021-04-07T11:12:05.093-04:00 | at com.hazelcast.core.Hazelcast.newHazelcastInstance(Hazelcast.java:91) ~[hazelcast-all-4.0.2.jar!/:4.0.2]
  | 2021-04-07T11:12:05.093-04:00 | at org.springframework.boot.autoconfigure.hazelcast.HazelcastServerConfiguration$HazelcastServerConfigFileConfiguration.hazelcastInstance(HazelcastServerConfiguration.java:55) ~[spring-boot-autoconfigure-2.2.6.RELEASE.jar!/:2.2.6.RELEASE]
  | 2021-04-07T11:12:05.093-04:00 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_212]
  | 2021-04-07T11:12:05.093-04:00 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_212]
  | 2021-04-07T11:12:05.093-04:00 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_212]
  | 2021-04-07T11:12:05.093-04:00 | at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_212]
  | 2021-04-07T11:12:05.093-04:00 | at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
  | 2021-04-07T11:12:05.093-04:00 | ... 41 common frames omitted
  | 2021-04-07T11:12:05.093-04:00 | Caused by: java.lang.NullPointerException: null
  | 2021-04-07T11:12:05.093-04:00 | at java.util.regex.Matcher.getTextLength(Matcher.java:1283) ~[na:1.8.0_212]
  | 2021-04-07T11:12:05.093-04:00 | at java.util.regex.Matcher.reset(Matcher.java:309) ~[na:1.8.0_212]
  | 2021-04-07T11:12:05.093-04:00 | at java.util.regex.Matcher.<init>(Matcher.java:229) ~[na:1.8.0_212]
  | 2021-04-07T11:12:05.093-04:00 | at java.util.regex.Pattern.matcher(Pattern.java:1093) ~[na:1.8.0_212]
  | 2021-04-07T11:12:05.093-04:00 | at com.hazelcast.aws.RegionValidator.validateRegion(RegionValidator.java:33) ~[hazelcast-all-4.0.2.jar!/:4.0.2]
  | 2021-04-07T11:12:05.093-04:00 | at com.hazelcast.aws.AwsClientConfigurator.createAwsClient(AwsClientConfigurator.java:53) ~[hazelcast-all-4.0.2.jar!/:4.0.2]
  | 2021-04-07T11:12:05.093-04:00 | at com.hazelcast.aws.AwsDiscoveryStrategy.<init>(AwsDiscoveryStrategy.java:75) ~[hazelcast-all-4.0.2.jar!/:4.0.2]
  | 2021-04-07T11:12:05.093-04:00 | at com.hazelcast.aws.AwsDiscoveryStrategyFactory.newDiscoveryStrategy(AwsDiscoveryStrategyFactory.java:41) ~[hazelcast-all-4.0.2.jar!/:4.0.2]
  | 2021-04-07T11:12:05.093-04:00 | at com.hazelcast.spi.discovery.impl.DefaultDiscoveryService.buildDiscoveryStrategy(DefaultDiscoveryService.java:183) ~[hazelcast-all-4.0.2.jar!/:4.0.2]
  | 2021-04-07T11:12:05.093-04:00 | at com.hazelcast.spi.discovery.impl.DefaultDiscoveryService.loadDiscoveryStrategies(DefaultDiscoveryService.java:141) ~[hazelcast-all-4.0.2.jar!/:4.0.2]
  | 2021-04-07T11:12:05.093-04:00 | ... 57 common frames omitted

Policy file contents are missing on the guide

In Create IAM Role section, file://policy.json and file://role-policy.json files are passed to CLI commands but the content of these are missing or even they exist they're not visible/clear to where to look for them.

Whoops I was looking for the other Spring repo referred in the guide.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.