frankcollins3 / fill_container

codecamp team project updated with new icon screen menu + puppeteer icon search, GraphQL, redux, relational psql !mongo, and accuweatherAPI
1 stars 0 forks source link

EC2 deployment keep having to terminate and launch instance [9:26pm] #265

Open frankcollins3 opened 1 year ago

frankcollins3 commented 1 year ago

attempting to do: deploy: FE-react-app BE-express-psql with amazon EC2

error:

ssh -i "mykey.pem" ubuntu@ec2-int-int-int-int.us-east-2.compute.amazonaws.com

    sudo apt-get install curl          cUrl/curl
    curl sL https://deb.nodesource.com/setup_16.x | sudo -E bash -             node...
    sudo apt-get install nodejs
    sudo npm install pm2@latest -g

connecting works and it takes iterm2 to its ssh-i functionality: πŸ‘ ubuntu@ip-{my-ip-address}:/fill_container$

ubuntu ssh-i client: πŸ‘ chmod 400 water-key.pem // this gets run but without any confirmation from the terminal it just returns to state where it can run another command

a few times using: πŸ‘Ž # ssh -i "mykey.pem" ubuntu@ec2-int-int-int-int.us-east-2.compute.amazonaws.com ubuntu and eventually it says "directory not found" when running that same command that works and takes iterm2 from terminal to ssh

The key stops working and immediately everything works again when that corresponding instance is terminated πŸ‘ A new EC2 instance is launched, with all the above commands working until the problem starts over.

Admittedly, given that there is a $15,000 a month enterprise tier, and regardless of such, I assume fault.

proposed approach: 0: of course terminate instance and launch has been part of the proposed approach. how to get away from that step.

frankcollins3 commented 1 year ago

forgot. thats how it was happening: when fill_container is put into the ubuntu scope and then deleted to update dependencies:

ssh-i command: rm -rf fill_container

output: rm -rf fill_container rm -rf fill_container rm -rf fill_container rm -rf fill_container rm -rf fill_container rm -rf fill_container rm -rf fill_container rm -rf fill_container rm -rf fill_container rm -rf fill_container rm -rf fill_container rm -rf fill_container

over and over the statement prints to the terminal, and ctrl-D is used to escape from that repetition.

then trying to use the key it works and if that happens again the key stops working.

part of avoiding this problem is remember to use: sudo rm -rf fill_container (which deletes and doesn't run statements over and over in the terminal/ssh-i client)

[9:45pm]

frankcollins3 commented 1 year ago

terminal froze on a terminal statement mentioning: reify mark deleted

then as you can see in this picture, I'm in the desktop, the key is on the desktop, and the statement that worked before (same statement that took iterm to ssh-i and eventually to the terminal freezing on that above noted command)

Screen Shot 2023-07-03 at 9 57 06 PM

now the key is "not found" have to delete EC2 instance and start fresh.

[9:58pm]

frankcollins3 commented 1 year ago

ssh: connect to host ec2-incriminating-ints.us-east-2.compute.amazonaws.com port 22: Operation timed out [10:00pm]

frankcollins3 commented 1 year ago

amazon EC2 -> instance state -> reboot state -> πŸ‘Ž [ reboot successful ] still does nothing to to allow key to be a point of connection to the amazon provided ssh-i command

[10:03pm]