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

Test alert transport fails with "general error" #15825

Open
iliessens opened this issue Feb 13, 2024 · 0 comments
Open

Test alert transport fails with "general error" #15825

iliessens opened this issue Feb 13, 2024 · 0 comments

Comments

@iliessens
Copy link
Contributor

The problem

When clicking the test checkmark on any of our alert transports, a message appears "Test to mail failed - general error".
However, the alert was received normally.

The browser debug console seems to indicate an error message or some debug info being prepended to the JSON response, causing the parsing JS to fail. (See below)
The shown query in the debug message itself seem to work fine in the CLI.

Output of ./validate.php

===========================================
Component | Version
--------- | -------
LibreNMS  | 24.1.0 (2024-01-07T16:49:52+01:00)
DB Schema | 2023_12_15_105529_access_points_nummonbssid_integer (276)
PHP       | 8.1.11
Python    | 3.10.12
Database  | MariaDB 10.6.16-MariaDB-0ubuntu0.22.04.1
RRDTool   | 1.7.2
SNMP      | 5.9.1
===========================================

[OK]    Composer Version: 2.7.1
[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]    Database and column collations are correct
[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

What was the last working version of LibreNMS?

No response

Anything in the logs that might be useful for us?

No relevant logs in the log folder.

However, the https://librenms/alert/transports/xx/test endpoints seem to return too many info or something:

This is the output that is returned (without the styling JS and CSS removed):

<pre class=sf-dump id=sf-dump-18218299 data-indent-pad="  ">
    "<span class=sf-dump-str title="372 characters">select * from `users` where exists (select * from `roles` inner join `assigned_roles` on `roles`.`id` = `assigned_roles`.`role_id` where `users`.`user_id` = `assigned_roles`.`entity_id` and `assigned_roles`.`entity_type` = &#039;App\\Models\\User &#039;and `name` in (&#039;admin &#039;, &#039;global-read &#039;) and (`assigned_roles`.`scope` is null) and (`roles`.`scope` is null)) and not `email` = &#039;&#039;</span>
    "<span style="color: #A0A0A0;">// vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:3919</span>
</pre>
<script>
    Sfdump("sf-dump-18218299")
</script>
{"status":"ok"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant