Pooler issue on Samsung M283x Series printer

Tags: #<Tag:0x00007f3b8992f8d0>

When asking for help and support, please provide as much information as possible. This should include:

  • Steps to reproduce an issue.
    Run poller script on the debug page, https://[librenms-url]/device/[14device-id]/capture
    The issue started for me 2020-05-15 00:15:05 CET

  • The output of ./validate.php
    $ ./validate.php

    Component Version
    LibreNMS 1.63-87-g4edff1e88
    DB Schema 2020_04_13_150500_add_last_error_fields_to_bgp_peers (164)
    PHP 7.4.6
    Python 3.6.9
    MySQL 10.1.44-MariaDB-0ubuntu0.18.04.1
    RRDTool 1.7.0
    SNMP NET-SNMP 5.7.3

    ====================================

    [OK] Composer Version: 1.10.6
    [OK] Dependencies up-to-date.
    [OK] Database connection successful
    [OK] Database schema correct

If it’s an issue with the WebUI then please consider including a screenshot and the browser version you are using.

If you are having troubles with discovery/polling include the pastebin output of:

./discovery.php -h HOSTNAME -d | ./pbin.sh
./poller.php -h HOSTNAME -r -f -d | ./pbin.sh

Output of the above
$ ./discovery.php -h HOSTNAME -d | ./pbin.sh
Paste endpoint: https://p.libren.ms/api/create
SQL[select migration from migrations order by id desc limit 1 [] 0.19ms]

SQL[select count(*) as aggregate from `migrations` limit 1 [] 0.1ms] 
  
SQL[SELECT version() [] 0.12ms] 
  
Updating os_def.cache...  
Done  
SQL[SELECT * FROM `devices` WHERE disabled = 0 AND snmp_disable = 0 AND `hostname` LIKE 'HOSTNAME' ORDER BY device_id DESC [] 0.51ms] 
  
./discovery.php HOSTNAME 2020-05-16 11:00:45 - 0 devices discovered in 0.097 secs  
title: 
name: ek
private: 1
expire: 0
https://p.libren.ms/view/d049aaaa
$ ./poller.php -h HOSTNAME -r -f -d | ./pbin.sh
Paste endpoint: https://p.libren.ms/api/create
SQL[select `migration` from `migrations` order by `id` desc limit 1 [] 0.32ms] 
  
SQL[select count(*) as aggregate from `migrations` limit 1 [] 0.1ms] 
  
SQL[SELECT version() [] 0.26ms] 
  
Updating os_def.cache...  
Done  
SQL[SELECT * FROM `devices` WHERE `disabled` = 0 AND `hostname` = 'HOSTNAME' ORDER BY `device_id` ASC [] 0.48ms] 
  
./poller.php HOSTNAME 2020-05-16 11:01:11 - 0 devices polled in 0.098 secs  
title: 
name: ek
private: 1
expire: 0
https://p.libren.ms/view/b12264bb
$ 

My issue, the result of the debug pooler:
Argument 1 passed to LibreNMS\Modules\OS::updateLocation() must be an instance of LibreNMS\OS, string given, called in /opt/librenms/LibreNMS/Modules/OS.php on line 80 {“exception”:"[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Argument 1 passed to LibreNMS\Modules\OS::updateLocation() must be an instance of LibreNMS\OS, string given, called in /opt/librenms/LibreNMS/Modules/OS.php on line 80 at /opt/librenms/LibreNMS/Modules/OS.php:103)"}

In OS.php line 103:
                                                                               
  Argument 1 passed to LibreNMS\Modules\OS::updateLocation() must be an insta  
  nce of LibreNMS\OS, string given, called in /opt/librenms/LibreNMS/Modules/  
  OS.php on line 80                        

Here is the whole debug message:
LibreNMS Poller

SQL[select `migration` from `migrations` order by `id` desc limit 1 [] 0.19ms] 
  

SQL[select count(*) as aggregate from `migrations` limit 1 [] 0.1ms] 
  

SQL[SELECT version() [] 0.12ms] 
  

===================================
Version info:
Commit SHA: b9c2f750924597ab4fec2ee6b75cb77b138069d2
Commit Date: 1589616886
DB Schema: 2020_04_13_150500_add_last_error_fields_to_bgp_peers (164)
PHP: 7.4.6
MySQL: 10.1.44-MariaDB-0ubuntu0.18.04.1
RRDTool: 1.7.0
SNMP: NET-SNMP 5.7.3
==================================DEBUG!

Updating os_def.cache...  


Warning: file_put_contents(/opt/librenms/cache/os_defs.cache): failed to open stream: Permission denied in /opt/librenms/includes/common.php on line 1424

Done  

Starting polling run:


SQL[SELECT * FROM `devices` WHERE `disabled` = 0 AND `hostname` = '[IP Hidden]' ORDER BY `device_id` ASC [] 0.42ms] 
  

SQL[select * from `devices` where `device_id` = ? limit 1 [14] 0.24ms] 
  

Hostname:    [IP Hidden]
Device ID:   [Device id Hidden]
OS:          samsungprinter

SQL[select * from `devices_attribs` where `devices_attribs`.`device_id` = ? and `devices_attribs`.`device_id` is not null [14] 0.1ms] 
  

 (printer)


SQL[select `hostname`, `overwrite_ip` from `devices` where `hostname` = ? limit 1 ["[IP Hidden]"] 0.24ms] 
  

[FPING] '/usr/bin/fping' '-e' '-q' '-c' '3' '-p' '500' '-t' '500' '[IP Hidden]'  

array (
  'xmt' => 3,
  'rcv' => 3,
  'loss' => 0,
  'min' => 0.32,
  'max' => 0.52,
  'avg' => 0.44,
  'dup' => 0,
  'exitcode' => 0,
)  

SQL[INSERT IGNORE INTO `device_perf` (`xmt`,`rcv`,`loss`,`min`,`max`,`avg`,`device_id`,`timestamp`,`debug`)  VALUES (:xmt,:rcv,:loss,:min,:max,:avg,:device_id,NOW(),:debug) {"xmt":3,"rcv":3,"loss":0,"min":0.32,"max":0.52,"avg":0.44,"device_id":14,"debug":"[]"} 9.86ms] 
  

SQL[UPDATE `devices` set `last_ping`=?,`last_ping_timetaken`=? WHERE device_id=? ["2020-05-16 10:55:16",0.44,14] 7.13ms] 
  

SNMP Check response code: 0  

Modules status: Global+  

OS  

Device  


#### Load poller module core ####

SNMP['/usr/bin/snmpget' '-v2c' '-c' 'COMMUNITY' '-OQnUt' '-m' 'SNMPv2-MIB' '-M' '/opt/librenms/mibs' 'udp:HOSTNAME:161' 'sysUpTime.0' 'sysContact.0' 'sysName.0' 'sysObjectID.0' 'sysDescr.0']

.*.*.0 = 2815277287
.*.*.0 = [Email Hidden]
.*.*.0 = [Device name Hidden]
.*.*.0 = .*.*.5.1
.*.*.0 = Samsung Samsung M283x Series; V*     MAR-11-2016;Engine V1.00.12 08-11-2015;NIC 31.03.60_0.1_13-11-18;S/N [Removed Serial number]  
  

SNMP['/usr/bin/snmpget' '-v2c' '-c' 'COMMUNITY' '-OQnUst' '-m' 'HOST-RESOURCES-MIB:SNMP-FRAMEWORK-MIB' '-M' '/opt/librenms/mibs' 'udp:HOSTNAME:161' 'snmpEngineTime.0' 'hrSystemUptime.0']

snmpEngineTime.0 = 28152772
hrSystemUptime.0 = 240492200  
  

Uptime seconds: 28152773  

Uptime:  325 days 20 hours 12 minutes 53 seconds

>> Runtime for poller module 'core': 0.0118 seconds with 22168 bytes
>> SNMP: [2/0.01s] MySQL: [0/0.00s]
#### Unload poller module core ####


Modules status: Global-  

OS  

Device  

Module [ unix-agent ] disabled globally.


Modules status: Global+  

OS  

Device  


#### Load poller module os ####

Attempting to initialize OS: samsungprinter  
Attempting to initialize OS: printer  

OS initialized as Generic  

SNMP['/usr/bin/snmpget' '-v2c' '-c' 'COMMUNITY' '-OQv' '-M' '/opt/librenms/mibs' 'udp:HOSTNAME:161' '1.3.6.1.4.1.236.11.5.11.53.31.1.4.0']

"M283x Series"  
  

SNMP['/usr/bin/snmpget' '-v2c' '-c' 'COMMUNITY' '-OQv' '-M' '/opt/librenms/mibs' 'udp:HOSTNAME:161' '1.3.6.1.2.1.43.5.1.1.17.1']

"[Removed serial number]"  
  

Argument 1 passed to LibreNMS\Modules\OS::updateLocation() must be an instance of LibreNMS\OS, string given, called in /opt/librenms/LibreNMS/Modules/OS.php on line 80 {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Argument 1 passed to LibreNMS\\Modules\\OS::updateLocation() must be an instance of LibreNMS\\OS, string given, called in /opt/librenms/LibreNMS/Modules/OS.php on line 80 at /opt/librenms/LibreNMS/Modules/OS.php:103)"} 



In OS.php line 103:
                                                                               
  Argument 1 passed to LibreNMS\Modules\OS::updateLocation() must be an insta  
  nce of LibreNMS\OS, string given, called in /opt/librenms/LibreNMS/Modules/  
  OS.php on line 80                                                            

If you need to post any text longer than a few lines, please use a pastebin service such as https://p.libren.ms using non-expiring pastes.

Sorry I’ve never used pastebin before, so this post is a bit long.

Extra info. I’m pooling data from these operation systems without any issue:

pfSense
Synology DSM DSM 6.2-24922
Ubiquiti UniFi 4.3.13.11253
EdgeSwitch 1.9.1
Linux 5.4.0-29-generic
Linux 4.19.118-v7+
Linux 4.19.0-9-amd64
Linux 5.3.0-51-generic
Linux 5.6.10-300.fc32.x86_64
Linux 5.4.0-28-generic

I am on the latest git as of this post

git pull

returns “Already up to date”. I’ve also run ./daily.sh

The issue apparently resolved itself in the latest version. Currently on 1.64.1-3-gb6875b73c - Tue Jun 02 2020 23:51:03 GMT+0200