Warning: camera not stopping??

Forum for questions and support relating to the 1.29.x releases only.
Locked
marcjw
Posts: 8
Joined: Wed Jun 24, 2015 1:38 am

Warning: camera not stopping??

Post by marcjw »

I'm failing to understand what this warning means or what to troubleshoot:
2016-06-02 18:12:19.115440 zmdc 1520 WAR 'zmc -m 2' has not stopped at 16/06/02 18:12:19. Sending KILL to pid 28393 zmdc.pl

I get these an average of about 3/hour on only this camera - Foscam FI9821W. I've messed with a bunch of settings on both the cam and ZM but it nothing has seemed to have made much, if any difference in the number of these warnings. Recordings are fine and so I'll live with them if necessary but I hate seeing stuff like this in the logs.
linforpros
Posts: 39
Joined: Fri Jan 29, 2016 6:12 pm

Re: Warning: camera not stopping??

Post by linforpros »

marcjw wrote:I'm failing to understand what this warning means or what to troubleshoot:
2016-06-02 18:12:19.115440 zmdc 1520 WAR 'zmc -m 2' has not stopped at 16/06/02 18:12:19. Sending KILL to pid 28393 zmdc.pl
[...].

Hello, I am not a perl guy but perhaps this would be the place for someone to start:

Code: Select all

[root@localhost ~]# grep -A 15 -B 15 "has not stopped" $(which zmdc.pl)
        ."\n"
    );
    $process->{keepalive} = !$final;
    kill( 'TERM', $pid );
    return $pid;
} # end sub send_stop

sub kill_until_dead {
    my ( $process ) = @_;
    # Now check it has actually gone away, if not kill -9 it
    my $count = 0;
    while( $process and $$process{pid} and kill( 0, $$process{pid} ) )
    {
        if ( $count++ > 5 )
        {
            dPrint( ZoneMinder::Logger::WARNING, "'$$process{command}' has not stopped at "
                .strftime( '%y/%m/%d %H:%M:%S', localtime() )
                .". Sending KILL to pid $$process{pid}\n"
            );
            kill( 'KILL', $$process{pid} );
        }
        
        sleep( 1 );
    }
}

sub _stop {
    my ($final, $process ) = @_;

    my $pid = send_stop( $final, $process );
    return if ! $pid;

It seems that the condition must be "$count++ > 5 in order for the result to come about like in your case. Perhaps someone will follow up on that for you.
best regards
LinforPros
Locked