Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
7.0NG.744 (P) 200303 on Ubuntu bionic - hash- or arrayref expected running discovery
#1
Hi there

Is there anyone experiencing this issue? When running a discovery task (Discovery.NetScan) It ends up in a second with no new agents detected showing 100% completed.

On pandora_server.log there's an error with DiscoveryServer.pm:

2020-04-05 06:56:31 Base: ******** [V1] [E] '********': hash- or arrayref expected (not a simple scalar, use allow_nonref to allow this) at /usr/lib/perl5/PandoraFMS/DiscoveryServer.pm line 1026.

2020-04-05 06:56:31 Base: ******** [V1] Pandora FMS Server ' ********' unhandled error.

Seems that the issue has something to do with this block of code in particular with the encode_json($stats)

##########################################################################
# Update recon task status.
##########################################################################
sub PandoraFMS::Recon::Base::update_progress ($$) {
    my ($self, $progress) = @_;

    my $stats = {};
    if (defined($self->{'summary'}) && $self->{'summary'} ne '') {
        $stats->{'summary'} = $self->{'summary'};
    }
    $stats->{'step'} = $self->{'step'};
    $stats->{'c_network_name'} = $self->{'c_network_name'};
    $stats->{'c_network_percent'} = $self->{'c_network_percent'};

    # Store progress, last contact and overall status.
    db_do ($self->{'dbh'}, 'UPDATE trecon_task SET utimestamp = ?, status = ?, summary = ? WHERE id_rt = ?',
        time (), $progress, encode_json($stats), $self->{'task_id'});
}

Any idea on how to fix the code or why is this happening? Perl version is 5.26.1-6ubuntu0.3

BR

EH
 Reply


Users browsing this thread: 1 Guest(s)


(c) 2006-2018 Artica Soluciones Tecnológicas. Contents of this wiki are under Create Common Attribution v3 licence. | pandorafms.com | pandorafms.org

Theme © MyBB Themes