Multiple errors, ./validate.php


#1

I run ./validate.php and get these errors…
sudo chown -R librenms:librenms /mnt/librenms
sudo setfacl -d -m g::rwx /mnt/librenms/rrd /mnt/librenms/logs /mnt/librenms/bootstrap/cache/ /mnt/librenms/storage/
sudo chmod -R ug=rwX /mnt/librenms/rrd /mnt/librenms/logs /mnt/librenms/bootstrap/cache/ /mnt/librenms/storage/

Run it again after and they’re gone, wait 5 minutes after that and run it again and they’re back… any ideas on what’s going on here?


./validate.php & ./daily.sh errors that cant' be cleared
#2

What user are you running your cron jobs as? Paste your cron jobs if you are not sure.

Also, I’m assuming you ran the commands?


#3
I have this problems too:

[email protected]:~$ php validate.php
====================================
Component | Version
--------- | -------
LibreNMS  | 1.43-110-gd9b4fb580
DB Schema | 268
PHP       | 7.2.7-0ubuntu0.18.04.2
MySQL     | 10.1.34-MariaDB-0ubuntu0.18.04.1
RRDTool   | 1.7.0
SNMP      | NET-SNMP 5.7.3
====================================

[OK]    Composer Version: 1.7.2
[OK]    Dependencies up-to-date.
[OK]    Database connection successful
[OK]    Database schema correct
[WARN]  Your local git contains modified files, this could prevent automatic updates.
        [FIX] You can fix this with ./scripts/github-remove
        Modified Files:
         bootstrap/cache/.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
[email protected]:~$ git diff
diff --git a/bootstrap/cache/.gitignore b/bootstrap/cache/.gitignore
old mode 100644
new mode 100755
diff --git a/storage/app/.gitignore b/storage/app/.gitignore
old mode 100644
new mode 100755
diff --git a/storage/app/public/.gitignore b/storage/app/public/.gitignore
old mode 100644
new mode 100755
diff --git a/storage/debugbar/.gitignore b/storage/debugbar/.gitignore
old mode 100644
new mode 100755
diff --git a/storage/framework/cache/.gitignore b/storage/framework/cache/.gitignore
old mode 100644
new mode 100755
diff --git a/storage/framework/sessions/.gitignore b/storage/framework/sessions/.gitignore
old mode 100644
new mode 100755
diff --git a/storage/framework/testing/.gitignore b/storage/framework/testing/.gitignore
old mode 100644
new mode 100755
diff --git a/storage/framework/views/.gitignore b/storage/framework/views/.gitignore
old mode 100644
new mode 100755
diff --git a/storage/logs/.gitignore b/storage/logs/.gitignore
old mode 100644
new mode 100755
[email protected]:~$ ls -l bootstrap/cache/.gitignore
-rwxrwxr-- 1 librenms librenms 14 Jun 14 10:32 bootstrap/cache/.gitignore
[email protected]:~$ chmod 644 bootstrap/cache/.gitignore
[email protected]:~$ chmod 644 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
[email protected]:~$ php validate.php
====================================
Component | Version
--------- | -------
LibreNMS  | 1.43-110-gd9b4fb580
DB Schema | 268
PHP       | 7.2.7-0ubuntu0.18.04.2
MySQL     | 10.1.34-MariaDB-0ubuntu0.18.04.1
RRDTool   | 1.7.0
SNMP      | NET-SNMP 5.7.3
====================================

[OK]    Composer Version: 1.7.2
[OK]    Dependencies up-to-date.
[OK]    Database connection successful
[OK]    Database schema correct
[FAIL]  Some folders have incorrect file permissions
        [FIX] sudo chown -R librenms:librenms /opt/librenms
sudo setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
sudo chmod -R ug=rwX /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
[email protected]:~$ sudo chown -R librenms:librenms /opt/librenms
[email protected]:~$ sudo setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
[email protected]:~$ sudo chmod -R ug=rwX /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
[email protected]:~$ sudo su - librenms
$ bash
[email protected]:~$ php validate.php
====================================
Component | Version
--------- | -------
LibreNMS  | 1.43-110-gd9b4fb580
DB Schema | 268
PHP       | 7.2.7-0ubuntu0.18.04.2
MySQL     | 10.1.34-MariaDB-0ubuntu0.18.04.1
RRDTool   | 1.7.0
SNMP      | NET-SNMP 5.7.3
====================================

[OK]    Composer Version: 1.7.2
[OK]    Dependencies up-to-date.
[OK]    Database connection successful
[OK]    Database schema correct
[WARN]  Your local git contains modified files, this could prevent automatic updates.
        [FIX] You can fix this with ./scripts/github-remove
        Modified Files:
         bootstrap/cache/.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

And it loops…


#4

Have you tried running that?


#5

Thanks for reply! I will try it on monday.


#6

It seems like you deleted the storage folder for some reason. Try git checkout storage


#7

Daniel,

Thanks for your response to my question, yes I ran the commands however they reappear after about five or so minutes… truthfully I don’t know how long it is, they just reappear. I can run the commands again and then in a few min I’ll have the same issues arise… this didn’t happen before just as of recently as we’ve been running our LibreNMS installation since early February and are very pleased with it. As the sole maintainer and only person on my team who is a Linux junkie, maintaining our servers and the services which are running on them all falls on my plate… Below is what I have in my /etc/cron.d/librenms cron job, please let me know if I’ve missed something or if it is configured incorrectly.

Regards,
Scott Nerone


#8

Firstly, Murrant trumps Daniel - if he says to do something, do it. Secondly, recurring permissions issues are kicking my hind end as well. Look around and see what is changed - mine, for instance, is:

[email protected]:~$ ls -l /opt/librenms/bootstrap/cache/
total 12
-rw-rw-r-- 1 www-data www-data 12067 Sep 24 00:16 services.php

And, if the people literally at my desk right now ever leave, I might get around to investigating why that is happening.


#9

For mine, I have this… are you speaking to me on this message or to someone else? I didn’t seem to have issues before the 9/18 update… anyways I’m following you guys lead on this for what it is that I need to do.

-rw-rw-r-- 1 librenms librenms 12067 Sep 24 00:16 services.php

-SNerone


#10

Murrant > Daniel. Try “git checkout storage” and I’ll try to help out where I can.


#11

I am also seeing something similar.

My rrd, logs, and storage directories live outside of the default librenms dir. I don’t think that poses the issue, but I’ve run all the suggested commands above and it seems to still be an issue.

Thank you,
J


#12

I’m not so sure. As I am not familiar with the validation code, I’m afraid I can’t help further. My advice would be to setup your Librenms the way everybody else does it.


#13

Yeah, I don’t see how that should be factoring into this error. Especially since it just recently started and I’ve had this setup for well over a year.

I’ve seen some other posts about similar errors. Seems like something is going on but its not breaking anything specifically, aside from the validation failing.

-J


#14

Have you run the permission commands it recommends on your storage directories outside the default librenms dir?


#15

#16

Did you ever fix your installation? Every time I run the commands which are presented to correct my issues they reappear. I can run the commands, then rerun ./validate.php and they’re cleared… then run ./validate.php again within about five or so minutes and the statement to correct the issues is back. This is very frustrating as I didn’t have this issue at all before the update on 9/18/2018


#17

Any luck on your installation and getting the issue resolved? We’ve still been up and running on our platform however this issue is still persistent and driving me crazy!


#18

No, sorry.


#19

Actually quite befuddled. Touch a file in the rrd directory, and it has w on the group. Touch a file from cron, and it has w on the group. Don’t know how on earth files get created in my rrd with-OUT w on the group.


#20

Hi, i am rebuilding a Ubuntu 18.04 / LibreNMS Nginx ( running Container under Proxmox )

I have the same issue, did the install again from scratch. did not help. probably also that is the reason i can add a device, but it will never show up in LibreNMS.