Error in log: Error discovering services module

Are there any more updates to this?

1 Like

Doesn’t seem so. I’m quite confused that such a bug keeps present for months. I got a private message from a team member some days ago stating that they identified this as a bug, but I don’t know why that’s not been stated in this ticket. Also, I requested that this ticket is moved from help into bugreports where it belongs, but this has also not been done yet.

2 Likes

LibreNMS increased error reporting recently. So likely this “issue” has been there for MUCH longer without any ill effects. Just now it is visible.

Would be happy to see someone contribute a cleanup to avoid the error message.

2 Likes

Well, critical or non-critical bug, either way the first thing should be moving this ticket from help to bugreports to get enough attention from people that are able to identify and fix the bug. I would fix it by myself if I had appropriate skills and knowledge of the librenms code, but the only thing I can do is to try to convince someone to agree with me that this is actually a bug and not just an “issue”.

4 Likes

I have same error. :frowning:

1 Like

What are the effects of the bug? If the error message was not there would you know it exists?

I’m not saying it shouldn’t be fixed, just trying to get an idea of the impact.

1 Like

I don’t get what you’re trying to mean, @murrant. There are several posts in this ticket that contain the error message, like this one for example. This is also present in the “autodiscovery log” widget on the dashboard. And it’s not occationally, like the counts say:

librenms@host:~/logs$ zgrep -c 'Error discovering services module' librenms.log*
librenms.log:756
librenms.log.1:3019
librenms.log.2.gz:2993
librenms.log.3.gz:2976
librenms.log.4.gz:2994
librenms.log.5.gz:2997
librenms.log.6.gz:2990
librenms@host:~/logs$

oh, wait, I think I get what you ask… No, if the error message would not be there, I would not notice this problem. Which comes from the fact that I have no clue what this “services module” does, so I have no idea what to check. I don’t know if somethings missing within my librenms data as long as I don’t know what the services module is used for.

1 Like

Bump: Error still showing up in Web Portal, with latest updates:

[librenms@librenms ~]$ ./validate.php

Component Version
LibreNMS 22.3.0-3-g9c127bfd4
DB Schema 2022_02_03_164059_increase_auth_id_length (235)
PHP 7.3.20
Python 3.6.8
MySQL 10.6.7-MariaDB
RRDTool 1.7.0
SNMP 5.8

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

[OK] Composer Version: 2.2.9
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct
[librenms@librenms ~]$

1 Like

[librenms@librenms logs]$ zgrep -c ‘Error discovering services module’ librenms.log*
librenms.log:110
librenms.log-20220213.gz:560
librenms.log-20220222.gz:480
librenms.log-20220227.gz:373
librenms.log-20220306.gz:610
librenms.log-20220313.gz:620
librenms.log-20220320:616

1 Like

bump:
./validate.php

Component Version
LibreNMS 22.3.0-50-g9c126572a
DB Schema 2022_04_08_085504_isis_adjacencies_table_add_index (236)
PHP 7.3.20
Python 3.6.8
MySQL 10.6.7-MariaDB
RRDTool 1.7.0
SNMP 5.8

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

[OK] Composer Version: 2.3.5
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct
[librenms@librenms ~]$ cd logs/
[librenms@librenms logs]$ zgrep -c ‘Error discovering services module’ librenms.log*
librenms.log:240
librenms.log-20220313.gz:620
librenms.log-20220320.gz:616
librenms.log-20220327.gz:631
librenms.log-20220403.gz:647
librenms.log-20220410.gz:645
librenms.log-20220417:670
[librenms@librenms logs]$

1 Like

I too am having this error on all my polled devices.

2 Likes

Still having the problem:

[librenms@librenms logs]$ zgrep -c ‘Error discovering services module’ librenms.log*
librenms.log:297
librenms.log-20220417.gz:670
librenms.log-20220502.gz:505
librenms.log-20220508.gz:568
librenms.log-20220515.gz:709
librenms.log-20220522.gz:746
librenms.log-20220529:757

[librenms@librenms ~]$ ./validate.php

Component Version
LibreNMS 22.5.0-14-g32f1ce494
DB Schema 2022_05_25_090027_drop_widgets_table (241)
PHP 7.3.20
Python 3.6.8
MySQL 10.8.3-MariaDB
RRDTool 1.7.0
SNMP 5.8

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

[OK] Composer Version: 2.3.5
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct

1 Like

Hey, I upgraded yesterday to 22.5.0 and I have the same issue, it even gets in the event logs.

Here’s my validate.php output :

[librenms@lnms01~]$ ./validate.php

====================================
Component | Version
--------- | -------
LibreNMS  | 22.5.0
DB Schema | 2022_04_08_085504_isis_adjacencies_table_add_index (236)
PHP       | 7.3.20
Python    | 3.6.8
MySQL     | 10.3.28-MariaDB
RRDTool   | 1.7.0
SNMP      | 5.8
====================================

[OK]    Composer Version: 2.3.5
[OK]    Dependencies up-to-date.
[OK]    Database connection successful
[OK]    Database schema correct

Thanks.

3 Likes

Not solved, and the upgrade to php 8.1 killed my installation. Rather than troubleshoot that, I started from fresh with a new installation. I’m slowly getting my setup back in order.

1 Like

@Peter_Hess Did the error stop throwing once you reinstalled fresh?

1 Like

Yes. I later found out that upgrading php didn’t actually cause librenms to fail, It’s actually a weathermap issue.

Current validate:

[librenms@librenms ~]$ ./validate.php

Component Version
LibreNMS 22.8.0-1-g465fa3986
DB Schema 2022_07_19_081224_plugins_unique_index (244)
PHP 8.1.9
Python 3.6.8
Database MariaDB 10.8.4-MariaDB
RRDTool 1.7.0
SNMP 5.8

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

[OK] Composer Version: 2.4.0
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database Schema is current
[OK] SQL Server meets minimum requirements
[OK] lower_case_table_names is enabled
[OK] MySQL engine is optimal
[OK]
[OK] Database schema correct
[OK] MySQl and PHP time match
[OK] Active pollers found
[OK] Dispatcher Service not detected
[OK] Locks are functional
[OK] Python poller wrapper is polling
[OK] Redis is unavailable
[OK] rrd_dir is writable
[OK] rrdtool version ok

1 Like

I can NOT confirm that the errors are gone with upgrading PHP:

Next Illuminate\Database\QueryException: SQLSTATE[HY093]: Invalid parameter number (SQL: select * from `devices` where `devices`.`device_id` not in (select `device_id` from `service_templates_device` where `service_template_id` = 1) and `devices`.`device_id` not in (select `device_id` from `device_group_device` where `device_group_id` = ?)) in /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php:712
Stack trace:
#0 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php(672): Illuminate\Database\Connection->runQueryCallback()
#1 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php(376): Illuminate\Database\Connection->run()
#2 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2414): Illuminate\Database\Connection->select()
#3 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2402): Illuminate\Database\Query\Builder->runSelect()
#4 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2936): Illuminate\Database\Query\Builder->Illuminate\Database\Query\{closure}()
#5 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2403): Illuminate\Database\Query\Builder->onceWithColumns()
#6 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(625): Illuminate\Database\Query\Builder->get()
#7 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(609): Illuminate\Database\Eloquent\Builder->getModels()
#8 /opt/librenms/app/Http/Controllers/ServiceTemplateController.php(324): Illuminate\Database\Eloquent\Builder->get()
#9 /opt/librenms/app/Http/Controllers/ServiceTemplateController.php(305): App\Http\Controllers\ServiceTemplateController->apply()
#10 /opt/librenms/includes/discovery/services.inc.php(7): App\Http\Controllers\ServiceTemplateController->applyAll()
#11 /opt/librenms/includes/discovery/functions.inc.php(153): include('...')
#12 /opt/librenms/discovery.php(118): discover_device()
#13 {main}

Still the same error. And still wondering why no one seems to be able to fix this.

1 Like

Side note: After removing everything within “Services Templates” (/services/templates) the mentioned error disappears. If I add a service template again, the error reoccurs reproducable.

I would say the services templates feature is unusable at the moment.

2 Likes

Headsup to prevent This topic will close 3 months after the last reply.

1 Like

I will try this myself to see if it happens to me as well. Thank you for suggesting this!

1 Like