How I resolved the error "an internal error occurred during form field validation (http 403)." while working with Jenkins.

Introduction

I was opportune to be part of DevOps project-based learning on Darey.io which started in April 2022 and is gradually coming to an end this month. I encounter an error on project 9 titled 'continuous integration pipeline for a tooling website' while working with Jenkins. This project was implemented using the AWS EC2 instance, I initiated a free tier Ubuntu 20.04 server and installed Jenkins. I ran the following command to install Jenkins on the server:

Installation of JDK as Java is a dependency for Jenkins

sudo apt update
sudo apt install default-jdk-headless

Installation of Jenkins

wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -
sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt update
sudo apt-get install jenkins

Solution

After I completed the installation of Jenkins, I was getting an error "an internal error occurred during form field validation (http 403)." Hence, I began googling the error to try to resolve the issue. I found information on StackOverflow, link below:

fix-error.png

Conclusion

I have learned how to resolve the issue and I also helped others resolve the same. I am open to more knowledge on Jenkins and collaboration.