Search code examples
jenkinsamazon-ec2

When Jenkins job in running IP gets frozen and inaccessible


I have set up some python script in Jenkins with AWS/Ubuntu server.

However, when I run a job, my ip address get inaccessible http://3.82.243.44:8080/, just spinning, and I can't do anything within Jenkins app

enter image description here

My AWS instance is showing as Running so I don't its an issue there.

This is what I latest installed on it

sudo apt-get install python3-pip

And this is what I'm trying to build (customer python build) in Jenkins

pip3 install -r requirements.txt
sbase install chromedriver latest
pytest --headless

If anyone has experience and what I may be doing wrong, please let me know.


Solution

  • You have likely run out of memory, because you are executing a Selenium job on Jenkins running on a t2.micro EC2 instance. To fix this, you can change your instance type on the AWS EC2 console as follows:

    1. Stop the EC2 instance from the AWS console (Instance state => Stop Instance).
    2. Change the instance type to one with more resources (Actions => Instance settings => Change instance type => t2.large).
    3. Start instance (Instance state => Start instance).
    4. Run the job again.

    Note: You will be assigned a new public IP address when you do this, so you will have to edit your DNS records. Also note that t2.large EC2 instances cost more than t2.micros.