- Newest
- Most votes
- Most comments
Cezar, taking your three recent updates together it sounds for all the world like your original EC2 instance, which had an /etc/environment
file as well as having Tomcat and Java installed, has been terminated and a new instance has been spun up to replace it, which doesn't have any of those things on it.
This would also explain why your target group is now unhealthy.
The mention of a target group is interesting, because that implies there's a load balancer too, suggesting this is a more complex environment than just a single Ubuntu EC2 instance.
I'm then wondering if there's an auto-scaling group as well, which may have launched a new instance but the customisation step didn't complete successfully https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-launch-template.html
Long story short, I think there are many more moving parts to this than you have put in your question (or maybe you are just not aware of them).
Which Ubuntu AMI is the EC2 provisioned from, is it an unmodified one provided by the vendor, or a customised one for your organisation?
It looks like the ubuntu user's login profile is trying to run lesspipe
and dircolors
but without the absolute path to them.
Both commands are on the system in /bin
and /usr/bin
but these arent in the ubuntu user's $PATH
. To fix this you need to find the script from where they are run - start by looking at .bashrc
and .bash_profile
in the ubuntu user's homedir which is probably /home/ubuntu
- and change lesspipe
and dircolors
to the full path.
The other option is to append /bin
and /usr/bin
to $PATH
earlier, before lesspipe
and dircolors
are run.
Until yesterday morning I had the /etc/environment file with path set including path to the java package but today this file is empty, why?
How I said until yesterday morning I had installed in my ubuntu java and tomcat today I don't have anything installed, by ssh putty I don't have any access to the commands linux in the aws terminal I can't doing things as open /etc/environment and save with vim editor, once again, why, what is happening? I believe that I lost my EC2 instance ubuntu.
Hi Steve, I will recreate my instance, do you have any tips for me to create the instance?
Hi, sorry by delay, after delete and recreate the instance without load balancer I solved my problem, thanks and best regards.
Relevant content
- asked 4 years ago
- asked 3 months ago
- asked 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated a year ago
Target group health checks are explained here https://docs.aws.amazon.com/elasticloadbalancing/latest/application/target-group-health-checks.html