[Spacewalk-list] monitoring-data-cleanup fails: "Already in transaction"

Jan Pazdziora jpazdziora at redhat.com
Mon May 16 11:23:03 UTC 2011


On Mon, May 16, 2011 at 11:17:25AM +0100, David Nutter wrote:
> 
> Spacewalk 1.4, CentOS 5.6. Here's what I get when I run:
> 
>   /usr/bin/monitoring-data-cleanup --no-delete-unmatched --keep-monitoring-data "1 month"
> 
>   Deleting probes data older than 10:50:35 Apr 16, 2011...
>   RHN::Exception: DBD::Oracle::db begin_work failed: Already in a transaction
>     RHN::DB /usr/lib/perl5/vendor_perl/5.8.8/RHN/DB.pm 228 RHN::Exception::DB::throw
>     main /usr/bin/monitoring-data-cleanup 128 RHN::DB::handle_error
> 
> Stripping monitoring-data-cleanup down to the following gives the same
> error: 
> 
> ----------------------------------------------
> #!/usr/bin/perl
> use strict;
> use lib '/etc/rc.d/np.d';
> use NOCpulse::NOCpulseini;
> use PhysCluster;
> 
> my $cluster = PhysCluster->newInitialized('/etc/rhn/cluster.ini');
> my $localConfig = $cluster->get_LocalConfig;
> my $ini = NOCpulse::NOCpulseini->new;
> 
> if (%$localConfig) {
>         $ini->connect();
> } else {
>         print "Error: This script can be run only on monitoring
>         backend.\n";
>         exit 1;
> }
> 
> $ini->dbh->begin_work;
> -----------------------------------------------
> 
> Any ideas where I should start looking? I can't see anything in
> RHN/DB.pm that would lead to a transaction being created implicitly
> during connect(). Also, if I do:
> 
> $ini->dbh->rollback;
> $ini->dbh->begin_work;
> 
> I still get the error on begin_work. There don't seem to be any
> transactions pending in v$transaction. Any thoughts?

Could you please just delete / comment out the

	$ini->dbh->begin_work;

calls -- the database handle now is not autocommit-ing, so that
begin_work call is not needed anymore.

Thank you,

-- 
Jan Pazdziora
Principal Software Engineer, Satellite Engineering, Red Hat




More information about the Spacewalk-list mailing list