How to solve the Jenkins master-slave environment issue

Spread the post
  • 46
  •  
  •  
  •  
  •  
    46
    Shares

Problem Statement:-

How to solve the Jenkins master-slave environment issue

Jenkins master-slave environment issue

Jenkins is an open-source automation server that allows building, deploying, and automating any project with the support of hundreds of plugins. It can run on Windows, macOS, and other Unix operating systems.

Description of the Issue:-

We met with a challenge where everything was set up, including Jenkin slave set up and NodeJS ec2 instance. As we started using NodeJS command on Jenkins, we faced an error stating, “Command not found.” we added the “Manage Nodes and Clouds” plugin into the project.

However, we were confused that the command was working fine if we login on the Jenkin user through the instance directly and did not work when using Jenkins UI. The team tried many other ways to tackle this challenge but did not succeed.

The Solution Offered:-

After intense research and testing, we added the “Manage Nodes and Clouds” plugin into the project. Whenever we added a slave instance, the plugin loaded only the existing environment variable and path on the slave. And, if we add any service on the instance after adding the slave, those path values did not update on the Jenkin slave.

We took an alternative approach to delete the slave node and created a new Node on the managed Nodes and clouds plugin.

Thereafter, the instance started accepting commands, and we did not face any errors.

Referral/ Support links – https://github.com/miztiik/DevOps-Demos/tree/master/setup-jenkins-slave

Technologies or frameworks or tools – Jenkins, NodeJS, and AWS

Platforms (Web, Mobile, Etc.) – Node Server, supports web and mobile.

Server or OS – AWS ec2instance

Browser – NIL

Soft Suave is the leading web and mobile app development company in India that has highly-talented developers’ expertise in all latest technologies and tools. If you are stuck with errors like above and need expert consultation in NodeJS development, contact Soft Suave to hire the best NodeJS developers and fix complex errors at a nominal cost.

  • 46
    Shares