Wednesday, March 5, 2014

Jenkins installation erros on Ubuntu 12.04

I tried to install and configure Jenkins on Ubuntu 12.04 Server and end up with following error.

dpkg: error processing /var/cache/apt/archives/jenkins_1.553_all.deb (--unpack):
 trying to overwrite '/usr/share/jenkins/jenkins.war', which is also in package jenkins-common 1.424.6+dfsg-1ubuntu0.2
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/jenkins_1.553_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

  • I tried to manually overwrite the .war file as it complained.
  • reInstalled several times
But same error at all the times.

Then I tried the remove unwanted tools and plugins form the system. Luckily I fixed the issues and now Jenkins is working fine.

Sudo apt-get autoremove




Monday, July 1, 2013

remove and reinstall mongodb

sudo apt-get purge mongodb mongodb-clients mongodb-server mongodb-dev
sudo apt-get purge mongodb-10gen
sudo apt-get autoremove
 
above 3 commands will remove all the installed libs from the ubuntu server. 
 
Install MongoDB
Configure Package Management System (APT)

The Ubuntu package management tool (i.e. dpkg and apt) ensure package consistency and authenticity by requiring that distributors sign packages with GPG keys. Issue the following command to import the 10gen public GPG Key:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
 
Create a /etc/apt/sources.list.d/10gen.list file using the following command.

echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen'
sudo tee /etc/apt/sources.list.d/10gen.list
 
Now issue the following command to reload your repository:

sudo apt-get update
 
Install Packages

Issue the following command to install the latest stable version of MongoDB:

sudo apt-get install mongodb-10gen
 
When this command completes, you have successfully installed MongoDB! Continue for configuration and start-up suggestions.
 

exception in initAndListen: 10309 Unable to create/open lock file: /var/lib/mongodb/mongod.lock errno:13 Permission denied Is a mongod instance already running?, terminating

exception in initAndListen: 10309 Unable to create/open lock file: /var/lib/mongodb/mongod.lock errno:13 Permission denied Is a mongod instance already running?, terminating


I got above error and solution was to

  • find where is mongod.lock file located
  • move all the contents to new place as backup
  • re run the mongod server

hope above error disappeared.