Problem with daily update

Hi I have big problem with daily update.

After first attempt update failed:

Updating to latest codebase FAIL
error: Your local changes to the following files would be overwritten by merge:
doc/Extensions/Syslog.md
html/includes/print-map.inc.php
html/includes/print-menubar.php
html/pages/addhost.inc.php
html/pages/device.inc.php
html/pages/device/edit/device.inc.php
html/pages/health.inc.php
includes/defaults.inc.php
includes/discovery/mempools/ironware-dyn.inc.php
includes/discovery/sensors/load/hpe-ipdu.inc.php
includes/functions.php
includes/polling/mempools/ironware-dyn.inc.php
includes/process_config.inc.php
includes/snmp.inc.php
misc/db_schema.yaml
scripts/github-apply
snmp-scan.py
sql-schema/211.sql
tests/ConfigTest.php
Please, commit your changes or stash them before you can merge.
error: The following untracked working tree files would be overwritten by merge:
includes/caches/toner.inc.php
includes/discovery/sensors/humidity/serverscheck.inc.php
includes/discovery/sensors/pre-cache/serverscheck.inc.php
sql-schema/214.sql
sql-schema/215.sql
Please move or remove them before you can merge.

After ./scripts/github-remove and second attempt. I get this:

Updating to latest codebase FAIL
error: unable to unlink old ‘LibreNMS/Config.php’ (Permission denied)
error: unable to unlink old ‘LibreNMS/Validations/Poller.php’ (Permission denied)
error: unable to unlink old ‘LibreNMS/Validator.php’ (Permission denied)
error: unable to create file includes/discovery/sensors/temperature/serverscheck.inc.php (Permission denied)

Then I repaired permission with chmod -R g+w and get again first error… can someone help out :smiley:

Updating to latest codebase FAIL
error: Your local changes to the following files would be overwritten by merge:
doc/Extensions/Syslog.md
html/includes/print-map.inc.php
html/includes/print-menubar.php
html/pages/addhost.inc.php
html/pages/device.inc.php
html/pages/device/edit/device.inc.php
html/pages/health.inc.php
includes/defaults.inc.php
includes/discovery/mempools/ironware-dyn.inc.php
includes/discovery/sensors/load/hpe-ipdu.inc.php
includes/functions.php
includes/polling/mempools/ironware-dyn.inc.php
includes/process_config.inc.php
includes/snmp.inc.php
misc/db_schema.yaml
scripts/github-apply
snmp-scan.py
sql-schema/211.sql
tests/ConfigTest.php
Please, commit your changes or stash them before you can merge.
error: The following untracked working tree files would be overwritten by merge:
includes/caches/toner.inc.php
includes/discovery/sensors/humidity/serverscheck.inc.php
includes/discovery/sensors/pre-cache/serverscheck.inc.php
sql-schema/214.sql
sql-schema/215.sql
Please move or remove them before you can merge.

First run a. validate.php and post output

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

Component Version
LibreNMS 1.33-9-g297e5ae
DB Schema 215
PHP 7.0.24
MySQL 5.5.56-MariaDB
RRDTool 1.4.8
SNMP NET-SNMP 5.7.2

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

[e[0;32mOKe[0m] Database connection successful
[e[1;31mFAILe[0m] MySQL column collation is wrong:
[e[1;34mFIXe[0m] e[1;34mCheck https://t.libren.ms/-zdwk for info on how to fix.e[0m
Columns:
users password utf8 utf8_general_ci
users realname utf8 utf8_general_ci
users email utf8 utf8_general_ci
users descr utf8 utf8_general_ci
[e[1;31mFAILe[0m] Database: missing column (perf_times/id)
[e[1;31mFAILe[0m] Database: missing index (perf_times/PRIMARY)
[e[1;31mFAILe[0m] 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):
[e[1;34mFIXe[0m] e[1;34mRun the following SQL statements to fix.e[0m
SQL Statements:
ALTER TABLE perf_times ADD id int(11) NOT NULL auto_increment;
ALTER TABLE perf_times ADD PRIMARY KEY (id);
[e[1;31mFAILe[0m] The poller (ubuntu-librenms) has not complete within the last 5 minutes, check the cron job
[e[1;33mWARNe[0m] Some devices have not been polled in the last 5 minutes. You may have performance issues.
[e[1;34mFIXe[0m] e[1;34mCheck your poll log and see: http://docs.librenms.org/Support/Performance/e[0m
Devices:
192.168.35.21
192.168.100.41
192.168.21.10
192.168.22.21
192.168.51.2
192.168.100.70
192.168.30.21
192.168.35.19
192.168.24.28
192.168.16.22
192.168.50.39
192.168.19.40
192.168.35.20
192.168.15.100
192.168.22.20
and 7 more…
[e[1;33mWARNe[0m] Your install is over 24 hours out of date, last update: Tue, 31 Oct 2017 13:31:29 +0000
[e[1;34mFIXe[0m] e[1;34mMake sure your daily.sh cron is running and run ./daily.sh by hand to see if there are any errors.e[0m
[e[1;33mWARNe[0m] Your local git contains modified files, this could prevent automatic updates.
[e[1;34mFIXe[0m] e[1;34mYou can fix this with ./scripts/github-removee[0m
Modified Files:
doc/Extensions/Syslog.md
html/includes/print-map.inc.php
html/includes/print-menubar.php
html/pages/addhost.inc.php
html/pages/device.inc.php
html/pages/device/edit/device.inc.php
html/pages/health.inc.php
includes/defaults.inc.php
includes/discovery/mempools/ironware-dyn.inc.php
includes/discovery/sensors/load/hpe-ipdu.inc.php
includes/discovery/sensors/power/ipoman.inc.php
includes/functions.php
includes/polling/mempools/ironware-dyn.inc.php
includes/process_config.inc.php
includes/snmp.inc.php
and 5 more…

You need to fix permissions and run github-remove. Did you put an option for github-remove? It doesn’t do anything if you don’t specify an option.

1 Like

Like I wrote in first post :slight_smile: this is never ending loop :smiley:

When I fix permissions and run github-remove then I end with he same result in validate as above… so everything start again… I did that twice already.

After github-remove I have

./daily.sh

Checking PHP version OK
Updating to latest codebase FAIL
error: unable to unlink old ‘LibreNMS/Config.php’ (Permission denied)
error: unable to unlink old ‘LibreNMS/Validations/Poller.php’ (Permission denied)
error: unable to unlink old ‘LibreNMS/Validator.php’ (Permission denied)
error: unable to unlink old ‘doc/Developing/os/Initial-Detection.md’ (Permission denied)
error: unable to unlink old ‘includes/definitions/asuswrt-merlin.yaml’ (Permission denied)
error: unable to unlink old ‘includes/definitions/ddnos.yaml’ (Permission denied)
error: unable to unlink old ‘includes/definitions/discovery/fxm.yaml’ (Permission denied)
error: unable to unlink old ‘includes/definitions/dsm.yaml’ (Permission denied)
error: unable to unlink old ‘includes/definitions/extrahop.yaml’ (Permission denied)
error: unable to unlink old ‘includes/definitions/freebsd.yaml’ (Permission denied)
error: unable to unlink old ‘includes/definitions/huaweiups.yaml’ (Permission denied)
error: unable to unlink old ‘includes/definitions/ibmtl.yaml’ (Permission denied)
error: unable to unlink old ‘includes/definitions/linux.yaml’ (Permission denied)
error: unable to unlink old ‘includes/definitions/pcoweb.yaml’ (Permission denied)
error: unable to unlink old ‘includes/definitions/pktj.yaml’ (Permission denied)
error: unable to unlink old ‘includes/definitions/qnap.yaml’ (Permission denied)
error: unable to unlink old ‘includes/definitions/remoteye4.yaml’ (Permission denied)
error: unable to unlink old ‘includes/definitions/sentry3.yaml’ (Permission denied)
error: unable to unlink old ‘includes/definitions/sentry4.yaml’ (Permission denied)
error: unable to unlink old ‘includes/definitions/tomato.yaml’ (Permission denied)
error: unable to create file includes/discovery/sensors/temperature/serverscheck.inc.php (Permission denied)
error: unable to unlink old ‘tests/mocks/mock.snmp.inc.php’ (Permission denied)
Updating SQL-Schema OK
Updating submodules OK
Cleaning up DB OK
Fetching notifications OK
Caching PeeringDB data OK

and after rearing chmod I back to first:

Updating to latest codebase FAIL
error: Your local changes to the following files would be overwritten by merge:
doc/Extensions/Syslog.md
html/includes/print-map.inc.php
html/includes/print-menubar.php
html/pages/addhost.inc.php
html/pages/device.inc.php
html/pages/device/edit/device.inc.php
html/pages/health.inc.php
includes/defaults.inc.php
includes/discovery/mempools/ironware-dyn.inc.php
includes/discovery/sensors/load/hpe-ipdu.inc.php
includes/functions.php
includes/polling/mempools/ironware-dyn.inc.php
includes/process_config.inc.php
includes/snmp.inc.php
misc/db_schema.yaml
scripts/github-apply
snmp-scan.py
sql-schema/211.sql
tests/ConfigTest.php
tests/YamlTest.php
Please, commit your changes or stash them before you can merge.
error: The following untracked working tree files would be overwritten by merge:
includes/caches/toner.inc.php
includes/discovery/os/ubnt.inc.php
includes/discovery/sensors/humidity/serverscheck.inc.php
includes/discovery/sensors/pre-cache/serverscheck.inc.php
sql-schema/214.sql
sql-schema/215.sql
Please move or remove them before you can merge.
Aborting
Updating SQL-Schema OK
Updating submodules OK
Cleaning up DB OK
Fetching notifications OK
Caching PeeringDB data OK

You should be running:
chown -R librenms:librenms /opt/librenms

And log in as the librenms user and run:
github-remove -d
./validate.php

If everything is ok in validate.php:
./daily.sh

Running some things as root will re-break the permissions.

1 Like

That did the job. Thx :wink:

Can I ask You one more thing ? I moved my LibreNMS server from Ubuntu to CentOS few weeks ago. Now I have “Fail: The poller (ubuntu-librenms) has not completed within the last 5 minutes, check the cron job.” This is my old local-host and this is probably thx to copy database and rrd forlder… Can I remove this somehow ?

You have to delete it from the pollers table in mysql.

1 Like

Thx a lot for your help

Thx again for everything :wink:

[[email protected] ~]$ ./daily.sh
Checking PHP version OK
Updating to latest codebase OK
Updating SQL-Schema OK
Updating submodules OK
Cleaning up DB OK
Fetching notifications OK
Caching PeeringDB data OK
[[email protected] ~]$ ./validate.php

Component Version
LibreNMS 1.33-27-g0d07f85
DB Schema 215
PHP 7.0.24
MySQL 5.5.56-MariaDB
RRDTool 1.4.8
SNMP NET-SNMP 5.7.2

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

[OK] Database connection successful
[OK] Database schema correct