jenkins started with all jobs lost, trying to use 'copy existing job' feature - continuous-integration

the CI server was disconnected for a while for some strange reason from the network and when it came back up, jenkins displayed with no jobs. however in the directory where the jobs live, /var/lib/jenkins/jobs/, the two jobs that should appear are there, but don't show any evidence of existence in the web client.
i tried using the 'copy existing job' and then pointed it to /var/lib/jenkins/jobs/existing_test but it tells me: no such job /var/lib/jenkins/jobs/existing_test
any suggestions as to how to get this to work ?

I know that question can be outdated, but a possible a solution is to run jenkins under appropriate user (the one it run previously). This helped me.

ended up just building the jobs brand new, wasn't able to find a fix

At first I would try and look in the jenkins logs, as your data is in /var/lib/jenkins I would guess your log files are in /var/log/jenkins. Maybe you can find out whats wrong from there.
Also you could try the "load configuration from disk" link in the "manage jenkins" view. That should try to reload the configuration files from your directories, and maybe bring your jobs back. Anyways, you should be able to see something in your logs. If the logs are empty check file permissions, I used to have problems with that after updating sometimes.

Related

heroku pg:psql keeps connecting but nothing happens afterwards

I'm new to Heroku and I've noticed that their page provides a tutorial on NodeJS where they go step by step on how to integrate a project or start a new project on their platform. Through the last step there's a section for databases, using postgres as an example, which happens to be the database type I'm looking to integrate in my project as well. However, after following through with the tutorial, I noticed that when executing heroku pg:psql, the Git Bash (what I used) keeps showing Connecting to [...] (the name of the database) and nothing else happens, effectively not allowing me to create rows and whatnot in the database so I can see them as part of the application. Have I gone wrong somewhere, or am I just missing something?
I have tried multiple ways to make sure it's connecting to the right database, I have even made a new database, however nothing works and the process keeps going endlessly. I've let it run for more than a day and still goes nowhere.
According to this source, https://devcenter.heroku.com/articles/getting-started-with-nodejs#provision-a-database, I should be connected to it with that bit of code there, however the only thing that I'm shown is --> Connecting to postgresql-animate-97685 .
I just had the same mistake and could not find a solution. I spent a lot of time to understand what needs to be done for this.
As a result, as I decided:
I originally used the console from Git Bash. Instead, I tried using the standard console from Windows - cmd. And it all worked out as per the instructions from Heroku.
By the way, this is not the first time that Git Bash fails me.
Hope that helped.

Looking for accurev clear client cache script

I was reading a post here and #chaboud commented the following:
went to an "Advanced Accurev topics" talk, and the first tidbit was a
large shell command for clearing out Accurev's client-side
caching/sync mechanism to correct for when Accurev updates silently
fail to pull down files that should be updated.
Does anyone know of this script or have a copy? I have been looking through accurev documentation and online and so far no luck on this script.
Any help would be great
Dan
I have never heard of this script and I worked for AccuRev.
I am guessing someone (outside of AccuRev) created a script which manually updates a workspace when an update would fail.

Jenkins Page Not Loading. Apache2 Ubuntu Page Starts Up Instead

I'm new to DevOps and build/automation tools. I installed Apache Maven and Jenkins, but the Jenkins dashboard is not popping up. In other words, I should be seeing this:
But I'm instead seeing this:
I found a similar question here, but I was unable to understand what to do: How to access Jenkins dashboard locally when it is installed on staging server?
From what I understand, I need to make Jenkins open up on a different port, but I'm not sure how to do this. I checked in services and I can confirm that Jenkins is in fact running.
Ok, so I figured it out, but I still don't understand what that Apache page is. For anyone wondering how to fix the issue with the dashboard not popping up:
STEP 1: I was exploring the installation directory and found a file called jenkins.xml with the line --httpPort=8080.
STEP 2: It wouldn't let me edit and save the file so I dragged it to my desktop where it let me make changes. I changed 8080 to 8082, saved, and then placed the file back in the installation directory.
STEP 3: I didn't notice any changes until I restarted the Jenkins service and it's showing the dashboard now.
I still would like to know what that "Apache 2 Ubuntu Default Page" is about.

Lab Management build definition restores to a snapshot but the VM is stopped

I'm trying to work out an automated Build-Deploy-Test workflow using Lab Management/VS 2010 and everything is working ok... except for one small thing.
In my build definition, within the process>environment I set a snapshot that I want the environment to be reverted to before deploying, and this works fine, but when the snapshot is reverted to, the environment is stopped but not restarted.
What results is that the build waits indefinitely for the workflow capability to be available on the environment.
A temporary fix is to just watch and wait for the enivonment to be stopped, and then to start it manually and everything will proceed as expected... but this is hardly ideal.
This is happening to everyone on my team, and none of us have come across a solution. Has anyone else seen this and solved it?
You'll want to take the "Initial Snapshot" when the VM is actually turned on. You can do that, or you can customize the Lab default build process template and include a StartEnvironment workflow activity after the restore snapshot phase.
My suggestion would be to just take the snapshot when the VMs are turned on though. That's the way I have always ended up doing it.

Hudson CI Server configuration gone very wrong

I am not sure if this is a true SO question really, so will understand if it gets closed or moved.
I am new to hudson, I have had it up and running for a few weeks now and so far have been very pleased. It is running on a Windows 2008 X64 machine as a windows service.
The WS2008 runs on VMware ESXI4.0, as well as another WS2008 and an Ubuntu Server. Last night the two windows servers suddenly stopped responding, MSTSC, file share, web access, it all stopped. The ESXI server still responded as I could browse to the home page and see its install guide. Also the Ubuntu machine continued to work normally, I ssh'd onto it, the Apache server was running and Samba still responded normally.
In the end I had to reboot the physical box to get it all back up again.
Once I did the servers came back up but Hudson has now lost its settings. What is weird is it still asks me to log in, and the username and password still work, so it knows that user is setup.
The user was setup to be an admin user so I could manage the whole site. I had three build jobs setup and had them building each night.
Now when I log in I do not see half the options on the left hand menu and there are no jobs.
I am not really sure where to start with this to try and solve it.
I could really do with some help and guidance.
Thank you
Jon
EDIT
OK, so I can narrow my question down now.
If I remove the user security it shows me all the builds and I can manage the system again.
<?xml version='1.0' encoding='UTF-8'?>
<hudson>
<version>1.341</version>
<numExecutors>2</numExecutors>
<mode>NORMAL</mode>
<useSecurity>false</useSecurity>
<authorizationStrategy class="hudson.security.GlobalMatrixAuthorizationStrategy">
<permission>hudson.scm.SCM.Tag:Jon</permission>
<permission>hudson.model.View.Configure:Jon</permission>
<permission>hudson.model.Computer.Configure:Jon</permission>
<permission>hudson.model.Item.Configure:Jon</permission>
<permission>hudson.model.Item.Create:Jon</permission>
<permission>hudson.model.Run.Delete:Jon</permission>
<permission>hudson.model.Computer.Delete:Jon</permission>
<permission>hudson.model.View.Delete:Jon</permission>
<permission>hudson.model.Hudson.Read:anonymous</permission>
<permission>hudson.model.Hudson.Read:Jon</permission>
<permission>hudson.model.Run.Update:Jon</permission>
<permission>hudson.model.Hudson.Administer:Jon</permission>
<permission>hudson.model.Item.Build:Jon</permission>
<permission>hudson.model.Item.Read:Jon</permission>
<permission>hudson.model.Item.Delete:Jon</permission>
<permission>hudson.model.Item.Workspace:Jon</permission>
<permission>hudson.model.View.Create:Jon</permission>
</authorizationStrategy>
<securityRealm class="hudson.security.HudsonPrivateSecurityRealm">
<disableSignup>true</disableSignup>
</securityRealm>
This is the line I changed, was true.
<useSecurity>false</useSecurity>
my user name is "Jon", which I can still log on with, but I can only see the following options:
Build History
My Views
Leader Board
If I try and go directly to "/manage" I get access denied.
Second Edit
Fixed it, I removed all security, went in and re added the User then it seemed to remember everything.. very odd.
Third Edit
Didn't fix it, but found out what the original problem is. It is forgetting my user settings, so even if I re add "Jon" back in with all privileges after a restart it forgets it all again.
All of hudson's configuration information lives in XML files in the hudson home directory. You didn't tell us how you deploy it (winstone? jetty?), but you have to have a home directory somewhere.
It's rather hard to imagine hudson deleting these files.
I would make a new, clean, install of hudson somewhere else and compare it to the state of your broken installation.
I once lost data when I edited the Job xmls (every job has it's own config.xml) and broke the xml structure. That will prevent Hudson from loading the jobs. You might find some information, of what is going wrong in the log files (HUDSON_HOME\*.log).

Resources