Question on updating my system and FAIL messages with validate.php

When I log in, I see quite a few packages that need updating, but how do I exactly do that? I run ‘./daily.sh’, however, I see the same 159 packages can be updated every time I log in.

login as: librenms
[email protected]’s password:
Welcome to Ubuntu 16.04.1 LTS (GNU/Linux 4.4.0-116-generic x86_64)

159 packages can be updated.

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

Here is my output from validate.php…

[FAIL] Database: incorrect column (notifications/datetime)
[FAIL] Database: incorrect column (users/created_at)
[FAIL] We have detected that your database schema may be wrong, please report the following to us on IRC or the community site (https://t.libren.ms/5gscd):
[FIX] Run the following SQL statements to fix.
SQL Statements:
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’;
[email protected]:~$ sudo ALTER TABLE notifications CHANGE datetime datetime timestamp NOT NULL DEFAULT ‘1970-01-02 00:00:00’;
notifications: command not found
datetime: command not found
datetime: command not found
[sudo] password for librenms:
sudo: ALTER: command not found
[email protected]:~$

How should I be running these fixes?

this part here has nothing to do with LibreNMS. That is your Linux os updates. (Ubuntu)

Looks like you missed some steps in the install docs?

Run those statements in your libreNMS database.

I did set the timezone in php.ini and from the Ubuntu CLI. Then restarted the appliance. Still getting this error.

this has nothing to do with php timezone. you need to run those statements in the database.

My install was the Ubuntu VM, so I believe everything I need is installed already.

When I go into the database, I run the commands and this is my output:

MariaDB [(none)]> ALTER TABLE notifications CHANGE datetime datetime timestamp NOT NULL DEFAULT ‘1970-01-02 00:00:00’;
ERROR 1046 (3D000): No database selected
MariaDB [(none)]> ALTER TABLE users CHANGE created_at created_at timestamp NOT NULL DEFAULT ‘1970-01-02 00:00:01’;
ERROR 1046 (3D000): No database selected

in the MySQL to select a database use the following command.

USE librenms;

1 Like

Just my 2 cents. I would just do manually install of librenms using the install docs. Especially if you are going to use this in production.