Friday, May 24, 2013

RedHat update problems because of bind conflict.

This is the second time all my RedHat servers stopped automatically updating.


The error when you run:

yum update


Error:


--> Processing Conflict: bind97-libs conflicts bind-libs
--> Processing Conflict: bind97-libs conflicts bind-libs
--> Processing Conflict: bind97-utils conflicts bind-utils
--> Finished Dependency Resolution
32:bind97-libs-9.7.0-17.P2.el5_9.1.x86_64 from rhel-x86_64-server-5 has depsolving problems
--> bind97-libs conflicts with bind-libs
32:bind97-utils-9.7.0-17.P2.el5_9.1.x86_64 from rhel-x86_64-server-5 has depsolving problems
--> bind97-utils conflicts with bind-utils
--> Running transaction check
---> Package kernel.x86_64 0:2.6.18-308.20.1.el5 set to be erased
--> Processing Conflict: bind97-libs conflicts bind-libs
--> Processing Conflict: bind97-libs conflicts bind-libs
--> Processing Conflict: bind97-utils conflicts bind-utils
--> Finished Dependency Resolution
32:bind97-libs-9.7.0-17.P2.el5_9.1.x86_64 from rhel-x86_64-server-5 has depsolving problems
--> bind97-libs conflicts with bind-libs
32:bind97-utils-9.7.0-17.P2.el5_9.1.x86_64 from rhel-x86_64-server-5 has depsolving problems
--> bind97-utils conflicts with bind-utils
Error: bind97-utils conflicts with bind-utils
Error: bind97-libs conflicts with bind-libs
You could try using --skip-broken to work around the problem
You could try running: package-cleanup --problems
package-cleanup --dupes
rpm -Va --nofiles --nodigest
 


We run automatic updates on many of our servers:

# automatically install updates
do_update = yes
# automatically download updates
do_download = yes
# automatically download deps of updates
do_download_deps = yes 



When errors like the ones above, automatic updates just break without notification.


To fix the above problem I checked which version of bind we had installed:

# rpm -qa | grep bind
bind-devel-9.3.6-20.P1.el5_8.5
bind-devel-9.3.6-20.P1.el5_8.5
bind-9.3.6-20.P1.el5_8.5
ypbind-1.19-12.el5_6.1
bind-libs-9.3.6-20.P1.el5_8.5
bind97-libs-9.7.0-10.P2.el5_8.4
bind97-utils-9.7.0-10.P2.el5_8.4
bind-libs-9.3.6-20.P1.el5_8.5
bind-utils-9.3.6-20.P1.el5_8.5


RedHat 5.x defaults version is 9.3.x.   There was no reason 9.7.x was installed, so we removed it:

yum remove bind97-libs 

Since the all the 9.7.x bind utils depend on this package, all 9.7.x packages will be removed.  

This fixed our problem.   Be sure to confirm you don't need the 9.7.x functionality before removing any packages! 



FYI: I never have problem with my Ubuntu servers.   This is the second time RedHat has failed me.



Monday, May 13, 2013

How to locate files in Ubuntu packages that have not been installed yet.

Many times I have a need to locate a package of a specific file that has not been installed yet.   One way to do this in Ubuntu is to install apt-file:
sudo apt-get install apt-file

Then update the search database by running:
sudo apt-file update


To locate a file run:
apt-file search DateTime.pm
  libatompub-perl: /usr/share/perl5/Atompub/DateTime.pm
  libchart-clicker-perl: /usr/share/perl5/Chart/Clicker/Axis/DateTime.pm
  libdata-faker-perl: /usr/share/perl5/Data/Faker/DateTime.pm
  libdatetime-perl: /usr/lib/perl5/DateTime.pm

While multiple packages contain DateTime.pm, it was fairly obvious which package I needed to install.

Wednesday, May 1, 2013

**ePN /usr/lib/nagios/plugins/check_hpasm: "Use of uninitialized value $_ in scalar chomp at (eval 21) line 340,".

We are running stock Nagios  on a Ubuntu 10.04 LTS server:


jemurray@nagios:/usr/lib/nagios/plugins$ /usr/sbin/nagios3 --version

Nagios Core 3.2.0
Copyright (c) 2009 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-12-2009
License: GPL

We have been running the check_hpasm check script from http://labs.consol.de/nagios/check_hpasm/ for years with no problems.

After we installed and started running the F5 check script from: http://labs.consol.de/lang/en/nagios/check_nwc_health/


All our HP ASM checks were failing with the error:

**ePN /usr/lib/nagios/plugins/check_hpasm: "Use of uninitialized value $_ in scalar chomp at (eval 21) line 340,". 


After verifying we had all the latest versions of the check_* scripts, we found the built in Perl interpreter to be the problem.   To fix the problem, you have to force Nagios to use the system Perl interpreter instead of the Nagios built in one.   To do this locate the check_nwc_health and check_hpasm script and add the following line towards the top of the script:
# nagios: -epn

For example here is the first 10 lines of the script:


#! /usr/bin/perl -w
# nagios: -epn
package Nagios::MiniPlugin;
use strict;
use Getopt::Long qw(:config no_ignore_case bundling);
our @STATUS_CODES = qw(OK WARNING CRITICAL UNKNOWN DEPENDENT);


After this update, everything started working fine again.  

Followers

Contributors