Multiple errors, ./validate.php

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?

I have this problems too:

librenms@computer:~$ 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
librenms@computer:~$ 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
librenms@computer:~$ ls -l bootstrap/cache/.gitignore
-rwxrwxr-- 1 librenms librenms 14 Jun 14 10:32 bootstrap/cache/.gitignore
librenms@computer:~$ chmod 644 bootstrap/cache/.gitignore
librenms@computer:~$ 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
librenms@computer:~$ 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/
user@computer:~$ sudo chown -R librenms:librenms /opt/librenms
user@computer:~$ sudo setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
user@computer:~$ sudo chmod -R ug=rwX /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
user@computer:~$ sudo su - librenms
$ bash
librenms@computer:~$ 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…

Have you tried running that?

Thanks for reply! I will try it on monday.

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

1 Like

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

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:

librenms@nacho:~$ 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.

2 Likes

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

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

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

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.

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

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

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

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!

No, sorry.

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.

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.

Debian 9, nginx.

Also having this exact same issue. ./validate.php tells me this:
Fail: Some folders have incorrect file permissions, this may cause issues.

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/

I run the commands, rerun validate.php, everything’s happy, check a few minutes later and get the same exact error again.