Daily.sh fails

I am using prebuilt Centos VMware image and i’m always having problems with the daily.sh script.

It always says this error… Your local changes to the following files would be overwritten by merge:

I’ve been getting around this by using the following:

git reset --hard
git fetch --all
./scripts/github-remove -d
git pull
./daily.sh

Is there something i am missing or broken shouldn’t this be automatically removing the old files and getting new files on it’s own?

Stop doing git pull and git

its probably breaking all your permissions run the following

chown -R librenms:librenms /opt/librenms

then run ./validate.php

then

./daily.sh

2 Likes

Thank you for this, i have made the changes and run the scripts.

I will keep an eye on it for the next week or two.

Same problem:

[root@librenms ~]# cd /opt/librenms/
[root@librenms librenms]# ./daily.sh
Re-running /opt/librenms/daily.sh as librenms user
Updating to latest codebase FAIL
error: unable to unlink old ‘includes/definitions/avaya-vsp.yaml’ (Permission de nied)
error: unable to unlink old ‘includes/definitions/ciena-sds.yaml’ (Permission de nied)
error: unable to create file tests/data/avaya-vsp_8404c.json (Permission denied)
error: unable to create file tests/snmpsim/avaya-vsp_8404c.snmprec (Permission d enied)
Updating Composer packages OK
Updating SQL-Schema OK
Updating submodules OK
Cleaning up DB OK
Fetching notifications OK
Caching PeeringDB data OK
[root@librenms librenms]# ./validate.php

Component Version
LibreNMS 1.37-87-ge13920c
DB Schema 247
PHP 7.0.27
MySQL 5.5.56-MariaDB
RRDTool 1.4.8
SNMP NET-SNMP 5.7.2

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

[OK] Composer Version: 1.6.3
[OK] Dependencies up-to-date.
[OK] Database connection successful
[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’;
[WARN] Some devices have not been polled in the last 5 minutes. You may have performance issues.
[FIX] Check your poll log and see: http://docs.librenms.org/Support/Performance/
Devices:
172.16.10.95
[WARN] Your local git contains modified files, this could prevent automatic updates.
[FIX] You can fix this with ./scripts/github-remove
Modified Files:
doc/Extensions/Applications.md
[root@librenms librenms]#

Your permissons are still wacked out.

chown -R librenms:librenms /opt/librenms

then validate
then daily again

still have the same problems…

[root@librenms librenms]# chown -R librenms:librenms /opt/librenms
[root@librenms librenms]# ./validate.php

Component Version
LibreNMS 1.37-87-ge13920c
DB Schema 247
PHP 7.0.27
MySQL 5.5.56-MariaDB
RRDTool 1.4.8
SNMP NET-SNMP 5.7.2

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

[OK] Composer Version: 1.6.3
[OK] Dependencies up-to-date.
[OK] Database connection successful
[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’;
[WARN] Some devices have not been polled in the last 5 minutes. You may have performance issues.
[FIX] Check your poll log and see: http://docs.librenms.org/Support/Performance/
Devices:
172.27.27.30
[WARN] Your local git contains modified files, this could prevent automatic updates.
[FIX] You can fix this with ./scripts/github-remove
Modified Files:
doc/Extensions/Applications.md
[root@librenms librenms]# ./daily.sh
Re-running /opt/librenms/daily.sh as librenms user
Updating to latest codebase FAIL
error: Your local changes to the following files would be overwritten by merge:
doc/Extensions/Applications.md
Please, commit your changes or stash them before you can merge.
error: The following untracked working tree files would be overwritten by merge:
ciena-sds_8700.snmprec
Please move or remove them before you can merge.
Aborting
Updating Composer packages OK
Updating SQL-Schema OK
Updating submodules OK
Cleaning up DB OK
Fetching notifications OK
Caching PeeringDB data OK
[root@librenms librenms]#

Last two lines - you have modified files - so the update can’t work.

Lines above - your SQL database has issues - it tells you how to resolve that.

1 Like

Hi ManOfLard,

Thanks for the help, but my problem is I’m not making changes to the SQL database, I am also not modifying files. I can’t figure out why this keeps happening.

I downloaded a clean version of the vmware image from the librenms site, all I’ve done is added a bunch of devices to monitor, but every few days ./daily.sh fails and i have to do these fixes all over again and I don’t understand whats causing this.

I have fixed the database error and removed the modified files.

When i run a ./daily.sh and ./validate.php everything is ok. I will not make any chances for the next few days and keep watching it…

[root@librenms librenms]# ./daily.sh
Re-running /opt/librenms/daily.sh as librenms user
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
[root@librenms librenms]# ./validate.php

Component Version
LibreNMS 1.37-99-g7ed7885
DB Schema 247
PHP 7.0.27
MySQL 5.5.56-MariaDB
RRDTool 1.4.8
SNMP NET-SNMP 5.7.2

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

[OK] Composer Version: 1.6.3
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct
[root@librenms librenms]#

I’m having the same problem, but in my case I haven’t changed anything, and in the last few days I started receiving an email:

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

error: Your local changes to the following files would be overwritten by

merge:

bootstrap/cache/.gitignore

logs/.gitignore

storage/app/.gitignore

storage/app/public/.gitignore

storage/debugbar/.gitignore

storage/framework/cache/.gitignore

storage/framework/sessions/.gitignore

storage/framework/testing/.gitignore

storage/framework/views/.gitignore

storage/logs/.gitignore

Please commit your changes or stash them before you merge.

Aborting
librenms

Yes this happened after a bad merge.

just run

./scripts/github-remove -d

1 Like

Thank you Kevin!

1 Like

Dear,

I have the same problem because add some test-documents with different name, after run ./scripts/github-remove -d , i can update with ./daily.sh without errors.

thankssss!!

1 Like