Poller broken after yesterdays update 21.9.0-27-gbfa200f3f

After yesterdays update (21.9.0-27-gbfa200f3f) - no new graphs since update or daily.sh run.

  • Steps to reproduce an issue.
    Can’t say for sure. Update?
    • The output of ./validate.php
      sudo -u librenms ./validate.php
      ====================================
      Component | Version
      --------- | -------
      LibreNMS | 21.9.0-27-gbfa200f3f
      DB Schema | 2021_08_26_093522_config_value_to_medium_text (217)
      PHP | 7.3.20
      Python | 3.6.8
      MySQL | 10.3.28-MariaDB
      RRDTool | 1.7.0
      SNMP | NET-SNMP 5.8
      ====================================

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

sudo -u librenms /opt/librenms/cronic /opt/librenms/poller-wrapper.py 16
Cronic detected failure or error output for the command:
/opt/librenms/poller-wrapper.py 16

RESULT CODE: 1

ERROR OUTPUT:
Traceback (most recent call last):
File “/opt/librenms/LibreNMS/init.py”, line 154, in get_config_data
import dotenv
ModuleNotFoundError: No module named ‘dotenv’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/opt/librenms/poller-wrapper.py”, line 38, in
config = LibreNMS.get_config_data(os.path.dirname(os.path.realpath(file)))
File “/opt/librenms/LibreNMS/init.py”, line 166, in get_config_data
% (env_path, exc)
UnboundLocalError: local variable ‘env_path’ referenced before assignment

STANDARD OUTPUT:

UPD. To fix it on Centos 8 - pip3 install python-dotenv
Librenms now requires dotenv?

Confirmed. Worked for me also. Thanks!

It doesn’t work for me, but my error is slightly different:

sudo -u librenms /opt/librenms/cronic /opt/librenms/poller-wrapper.py 16

Cronic detected failure or error output for the command:
/opt/librenms/poller-wrapper.py 16

RESULT CODE: 1

ERROR OUTPUT:
ERROR: Could not execute command [[’/usr/bin/env’, ‘php’, ‘/opt/librenms/config_to_json.php’]]: Expecting value: line 1 column 1 (char 0)
Could not run poller wrapper. Missing config

STANDARD OUTPUT:

I love how those of us in the eastern hemisphere seem to be beta testing the daily changes. Can confirm installing the “python-dotenv” rpm (on rhel7 in our case) fixed the issue.
You’re welcome, america.

on debian 10
python3-dotenv is already the newest version (0.9.1-1).
same problem
Cronic detected failure or error output for the command:
/opt/librenms/poller-wrapper.py 16

RESULT CODE: 1

ERROR OUTPUT:
ERROR: Could not execute command [[’/usr/bin/env’, ‘php’, ‘/opt/librenms/config_to_json.php’]]: Expecting value: line 1 column 1 (char 0)
Could not run poller wrapper. Missing config

STANDARD OUTPUT:

You (and person above) have different issue : Could not run poller wrapper. Missing config
Check if poller config is in place maybe?

is in place
there is a config
when i execute it by hand i got proper output
just python script itself is not able to execute it
ERROR: Could not execute command [[’/usr/bin/env’, ‘php’, ‘/opt/librenms/config_to_json.php’]]: Expecting value: line 1 column 1 (char 0)

No, there was an error in the code, so it crashed when handling python-dotenv missing. So installing python-dotenv avoids the error.

The error has now been fixed.

To piggyback on this issue, I’m encountering the same issue which looks like it began after the daily ran on Tuesday. I’m on Ubuntu 20.04.3 LTS. I received errors in my validate.php and ran the suggested commands:

SET TIME_ZONE=’+00:00’;
ALTER TABLE notifications CHANGE datetime datetime timestamp NOT NULL DEFAULT ‘1970-01-02 00:00:00’ ;
ALTER TABLE users CHANGE created_at created_at timestamp NOT NULL DEFAULT ‘1970-01-02 00:00:01’ ;

My validate.php comes back clean now, but it’s still not working, I do notice there’s a lot of errors that start with “Cannot adopt OID in” when running validate.php.

same here on debian 10

Same issue on Ubuntu 20.04.3 LTS
python3-dotenv is installed, and I’ve also run pip3 install -U -r requirements.txt, but still no graphs.
No errors from daily.sh or validate.php

$ ./validate.php
====================================
Component | Version
--------- | -------
LibreNMS  | 21.9.0-72-g0d9cd8635
DB Schema | 2021_09_07_094310_create_push_subscriptions_table (221)
PHP       | 7.4.3
Python    | 3.8.10
MySQL     | 10.3.31-MariaDB-0ubuntu0.20.04.1
RRDTool   | 1.7.2
SNMP      | NET-SNMP 5.8

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.