Why is Jenkins localhost not working?
Introduction Show
While working in Jenkins, users may be in a situation where they need to restart it manually. This can occur due to different reasons, such as troubleshooting issues or installing plugins. Luckily, Jenkins offers several methods to perform a manual restart. In this tutorial, we will go through the different methods used to restart Jenkins manually. Prerequisites
Restart Jenkins via URLIf you are using the Jenkins dashboard in a web browser, restart Jenkins by entering the appropriate URL. Using the default restart URL forces Jenkins to restart without waiting for any builds to complete:
To complete all currently running jobs before the restart, use the safe restart option. New jobs will queue up and run after the restart is complete:
Both options require confirming the restart by clicking the Yes button: The Jenkins URL contains the system's hostname and the port Jenkins is running on (default port is 8080). If you are logging into the Jenkins dashboard on your system, use:
If you are logging in on another system, use:
Restart Jenkins via Safe Restart PluginThe Safe Restart plugin for Jenkins allows you to perform a safe restart from the Jenkins dashboard. 1. To add the plugin, start by clicking the Manage Jenkins link on the left-hand side of the dashboard: 2. Under the System Configuration section, click the Manage Plugins button: 3. Under the Available tab, search for "safe restart" and check the box next to the Safe Restart plugin name. 4. Click the Install without restart button to add the plugin: 5. Once the plugin is installed, return to your dashboard. There is now a Restart Safely link on the left-hand side: 6. Clicking the link initiates a safe restart of Jenkins. You need to confirm the restart by clicking the Yes button: Note: Find everything you need to know about using Jenkins in our Jenkins tutorial. Restart Jenkins via CLIJenkins CLI (Command Line Interface) is a Java file that works as an extension of the local terminal shell. It allows you to use Java commands to manage Jenkins from a terminal window or command prompt. 1. 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-hand side. 3. Scroll down and click the Jenkins CLI button under the Tools and Actions section. 4. Download jenkins-cli.jar using the provided link. Note: The Jenkins CLI page also offers an overview of the commands available for use. 5. Once the download is complete, open the terminal window or command prompt and use the following command syntax to restart Jenkins:
For instance, using the jenkins-cli.jar file in the Downloads folder on a Windows system:
How to Restart the Jenkins in Linux, Windows & MacOnce installed, Jenkins runs as a background service. This means you can restart it with the same commands used to restart any other service. Restart the Jenkins Service in LinuxOn a Linux system, initiate a restart of the Jenkins service with:
Another method is to use:
Note: Using the second method may make the Jenkins service unreliable because it picks up the environment from the root user. In contrast, restarting the service using the Restart the Jenkins Service in WindowsRestart the Jenkins service in the Windows command prompt by using the
Another method is to move to the Jenkins installation folder and restart jenkins.exe. For instance:
Restart the Jenkins Service in MacOSTo restart the Jenkins service in MacOS, stop the service and start it again using the
Conclusion After reading this tutorial, you should be able to use one of the methods outlined above to restart Jenkins manually. Why localhost is not working in Jenkins?If you do have a problem where Jenkins on localhost 8080 is not working, verify that the JDK is installed and the Java utilities in the JDK's bin directory are on the PATH. This can be accomplished with the java -version command.
Why is localhost 8080 not working?You need to access your app with http in the URL not https when developing locally. You may have your web browser set to automatically try to upgrade the connection from http to https. If you, disable this setting.
Why is Jenkins not working?One of the most common reasons why Jenkins server can't start in Windows computers is because the version of the Java language was updated after the last shutdown of Jenkins server. In order to configure Jenkins to use the correct Java version, you can follow this procedure: 1. - Edit the jenkins.
How to connect to localhost 8080?Use the Windows netstat command to identify which applications are using port 8080:. Hold down the Windows key and press the R key to open the Run dialog.. Type “cmd” and click OK in the Run dialog.. Verify the Command Prompt opens.. Type “netstat -a -n -o | find "8080"". A list of processes using port 8080 are displayed.. |