getsocial-rnd / neo4j-aws-ha-cluster

Neo4j Enterprise HA Cluster on AWS ECS
Apache License 2.0
13 stars 3 forks source link

The security group 'sg-521f642f' does not exist (Service: AmazonAutoScaling; Status Code: 400; Error Code: ValidationError; Request ID: xxx) #1

Closed arniesaha closed 5 years ago

arniesaha commented 5 years ago

Hello!

I've been trying to setup a Neo4j cluster as described in the repo. I've been successful in building the docker image and push it to ECR.

But, facing an issue while deploying the cloudformation template. The repo has a hardcoded security group at line 641: SecurityGroups: [!Ref 'Neo4jSecurityGroup', 'sg-521f642f'] ## autogenerated group and our SSH group

When creating with this, the cloudformation rollsback with the error in the title i.e. The security group 'sg-521f642f' does not exist (Service: AmazonAutoScaling; Status Code: 400; Error Code: ValidationError; Request ID: xxx)

Now, if I change that security group to a security group id under my VPC. It times out while trying to create the Neo4jClusterAutoScalingGroup like below and rollsback:

Neo4jClusterAutoScalingGroup | Received 0 SUCCESS signal(s) out of 1. Unable to satisfy 100% MinSuccessfulInstancesPercent requirement

Could you possibly help me out with what the correct config for the AutoScaling group should be?

Much appreciated!

Thanks, Arnab

klichukb commented 5 years ago

Hello. Sorry, - this is a leftover hardcoded security group that is not necessary for a successful setup. I merged #2 that simply removes the security group.

ASG you're getting in the end: not sure it's related but id' definitely try running setup again after merged PR, let know please if you're still running into that problem afterwards.

arniesaha commented 5 years ago

@klichukb Thanks! I'm going to run the setup again and report back !

arniesaha commented 5 years ago

Hi @klichukb,

So I tried running the setup again, but I run into the 2nd timeout and rollback issue that I mentioned in the original post.

19:32:28 UTC+0550 | ROLLBACK_IN_PROGRESS | AWS::CloudFormation::Stack | neo4j | The following resource(s) failed to create: [Neo4jClusterECSservice, Neo4jClusterAutoScalingGroup, Neo4jSlaveOnlyAutoScalingGroup, Neo4jSlaveOnlyECSservice]. . Rollback requested by user.
-- | -- | -- | -- | --
  | 19:32:27 UTC+0550 | CREATE_FAILED | AWS::AutoScaling::AutoScalingGroup | Neo4jClusterAutoScalingGroup | Received 0 SUCCESS signal(s) out of 1. Unable to satisfy 100% MinSuccessfulInstancesPercent requirement
  | 19:32:26 UTC+0550 | CREATE_FAILED | AWS::ECS::Service | Neo4jSlaveOnlyECSservice | Resource creation cancelled
  | 19:32:26 UTC+0550 | CREATE_FAILED | AWS::ECS::Service | Neo4jClusterECSservice | Resource creation cancelled
  | 19:32:26 UTC+0550 | CREATE_FAILED | AWS::AutoScaling::AutoScalingGroup | Neo4jSlaveOnlyAutoScalingGroup | Received 0 SUCCESS signal(s) out of 1. Unable to satisfy 100% MinSuccessfulInstancesPercent requirement

I also notice a typo with this 'Neo4jClusterLanuchConfig' instead of 'Neo4jClusterLaunchConfig'. Don't think that should matter though?

Is the setup working for you well? Any more ideas?

Thanks! Arnab

arniesaha commented 5 years ago

Hi @klichukb

I was able to run the setup successfully by updating my instance type to m4.large instead of t2.medium.

But, now the tasks under the services are stopping with below messages:

Exit Code | 1
-- | --
true

Also says, "Network bindings - not configured"

Any ideas what can be done for this?

Thanks, Arnab

arniesaha commented 5 years ago

Hi @klichukb

Could you perhaps help me out with this? Whether the cloudformation is still working for you?

Much appreciated.

Thanks, Arnab

taraspos commented 5 years ago

Hello @arniesaha, sorry for long reply. Did you manage to make it work?

I just tried to set up this and it worked for me. However, I found some problems along the way, that you might encounter as well.

Could you provide me the following information:

  1. Did you apply stack-wide environment variable ENVIRONMENT? It is required for the cluster to work, but since it is not one of the stack parameters you could miss it.
  2. Which AdminUser parameter you provided? I just consulted the official Neo4j documentation and it looks like the only valid value there is neo4j, I will remove it from the parameters, so it can't be customized.
  3. Did you check the neo4j container logs with docker logs command? This will help a lot.
arniesaha commented 5 years ago

Hi @Trane9991

Will try this again and update!

FYI, meanwhile, I went ahead with a VM approach as discussed here: https://community.neo4j.com/t/neo4j-ha-docker-cluster-on-ecs-with-cloudformation-reference/5060