Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Services "Missing" #3501

Closed
arrmo opened this issue May 5, 2016 · 14 comments
Closed

Services "Missing" #3501

arrmo opened this issue May 5, 2016 · 14 comments

Comments

@arrmo
Copy link
Contributor

arrmo commented May 5, 2016

Hi,

Ever since I upgraded my Linux box to Ubuntu 16.04 LTS, I have noticed that the Top-devices widget is empty, and now I noticed that my services list is empty ... even though I can "see" them in my Availability-map widget.

Thoughts? Things to check?

Nope, my MySQL server is not set for strict ... ;). It was, but I changed this to correct other issues.

Thanks!

@murrant
Copy link
Member

murrant commented May 5, 2016

What are the results of ./validate.php in your librenms directory?

@arrmo
Copy link
Contributor Author

arrmo commented May 6, 2016

Nothing very exciting - below (and yes, I ran chown ... doesn't fix it. Seems to get messed up on daily updates).

Version info:
Commit SHA: 857f3d6
[WARN] Your local git contains modified files, this could prevent automatic updates.
Modified files:
html/.htaccess
includes/discovery/os/lenovoemc.inc.php
DB Schema: 114
PHP: 7.0.4-7ubuntu2
MySQL: 5.7.12-0ubuntu1
RRDTool: 1.5.5
SNMP: NET-SNMP version: 5.7.3

[FAIL] We have found some files that are owned by a different user than librenms, this will stop you updating automatically and / or rrd files being updated causing graphs to fail:
If you don't run a bespoke install then you can fix this by running chown -R librenms:librenms /opt/librenms
/opt/librenms/.git/index

[OK] Database connection successful

Thoughts?

Thanks!

@laf
Copy link
Member

laf commented May 6, 2016

Add /debug=true/ to the services page and paste the sql and php output onto pastebin or similar.

The only way permissions change is running anything as non-librenms user. Daily updates don't and can't update permissions. Check your cron to make sure that everything is running as the correct user.

@arrmo
Copy link
Contributor Author

arrmo commented May 6, 2016

You bet! Here you go,

  1. SQL, http://pastebin.ubuntu.com/16263233/
  2. PHP: http://pastebin.ubuntu.com/16263252/

And on the crontab, it's running as root (the default, no?).

Thanks!

@laf
Copy link
Member

laf commented May 7, 2016

What's the output of: SELECT * FROM devices AS D, services AS S WHERE D.device_id = S.device_id GROUP BY D.hostname ORDER BY D.hostname

@arrmo
Copy link
Contributor Author

arrmo commented May 7, 2016

It's an error message ... ;). Below,

ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'librenms.D.device_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

Thanks!

@laf
Copy link
Member

laf commented May 8, 2016

I'm unsure why we aren't picking up your sql_mode in validate.php but we highly recommend still disabling sql strict mode.

@arrmo
Copy link
Contributor Author

arrmo commented May 8, 2016

Hi,

Hmmm .. I did disable this, right after the upgrade. Or at least I think I did ... ;). Here is what I see - strict mode is off, no?

mysql> SELECT @@GLOBAL.sql_mode;
+-----------------------------------------------------------------------------------------------------------------------+
| @@GLOBAL.sql_mode |
+-----------------------------------------------------------------------------------------------------------------------+
| ONLY_FULL_GROUP_BY,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
+-----------------------------------------------------------------------------------------------------------------------+

Thanks!

@f0o
Copy link
Member

f0o commented May 8, 2016

Afaik sql_mode should be empty. I will check with our galera cluster in a bit.

On 8 May 2016 19:04:34 CEST, arrmo notifications@github.com wrote:

Hi,

Hmmm .. I did disable this, right after the upgrade. Or at least I
think I did ... ;). Here is what I see - strict mode is off, no?

mysql> SELECT @@GLOBAL.sql_mode;
+-----------------------------------------------------------------------------------------------------------------------+
| @@GLOBAL.sql_mode
|
+-----------------------------------------------------------------------------------------------------------------------+
|
ONLY_FULL_GROUP_BY,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
|
+-----------------------------------------------------------------------------------------------------------------------+

Thanks!


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#3501 (comment)

Sent from my Android device with K-9 Mail. Please excuse my brevity.

@f0o
Copy link
Member

f0o commented May 8, 2016

We only got: NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

On 8 May 2016 19:04:34 CEST, arrmo notifications@github.com wrote:

Hi,

Hmmm .. I did disable this, right after the upgrade. Or at least I
think I did ... ;). Here is what I see - strict mode is off, no?

mysql> SELECT @@GLOBAL.sql_mode;
+-----------------------------------------------------------------------------------------------------------------------+
| @@GLOBAL.sql_mode
|
+-----------------------------------------------------------------------------------------------------------------------+
|
ONLY_FULL_GROUP_BY,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
|
+-----------------------------------------------------------------------------------------------------------------------+

Thanks!


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#3501 (comment)

Sent from my Android device with K-9 Mail. Please excuse my brevity.

@laf
Copy link
Member

laf commented May 8, 2016

Yup, needs to be off completely.

@arrmo
Copy link
Contributor Author

arrmo commented May 8, 2016

That works - thanks guys! Seems the upgrade to Ubuntu 16.04 changed some of this (when MySQL was upgraded). I took out part of the strict mode, but I admit - I wasn't sure what all needed to be removed. It may be good to note this somewhere for folks.

Thanks again!

@laf
Copy link
Member

laf commented May 8, 2016

It's in our install docs :)

@laf laf closed this as completed May 8, 2016
@arrmo
Copy link
Contributor Author

arrmo commented May 8, 2016

Sorry! I did go through them, obviously missed it - my fault!

@lock lock bot locked as resolved and limited conversation to collaborators May 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants