News:

Server migration complete, Welcome to version 2.1.1

+-+-

+-User

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+-Site Stats

Members
Total Members: 15651
Latest: Kairus
New This Month: 2
New This Week: 3
New Today: 2
Stats
Total Posts: 128392
Total Topics: 15786
Most Online Today: 38
Most Online Ever: 7634
(January 21, 2020, 02:14:03 AM)
Users Online
Members: 9
Guests: 15
Total: 24

snmpd interference with FPP

Started by Setarcos, December 08, 2022, 01:11:23 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Setarcos

Hi folks,

I have been using SNMP to monitor my FPP instances since starting with FPP back in 2015 and noticed an abnormality with the latest version of FPP. After upgrading one of my Pis to FPP 6.2 I noticed after installing snmpd (the standard version that is part of bullseye) that if snmpd is running, FPP's web interface is intermittently showing "Abnormal Conditions - May Cause Poor Performance
FPPD Daemon is not running", but if I have a sequence playing, the playout doesn't appear to be affected. I checked the logs and am not seeing an indication that fppd is actually stopping/restarting.

The front-end does indeed appear to be behaving properly (the /api/system/status endpoint is intermittently returning {"fppd":"Not Running","status":"stopped"... and the Abnormal Condition warning is appearing as it should), but it isn't clear why the status endpoint is actually doing this.

Any thoughts on where I should look to try to troubleshoot this further?

JonD

So without SNMP running you do not get the FPP abnormal message, but as soon as you install it, and setup monitoring it will appear?

How frequently is your monitor checking the status?  Are you using SNMP v1, v2, or v3?  What version of Pi are you running?

Setarcos

Quote from: JonD on December 08, 2022, 01:54:38 PMSo without SNMP running you do not get the FPP abnormal message, but as soon as you install it, and setup monitoring it will appear?
The issue only appears if snmpd is running. If I manually stop the snmpd service, the FPP web interface doesn't exhibit the "Abnormal Conditions" warning issue.

Quote from: JonD on December 08, 2022, 01:54:38 PMHow frequently is your monitor checking the status?  Are you using SNMP v1, v2, or v3?  What version of Pi are you running?
This doesn't appear to be polling interval related as FPP behaves the same if my monitoring server is polling the device, or if SNMP polling is completely disabled. When the monitoring server is running, it polls the Pi every 5 minutes.

I am currently using SNMP v2.

This is with a Pi3B.


Setarcos

Digging through the SystemGetStatus() function in /www/api/controllers/system.php that handles the /api/system/status endpoint responses, and it would appear that curl is timing out either connecting or waiting for a response from http://localhost:32322/fppd/status

    } else {
        // If IP[] was not provided, then status of the local machine is desired.
        //go through the new API to get the status
        // use curl so we can set a low connect timeout so if fppd isn't running we detect that quickly
        $curl = curl_init('http://localhost:32322/fppd/status');
        curl_setopt($curl, CURLOPT_FAILONERROR, true);
        curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
        curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($curl, CURLOPT_CONNECTTIMEOUT_MS, 200);
        curl_setopt($curl, CURLOPT_TIMEOUT_MS, 3000);
        $request_content = curl_exec($curl);
        curl_close($curl);

        if ($request_content === false) {
            $status = exec("if ps cax | grep -q git_pull; then echo \"updating\"; else echo \"false\"; fi");

            $default_return_json['fppd'] = "Not Running";
            $default_return_json['status_name'] = $status == 'updating' ? $status : 'stopped';

            return json(finalizeStatusJson($default_return_json));
        }
        $data = json_decode($request_content, true);
        return json(finalizeStatusJson($data));
    }

I'll keep poking at this as time permits...

JonD

#4
If the service only needs to be enabled, I don't have any suggestions. 

Quote from: Setarcos on December 08, 2022, 01:11:23 PMAfter upgrading one of my Pis to FPP 6.2 I noticed
Is this only happening on one of several Pis, or did you only install SNMP on one of them?  I could try to recreate the issue on my end if it would be helpful, but sounds like you have several Pis around for testing.

Setarcos

Quote from: JonD on December 09, 2022, 03:55:34 AMIf the service only needs to be enabled, I don't have any suggestions. 

Quote from: Setarcos on December 08, 2022, 01:11:23 PMAfter upgrading one of my Pis to FPP 6.2 I noticed
Is this only happening on one of several Pis, or did you only install SNMP on one of them?  I could try to recreate the issue on my end if it would be helpful, but sounds like you have several Pis around for testing.

I have snmpd running on all my FPP Pis of various types (2B, zero, 3B and 4), but this is the only one I currently have running 6.x

Setarcos

A bit more testing on this. It seems as though the connect timeout needs to be bumped up to 3 seconds so that this doesn't happen. It isn't entirely clear why though as this seems to only be required while snmpd is running. With snmpd running if I directly load http://<my-fpp-instance>:32322/fppd/status, it is very responsive (9-32ms), but going through http://<my-fpp-instance>/api/system/status takes 209-3300ms.

Support FPP

+- Recent Topics

help getting started, next step? by netfan
Today at 09:35:34 AM

F16v4 Ports vs Universe Configuration Question by k6ccc
Today at 09:32:48 AM

Need Expert Advise on F16v4 Ports vs Universe Configuration by Kairus
Today at 09:32:33 AM

Set Time/Date by darylc
February 02, 2023, 06:09:40 PM

We moved and are and selling everything (in Boise, ID) by ybjr38@yahoo.com
February 02, 2023, 02:14:59 PM

K8-PB No network on first run by rharrington76
February 02, 2023, 01:39:47 PM

Help How I use Orange Pi with FPP by tbone321
February 01, 2023, 02:41:58 PM

No network by Steve_63
January 31, 2023, 08:17:21 PM

F48V4-NS Pixel Controller using all 12 Differential SmartReceiver ports by BirdingPix
January 31, 2023, 02:26:30 PM

F48v4NS - Pi or No Pi? by rjhodgefamily
January 31, 2023, 09:25:20 AM

Powered by EzPortal
Powered by SMFPacks Menu Editor Mod