C2w3 lab2 - cloudwatch related

Hello,
For step 5 - Monitoring your Architecture with CloudWatch Alarms
I keep getting timeout when I try bringing down the interface
after replacing the BASTION-HOST-DNS entry …please advise !

ssh -i de-c2w3lab2-bastion-host-key.pem ubuntu@ sudo ifconfig ens5 down

ssh: connect to host ec2-3-80-150-77.compute-1.amazonaws.com port 22: Connection timed out

Hello @Rajeev_Prabhakar,
I couldn’t reproduce the issue but did you fill the notification_email in the variables.tf before running:

ssh -i de-c2w3lab2-bastion-host-key.pem ubuntu@ec2-3-80-150-77.compute-1.amazonaws.com sudo ifconfig ens5

You should be getting the same AWS notification in the notification_email. Could you continue with the rest of the lab and see if you get the second test complete in the dashboard, even without notifications you should be able to finish the lab. Thank you

@Georgios - The prior cloud9 lab timed out, so, going to try all the steps with a fresh lab created moments ago…will let you know…thanks !

1 Like

To answer you question, yes, I had filled up the notification_email in one of the tf files (don’t recall which name) in my prior c9 lab setup that timed out/expired…

Ok if you try again remember the command’s purpose is to trigger the notification, thats why I asked about the variables.tf. Repeated commands will trigger the same thing. But you should be able to finish the lab if you can see the dashboard without AWS notification_emails. Cheers

@Georgios
I tried with a new cloud9 lab setup and repeated the steps and it still hangs at same step and yes, variables.tf has the notification email entry…

ssh -i de-c2w3lab2-bastion-host-key.pem ubuntu@ec2-3-91-32-159.compute-1.amazonaws.com sudo ifconfig ens5 down

@Georgios - I tried to move past the last step (where the ssh gets stuck) and now I can’t connect to the bastion host for the 2nd sysbench command…I can see that bastion host is running…

  • Failed to connect to your instance

EC2 Instance Connect is unable to connect to your instance. Ensure your instance network settings are configured correctly for EC2 Instance Connect. For more information, see EC2 Instance Connect Prerequisites at Prerequisites for EC2 Instance Connect - Amazon Elastic Compute Cloud.

Hello @Rajeev_Prabhakar, I had similar issue and the command still send a reconfirmation email. Its strange you don’t get any notifications, could you confirm that the terminal hangs even if you ctr+c? Yes the last part you need to reboot the old bastion host instance to connect again. Thanks

let me try these steps…

For the first issue -

voclabs:~/environment/terraform $ ssh -i de-c2w3lab2-bastion-host-key.pem ubuntu@ec2-3-91-32-159.compute-1.amazonaws.com sudo ifconfig ens5 down

client_loop: send disconnect: Broken pipe

I retried the following step after rebooting the bastion host and it still hangs…
voclabs:~/environment/terraform $ ssh -i de-c2w3lab2-bastion-host-key.pem ubuntu@ec2-3-91-32-159.compute-1.amazonaws.com sudo ifconfig ens5 down

Even after rebooting the bastion host, I can’t instance connect to it via console…same error as I mentioned above…

From console, I see the following errors/alarms for the bastion host after rebooting it first…

Status checks

Info

Actions

Status checks detect problems that may impair i-033006adea89666c4 (de-c2w3lab2-bastion-host) from running your applications.

System status checks

System reachability check passed

Instance status checks

Instance reachability check failed

Check failure at

2024/10/31 17:03 GMT-4 (34 minutes)

Attached EBS status checks

Attached EBS reachability check passed

@Rajeev_Prabhakar ok I understand you cant connect to the bastion host, but you could the first time because you said the issue was after part 5. Am I wrong and you could see the dashboard cpu and storage metrics? Now we are talking about a different issue, the ssh command is supposed to reboot the bastion host instance. Also the notification_email sends anything? Thanks and sorry for your trouble

I figured out what’s going on…the interface down step was disabling the access, although, it was not returning the control back to the cloud9 terminal…so, after multiple reboots of bastion host it finally got accessible and I was able to run the second sysbench command…

1 Like