Jenkins Pipeline localhost:7080 - jenkins

I ran Jenkins on localhost:9080 and implemented certain tests.
The next step was to create jenkins pipeline on the port 7080 from terminal which worked the first time.
Unfortunately i didn't save the password and every reset after that doesn't give me the new one.
I restarted this project from scratch at least 4 times and jenkins and password has ever been provided.
Is there a way to make it spit out the new admin password for me?

The issue wasn't with the localhost or Jenkins itself but with Docker that was pulling it from the memory. Deleting the image or resetting Docker solved the issue.

Related

Migrated Jenkins keeps redirecting to original domain

I migrated Jenkins with thinBackup plugins. When I restart my new Jenkins master, accessing it via http://new_jenkins_ip:8080 will redirect me to https://old_jenkins_domain.
My old Jenkins runs with services, it was setup long ago. My new Jenkins runs in k8s, I edited stable/jenkins chart and deployed it with Helm.
At first, I thought Jenkins URL is the cause, so I change configuration in jenkins.model.JenkinsLocationConfiguration.xml (according to this) and restart Jenkins by killing its pod (I deploy new Jenkins in k8s). But it's still redirecting to https://old_jenkins_domain.
I also try copying entire JENKINS_HOME (this) directory and yes, it's still redirecting to https://old_jenkins_domain.
Another problem is that I'm using github-oauth and matrix-auth plugins and if I don't install these before performing thinBackup migration, Jenkins will fail to start up and restart itself forever. I want to know why.
I actually can access http://new_jenkins_ip:8080/login but when I hit login, github-oauth just throw an NullPointerException.
I might try this python to migrate plugins because I think thinBackup can't migrate all the github-oauth config.
It's github-oauth plugins that keep directing me to my old site. I new oauth app in github and let it redirecting to my new IP.

Newly created jenkins jobs not running on Jenkins

I am creating new jobs for my selenium python scripts. My old jobs are running fine, but my newly created jobs do not run . I tried copying and pasting the configurations from my old jobs to the new one , but still new jobs won't run.
can you provide more information? what is the configuration? what do you see in the log?
did you check the labels for the nodes? you might be running on a restricted node or on master or the master doesn't allow jobs to be executed for example ...
Found the solution , there was a memory issue with the AWS machine on which jenkins is deployed

Jenkins BUILD now issue

In the jenkins applications ,I accidentally clicked on the " Build Now " instead of "Build with Parameters" link while trying to Build the application and now its stuck . I am unable to cancel this Build. I tried building the application again however I am unable to promote my new build because the previous Build is still not complete. Is there any way I can abort the previous build ?
in Jenkins Script console (/jenkins/script) try:
Jenkins.getInstance().getItemByFullName(jobName,Job.class).getBuildByNumber(jobNumber).doStop()
Check if you are logged in and you have permissions for aborting the build (should be at job's configuration page)
Jenkins could need some time to process the abortion request.
If you notice that Jenkins is definitely stacked, check the reason.
It could be memory, CPU or space issue.
These Linux commands are highly recommended:
top
df -h
The last and the most unpleasant way is rebooting Jenkins and starting the new job. NEVER try that on production machine :)

Jenkins docker-plugin - Job does not start (waiting for executor)

I'm trying not (not hard enough it seems) to get our jenkins server to provision a jenkins-slave using docker.
I have installed the Docker-plugin and configured it according to the description on the page. I have also tested the connectivity and at least this part works.
I have also configured 1 label in the plugin and in my job. I even get a nice page showing me the connected jobs for this slave.
When I then try to start a build nothing really happens. A build is scheduled, but never started - (pending—Waiting for next available executor).
From the message it would seem like jenkins is not able to start the slave via docker....
I'm using docker 1.6.2 and the plugin is 0.10.1.
Any clue to what is going on would be much appreciated!
It seems the problem was that I had added the docker version in the plugin config. That is apparently a no-go according to this post

Jenkins Jobs are not to be seen after network issue

Today morning, we noticed all Putty Jobs running Jenkins were closed due to Network Issue. Once network was up, we re-started Jenkins and we observed that Jenkins Dashboard was not showing ANY jobs. We had around 80 Jobs on the dash board. We are using VM servers for Master/Slave setup. Config.xml is fine. What do we do? how do we get back on track?
All the jenkins jobs are basically xml config files kept in jenkins home.
If your Jenkins is not showing these jobs then it is not using same home directory.
Kindly check jenkins process to see which directory it is pointing to.

Resources