Local install not on Master + Database Schema issues

Hi,

My install of LibreNMS seems to be have issues with updating - this was first noticed a few weeks back when we had some issues with AD Authentication. However it appears to have fixed itself at the time by pulling later/reverting changes. Since these issues were resolved we have not had any further problems other than a daily email containing the following:

We just attempted to update your install but failed. The information below
should help you fix this.

fatal: unable to access ‘https://github.com/librenms/librenms.git/’: TCP
connection reset by peer

However this is accessible from the host where LibreNMS is installed. When investigating this, I have noticed the following issues on the output of validate.php:

validate.php output:

bash-4.2$ ./validate.php

Component Version
LibreNMS 1.31.03
DB Schema 207
PHP 7.0.22
MySQL 5.5.47-MariaDB
RRDTool 1.7.0
SNMP NET-SNMP 5.7.2

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

[OK] Database connection successful
[FAIL] Database: incorrect column (graph_types/graph_subtype)
[FAIL] Database: incorrect column (state_translations/state_value)
[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):
ALTER TABLE graph_types CHANGE graph_subtype graph_subtype varchar(64) NOT NULL;
ALTER TABLE state_translations CHANGE state_value state_value smallint(5) unsigned NOT NULL DEFAULT ‘NULL’;
[WARN] Your local git branch is not master, this will prevent automatic updates.

Are there steps to fix this issue? I have attempted the following from other similar topics:

cd /opt/librenms
git pull
php includes/sql-schema/update.php

However this does not resolve the issue - there doesn’t appear to be any problems with the functionality of LibreNMS on the frontend, though we would like to make sure we are always up to date

Thanks,

Rob

It is fine not to be on master if you are following stable releases (this warning will be disable in the next stable release).

You can run those two ALTER TABLE statements in mysql and that should fix that.

Thanks for the quick reply - that’s good to hear that this isn’t an issue

After running the two Alter Table commands I now got the following validate output - the first alter table command doesn’t appear to take affect

bash-4.2$ ./validate.php

Component Version
LibreNMS 1.31.03
DB Schema 207
PHP 7.0.22
MySQL 5.5.47-MariaDB
RRDTool 1.7.0
SNMP NET-SNMP 5.7.2
====================================

[OK] Database connection successful
[FAIL] Database: incorrect column (graph_types/graph_subtype)
[FAIL] We have detected that your database schema may be wrong, please report the following to us on IRC or the community site (Report database schema issues here - LibreNMS Community):
ALTER TABLE graph_types CHANGE graph_subtype graph_subtype varchar(64) NOT NULL;
[WARN] Your local git branch is not master, this will prevent automatic updates.
[FAIL] Discovery has not completed in the last 24 hours, check the cron job

Is this an issue?

Thanks again,

Rob

There is a bug with that one, I think it is fixed in the next version. You can safely ignore it until then.

Thanks murrant - we’ll keep an eye on it until the next release
The daily.sh failure alert seems to have cleared in the GUI now, so hopefully that has solved it

Thanks again for your help

Rob