Validate Config showing "Failure" on "Updates" FAIL: DateTime::__construct(): Failed to parse time string (@) at position 0 (@): Unexpected character

Does anyone know what it is that I need to do to resolve the issue that I have below? The steps that I’ve taken to correct it have not done a thing to fix it

  • Updated git
  • Ran ./daily.sh
  • Ran ./validate.php
  • Checked permissions on all files and made sure they’re all set to librenms:librenms as the user and group

Updates error:
Here are some screen shots of the issues being presented in my GUI

Python error:
I have followed the suggested fix for this based upon the output and all of my files are configured as stated yet I still have the python error…

Was coming here to ask the same thing. When I run “Validate Config” from the web interface I get the same errors you are getting. However, if I ssh into the server and run ./validate.php and ./daily.sh I get no errors:

./validate.php:

====================================
Component | Version
--------- | -------
LibreNMS  | 22.5.0-21-gacfd09287
DB Schema | 2022_05_25_090027_drop_widgets_table (241)
PHP       | 7.4.22
Python    | 3.6.9
MySQL     | 10.5.16-MariaDB-1:10.5.16+maria~bionic
RRDTool   | 1.7.0
SNMP      | 5.7.3
====================================

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

And ./daily.sh

Updating to latest codebase                        OK
Updating Composer packages                         OK
Updating SQL-Schema                                OK
Updating submodules                                OK
Cleaning up DB                                     OK
Fetching notifications                             OK
Caching PeeringDB data                             OK
Caching Mac OUI data                               OK

Tony,

Same same for myself, however today when I check the web interface I’m getting the message below, yet the NMS is still up and running. Let me know if you have the same issue with your install. We run our instance on a bare metal server with a lot of compute and memory opposed to others who may run theirs on a VM and/or as a docker container.

image

./validate.php

====================================
Component | Version
--------- | -------
LibreNMS  | 22.5.0-30-g30da27256
DB Schema | 2022_05_25_090027_drop_widgets_table (241)
PHP       | 7.4.28
Python    | 3.8.10
MySQL     | 10.5.15-MariaDB-1:10.5.15+maria~bionic
RRDTool   | 1.7.2
SNMP      | 5.8
====================================

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

/daily.sh

Updating to latest codebase                        OK
Updating Composer packages                         OK
Updating SQL-Schema                                OK
Updating submodules                                OK
Cleaning up DB                                     OK
Fetching notifications                             OK
Caching PeeringDB data                             OK
Caching Mac OUI data                               OK

Fix an issue when getting the local version from git by murrant · Pull Request #14020 · librenms/librenms · GitHub Fixes the reported issue. It is a new security feature of git.

Are you saying this should now be fixed, or that a fix is in the works? I ask because I’ve run ./daily.sh and still have the error.

I have been using Libre for five months, it is very good
before 2 - 3 days ago,all validate status is ok
after last weekend,it shows this error
today,I’ve run ./daily.sh and still have the error too…

Yes, should be fixed.

Please show any info you can if you still have the issue. (It may be a separate issue)

From command line:

./daily.sh result:

Updating to latest codebase                        OK
Updating Composer packages                         OK
Updated from 898061403 to 1d35d9391                OK
Updating SQL-Schema                                OK
Updating submodules                                OK
Cleaning up DB                                     OK
Fetching notifications                             OK
Caching PeeringDB data                             OK
Caching Mac OUI data                               OK

./validate.php result:

====================================
Component | Version
--------- | -------
LibreNMS  | 22.5.0-50-g1d35d9391
DB Schema | 2022_05_30_084932_update-app-status-length (242)
PHP       | 7.4.22
Python    | 3.6.9
MySQL     | 10.5.16-MariaDB-1:10.5.16+maria~bionic
RRDTool   | 1.7.0
SNMP      | 5.7.3
====================================

[OK]    Composer Version: 2.3.7
[OK]    Dependencies up-to-date.
[OK]    Database connection successful
[OK]    Database Schema is current
[OK]    SQL Server meets minimum requirements
[OK]    lower_case_table_names is enabled
[OK]    MySQL engine is optimal
[OK]
[OK]    Database schema correct
[OK]    MySQl and PHP time match
[OK]    rrd_dir is writable
[OK]    rrdtool version ok

What I see when selecting Validate Config from web interface:

Can you try this PR?

./scripts/github-apply 14042

Aha!

FAIL: Failed to fetch version from local git: fatal: unsafe repository (’/opt/librenms’ is owned by someone else) To add an exception for this directory, call: git config --global --add safe.directory /opt/librenms

Edit… However… still getting the error after:

git config --global --add safe.directory /opt/librenms

then

sudo chown -R librenms:librenms ‘/opt/librenms’
sudo setfacl -d -m g::rwx /opt/librenms/bootstrap/cache /opt/librenms/storage /opt/librenms/logs /opt/librenms/rrd
sudo chmod -R ug=rwX /opt/librenms/bootstrap/cache /opt/librenms/storage /opt/librenms/logs /opt/librenms/rrd

Centos 7
today after I run ./daily.sh
it shows:

-bash-4.2$ ./validate.php

Component Version
LibreNMS 22.5.0-51-gc1a59e2
DB Schema 2022_05_30_084932_update-app-status-length (242)
PHP 7.3.33
Python 3.6.8
MySQL 10.5.15-MariaDB
RRDTool 1.7.2
SNMP 5.7.2

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

[OK] Composer Version: 2.3.7
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database Schema is current
[OK] SQL Server meets minimum requirements
[OK] lower_case_table_names is enabled
[OK] MySQL engine is optimal
[OK]
[OK] Database schema correct
[OK] MySQl and PHP time match
[OK] rrd_dir is writable
[OK] rrdtool version ok
[FAIL] Failed to fetch version from local git: fatal: unrecognized argument: -q

Because it needs to be ran as your web server user.

(Note that the install docs instruct you to run php-fpm as the librenms user, which avoids this error)

I’m running this on Ubuntu 18.04 and so did not set up based on current install docs. No php-fpm.

I’m still having the same issue in the GUI when I go to “Validate Config” and it showing the image which you see below. I have noticed this time it no longer states “Failed to load data from backend, check webserver” It now says “Failed to load data from backend, check console for error.”

image

I have php7.4-fpm installed and the status of it running is what I have listed below, any ideas as to what I’m missing to get my configuration to get right with the world?

librenms@librenms:~$ systemctl status php7.4-fpm.service
● php7.4-fpm.service - The PHP 7.4 FastCGI Process Manager
     Loaded: loaded (/lib/systemd/system/php7.4-fpm.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2022-06-20 01:13:21 EDT; 1 day 16h ago
       Docs: man:php-fpm7.4(8)
   Main PID: 1602 (php-fpm7.4)
     Status: "Processes active: 0, idle: 4, Requests: 0, slow: 0, Traffic: 0req/sec"
      Tasks: 5 (limit: 101367)
     Memory: 19.0M
     CGroup: /system.slice/php7.4-fpm.service
             ├─1602 php-fpm: master process (/etc/php/7.4/fpm/php-fpm.conf)
             ├─1698 php-fpm: pool librenms
             ├─1699 php-fpm: pool librenms
             ├─1700 php-fpm: pool www
             └─1701 php-fpm: pool www

lnms update

librenms@librenms:~$ lnms update
Updating to latest codebase                        OK
Updating Composer packages                         OK
Updating SQL-Schema                                OK
Updating submodules                                OK
Cleaning up DB                                     OK
Fetching notifications                             OK
Caching PeeringDB data                             OK
Caching Mac OUI data                               OK

./validate.php

librenms@librenms:~$ ./validate.php
====================================
Component | Version
--------- | -------
LibreNMS  | 22.6.0-4-gdc3ddbaff
DB Schema | 2022_05_30_084932_update-app-status-length (242)
PHP       | 7.4.30
Python    | 3.8.10
MySQL     | 10.5.15-MariaDB-1:10.5.15+maria~bionic
RRDTool   | 1.7.2
SNMP      | 5.8
====================================

[OK]    Composer Version: 2.3.7
[OK]    Dependencies up-to-date.
[OK]    Database connection successful
[OK]    Database Schema is current
[OK]    SQL Server meets minimum requirements
[OK]    lower_case_table_names is enabled
[OK]    MySQL engine is optimal
[OK]
[OK]    Database schema correct
[OK]    MySQl and PHP time match
[OK]    rrdtool version ok
[OK]    Connected to rrdcached

I’m seeing the same issue as @Ray_Yu where the version of git on CentOS 7 doesn’t have the -q option for ‘git show’. I see that invocation in LibreNMS/Validations/Updates.php at line 69.

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