Empty var/lib/jenkins directory installing Jenkins on CentOS 5.8 - jenkins

I have a problem with Jenkins installation. I've installed Jenkins many times on different machines and different platforms (Win XP, Win 7, Ubuntu 11.04, Ubuntu 12.04, CentOS 6) always with no problem until now.
Now I have to install Jenkins on a CentOS 5.8 machine, I follow the steps from http://pkg.jenkins-ci.org/redhat/
everything seems OK, but when I navigate to
/var/lib/jenkins
folder is empty (I run a ls -l command). It supose to have some default files and folders like
config.xml (file)
fingerprints (folder)
jobs (folder)
plugins (folder)
workspace (folder)
I've tried installing different jenkins versions, but the result is the same an empty jenkins folder
Does anybody know how to solve this issue?
Thanks in advance

I think I've found the answer.
I was trying to install latest version of jenkins, I have java 5, but latest jenkins version doesn't work with java 5.
I tried, then, install an older jenkins version, and everythig works perfect
sorry for the inconvenience

You said you followed this.
That page does not include:
sudo service jenkins start/stop/restart
but it does include a link to the wiki that explains that.
Could it be that you just didn't start it, if all you did was follow the instructions of the first link without reading the second?

Related

Not able to downgrade the deploy to container

I have an issue with deploy to container plugins v 1.15 so I have decided to remove the current version and downloaded the V1.13 manually and copied the .hpi to /var/lib/Jenkins folder and restarted the Jenkins many times and specific dependencies with specific versions installed manually all the versions look ok but deploy to container plugin not installing that I don't see any deploy folder and deploy.jpi file.
Please suggest me is there anything I missing?

Update jenkins war on one machine and then move it to another one: possible?

I have a machine with blocked outgoing connections so it is not possible to update jenkins nor install the plugins I need for my work.
My idea is the following: I download the jenkins .war on my personal laptop and complete the installation + the plugin download.
Then I just move this .war to the machine where I need jenkins to be up and running.
Is it possible? Where are the plugins/updated data stored?
Also, would it be a problem the fact that my laptop has windows as os, while the destination machine is a linux RHEL?
Your solution sounds crazy :D
This could be help you:
Update Jenkins war
If you have shell access with root privilege, there is a manual way.
Download latest war file inside your linux, using wget , curl or just upload it using winscp from your windows.
Stop jenkins
Backup EVERYTHING: linux snapshot, jenkins workspace, jenkins war file, etc
Replace the old war with new war
Start jenkins
Detailed steps in this webs:
https://mohitgoyal.co/2017/02/15/upgrade-jenkins-server-to-a-new-version/
https://www.thegeekstuff.com/2016/06/upgrade-jenkins-and-plugins/
Plugin
Jenkins has an option to install plugins called Manage Plugins
This offer two options :
(1) Install plugins using available option
For official and compatible plugins, suggested by Jenkins :
(2) Install plugins using upload option
For custom plugins or when is not available on official repositories:

Jenkins version doesn't match

I have jenkins installed on an Ubuntu VM.
In the web interface I can see the version is
2.32.3.
However, if I go to /home/bitnami/.jenkins/config.xml I see the version is 1.0 (there is this tag: <version>1.0</version>)
How can it be? am I looking in the wrong place?
Thanks
You may have two versions installed, one in your system and one in your user account.
Did you installed by apt-get or wget?
When you execute the app, you may be running the Jenkins installed in your system and you are looking in your user HOME directory
Try (whereis jenkins and which jenkins) and execute this jenkins in your terminal to see if the version match.

How to install jenkins offline?

I could successfully install the jenkins online over my laptop. But while trying to install the jenkins offline (on my office workstation which cannot be connected to internet) the hell breaks loose.
After running the jenkins.war over command line although the jenkins was successfully installed yet some of the plugins were missing.I managed to get some help from the post How to install a plugin in Jenkins manually?
But then each of the plugins have to be individually downloaded and then copied over to my offline machine. So I had a trick.
I copied all the folders under .jenkins directory (in my online installation machine) and then copied them to my offline machine. Whoa!
It worked!
But I still get one single error:
Maven Integration Plugin V2.16 .javadoc 1.0 is missing. To fix, install v1.0 or later
So is there a way/website/pdf/repository which is a one stop solution/steps to smoothly install (read has all the required dependencies as a zip) Jenkins in offline mode. (If not, to the creators of Jenkins: Would it be a good idea to have one?)
I'm also searching for an easy way to manage the dependencies between the plugins but as far as I know there is no official tool for that.
Either you have a .zip file with all the plugins which you prepare one time or you fix the errors manually.
For your problem it should be enough to install the following .hpi file: https://updates.jenkins-ci.org/latest/javadoc.hpi (javadoc has no dependencies to other plugins)
You can download the .hpi version of plugins required and paste them in plugins folder at jenkins_home and then restart the jenkins,then you can able to use those plugins.

Downgrade Jenkins

I updated Jenkins a few days ago. But in the current Jenkins version, there are some annoying bugs. Is it possible to downgrade the version of Jenkins and if this is possible, how is it possible to do it?
I have been struggling with downgrading Jenkins as well, lately because the latest version seems to have a problem handling JDK 5 code (which I am unfortunately tied to for a little while longer)
Here's how I did my downgrade:
Locate an earlier stable version at https://updates.jenkins-ci.org/
Download the war file
Stop the Jenkins service
Replace the jenkins.war with the new.
Restart the service.
I had an additional issue with the configuration file not being compatible. E.g. In my case I had to disable matrix to get the service running. Your case may be different, so I suggest another question.
I easily rolled back to the last working version bydoing below steps:
Go to the location where jenkins is installed.
Rename jenkins.war if it exists to jenkins.war.corrupted
You would find a file jenkins.war.bak in same direcotry. Rename it to 'jenkins.war'
Downgrading should be equivalent to the upgrading process:
To upgrade from earlier versions of Jenkins, simply redeploy the WAR
file. Read this document for more about container-specific
instructions on how to do this. See this document for automation.
In my case, I followed the process below -
Download the jenkins.war file from https://updates.jenkins-ci.org
Stop the Jenkins service
Replace the jenkins.war with the new.
Restart the service.
Done
If you have upgraded from front end (i.e. Manage Jenkins > Upgrade Jenkins) Then you will get an option to Downgrade also from there (under Manage Jenkins -- restore to previous version)

Resources