How To Restart Omsa Services In Windows
Introduction
While working in Jenkins, users may be in a state of affairs where they need to restart it manually. This can occur due to dissimilar reasons, such every bit troubleshooting issues or installing plugins. Luckily, Jenkins offers several methods to perform a manual restart.
In this tutorial, nosotros volition go through the different methods used to restart Jenkins manually.
Prerequisites
- A re-create of Jenkins installed and ready to utilize (larn how to install Jenkins on Ubuntu xviii.04, Debian 10, CentOS eight, or Windows ten).
- Access to a web browser.
- Access to the terminal window (Linux and macOS) or command prompt (Windows).
- Access to a user account with sudo/administrator privileges.
Restart Jenkins via URL
If you are using the Jenkins dashboard in a web browser, restart Jenkins by inbound the appropriate URL. Using the default restart URL forces Jenkins to restart without waiting for any builds to complete:
[Jenkins URL]/restart
To consummate all currently running jobs before the restart, use the safe restart selection. New jobs volition queue up and run subsequently the restart is consummate:
[Jenkins URL]/safeRestart
Both options crave confirming the restart by clicking the Aye push button:
The Jenkins URL contains the organisation's hostname and the port Jenkins is running on (default port is 8080). If you are logging into the Jenkins dashboard on your system, employ:
http://localhost:8080/restart http://localhost:8080/safeRestart
If you are logging in on another system, utilize:
http://[your system'southward hostname]:8080/restart http://[your arrangement'south hostname]:8080/safeRestart
Restart Jenkins via Safe Restart Plugin
The Safe Restart plugin for Jenkins allows you to perform a safe restart from the Jenkins dashboard.
1. To add together the plugin, start by clicking the Manage Jenkins link on the left-hand side of the dashboard:
2. Nether the System Configuration section, click the Manage Plugins push:
three. Nether the Bachelor tab, search for "safety restart" and check the box next to the Prophylactic Restart plugin name.
iv. Click the Install without restart push button to add the plugin:
v. Once the plugin is installed, return to your dashboard. At that place is now a Restart Safely link on the left-manus side:
6. Clicking the link initiates a rubber restart of Jenkins. You need to confirm the restart by clicking the Yes push:
Note: Find everything you need to know about using Jenkins in our Jenkins tutorial.
Restart Jenkins via CLI
Jenkins CLI (Control Line Interface) is a Coffee file that works as an extension of the local terminal shell. It allows you to use Coffee commands to manage Jenkins from a terminal window or command prompt.
i. Start by downloading the Jenkins CLI .jar file.
2. Open the Jenkins dashboard in your web browser and click the Manage Jenkins link on the left-manus side.
iii. Curlicue down and click the Jenkins CLI button under the Tools and Actions section.
4. Download jenkins-cli.jar using the provided link.
Notation: The Jenkins CLI folio besides offers an overview of the commands available for use.
five. Once the download is complete, open the terminal window or command prompt and employ the post-obit control syntax to restart Jenkins:
java -jar [path to the jenkins-cli.jar file] -southward [Jenkins URL] restart
For instance, using the jenkins-cli.jar file in the Downloads binder on a Windows arrangement:
java -jar C:\Users\akova\Downloads\jenkins-cli.jar -due south http://localhost:8080/ restart
How to Restart the Jenkins in Linux, Windows & Mac
One time installed, Jenkins runs as a background service. This means y'all can restart it with the same commands used to restart whatsoever other service.
Restart the Jenkins Service in Linux
On a Linux system, initiate a restart of the Jenkins service with:
sudo systemctl restart jenkins
Another method is to apply:
sudo /etc/init.d/jenkins restart
Note: Using the 2nd method may brand the Jenkins service unreliable because it picks up the environment from the root user. In contrast, restarting the service using the systemctl
command provides a bare environment.
Restart the Jenkins Service in Windows
Restart the Jenkins service in the Windows command prompt by using the internet
command to finish and then start the service:
net terminate jenkins net outset jenkins
Another method is to movement to the Jenkins installation folder and restart jenkins.exe. For instance:
cd C:\Programme Files\Jenkins jenkins.exe restart
Restart the Jenkins Service in MacOS
To restart the Jenkins service in MacOS, stop the service and start information technology over again using the launchctl
control:
sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist sudo launchctl load /Library/LaunchDaemons/org.jenkins-ci.plist
Conclusion
After reading this tutorial, y'all should be able to use 1 of the methods outlined higher up to restart Jenkins manually.
Was this article helpful?
Yes No
Source: https://phoenixnap.com/kb/restart-jenkins
Posted by: baumobee1968.blogspot.com
0 Response to "How To Restart Omsa Services In Windows"
Post a Comment