I seem to have got in a bit of a situation here, with validate.php and daily.sh unable to complete

Hi all,

I was having some 404 errors whilst trying to edit an existing service, so I went to get my install up to date.
I performed a sudo apt-get update and sudo apt-get upgrade.
I went to run daily.sh and get the following:
[email protected]:/opt/librenms$ sudo ./daily.sh
./daily.sh: line 134: syntax error near unexpected token <<<' ./daily.sh: line 134: <<<<<<< HEAD’
validate.php give me output showing I have many database inconsistencies starting with:
[WARN] Your database schema has extra migrations (2020_04_06_001048_the_great_index_rename, 2020_05_24_212054_poller_cluster_settings, 2020_04_08_172357_alert_schedule_utc, 2020_05_22_020303_alter_metric_column, 2020_06_06_222222_create_device_outages_table, 2020_06_23_00522_alter_availability_perc_column). If you just switched to the stable release from the daily release, your database is in between releases and this will be resolved with the next release.
[FAIL] Database: missing index (access_points/deleted)
[FAIL] Database: extra index (access_points/access_points_deleted_index)

This continues with many more missing indexes and asks to run 273+ queries to resolve.

I’ve pasted the rest here:

I’m really poor with GIT knowledge so I’m unsure how to get out of this situation. I would appreciate any assistance to get me back up and running again. Currently the web gui is unavailable and the librenms.log is streaming this error (start of):
[2020-07-22 23:57:47] production.ERROR: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘start_recurring_dt’ in ‘where clause’
The rest of the log is here https://p.libren.ms/view/d311b9d8

Really hoping someone can help me out here.


You did run “sudo ./daily.sh” and that is the issue. daily.sh must be run as librenms user. You probably have broken rights now.

I would :

  • ensure that all files are owned by user librenms
  • run daily.sh again as user librenms
  • run validate as user librenms

Then if issues are still there, validate should let you know.

Thanks Pipo.
Even running the script as librenms didn’t have any effect. I had to move all the files reported as part of the git checkout:
[email protected]:~$ git checkout master
error: The following untracked working tree files would be overwritten by checkout:
list of many files.

Once I move the files I was able to run the checkout, update to master and all worked OK after that.
Thanks for your help and hopefully I don’t break it again any time soon.