HTTP error code 0 in telegram

Telegram transport stopped working

[root@pdic_main_server librenms]# ./scripts/test-alert.php
SQL[SELECT device_id FROM devices WHERE hostname = ? [“”] 0.59ms]

SQL[SELECT, alerts.device_id, alerts.rule_id, alerts.state, alerts.note, FROM alerts WHERE alerts.device_id = 29 && ale
rts.rule_id = 35 [] 0.53ms]

rules.severity,alert_rules.extra,,alert_rules.query,alert_rules.builder,alert_rules.proc FROM alert_log,alert_rules WHERE ale
rt_log.rule_id = && alert_log.device_id = ? && alert_log.rule_id = ? && alert_rules.disabled = 0 ORDER BY DESC LI
MIT 1 [29,35] 0.9ms]

SQL[SELECT DISTINCT a.* FROM alert_rules a
LEFT JOIN alert_device_map d ON
LEFT JOIN alert_group_map g ON
LEFT JOIN device_group_device dg ON g.group_id=dg.device_group_id
WHERE a.disabled = 0 AND ((d.device_id IS NULL AND g.group_id IS NULL) OR d.device_id=? OR dg.device_id=?) [29,29] 1.65ms]

SQL[SELECT attrib_value FROM devices_attribs WHERE attrib_type = “disable_notify” && device_id = ? [29] 0.49ms]

SQL[SELECT hostname, sysName, sysDescr, sysContact, os, type, ip, hardware, version, purpose, notes, uptime, status, status_reason, locations
.location FROM devices LEFT JOIN locations ON = devices.location_id WHERE device_id = ? [29] 0.56ms]

SQL[SELECT * FROM devices_attribs WHERE device_id = ? [29] 0.5ms]

SQL[select * from device_perf where device_id = ? order by timestamp desc limit 1 [29] 4.11ms]

SQL[select * from alert_templates where exists (select * from alert_template_map where = alert_template_map.ale rt_templates_id and alert_rule_id = ?) limit 1 [35] 0.69ms]

Issuing Alert-UID #23336/1:
SQL[SELECT rule_id FROM alerts WHERE id=? [756] 0.41ms]

SQL[SELECT b.transport_id, b.transport_type, b.transport_name FROM alert_transport_map AS a LEFT JOIN alert_transports AS b ON b.transport_id
=a.transport_or_group_id WHERE a.target_type=‘single’ AND a.rule_id=? UNION DISTINCT SELECT d.transport_id, d.transport_type, d.transport_nam
e FROM alert_transport_map AS a LEFT JOIN alert_transport_groups AS b ON a.transport_or_group_id=b.transport_group_id LEFT JOIN transport_gro
up_transport AS c ON b.transport_group_id=c.transport_group_id LEFT JOIN alert_transports AS d ON c.transport_id=d.transport_id WHERE a.targe
t_type=‘group’ AND a.rule_id=? [35,35] 0.7ms]

:: Transport telegram => SQL[SELECT transport_config FROM alert_transports WHERE transport_id=? [4] 0.45ms]

string(21) “API ‘’ returned Error”
string(8) “Params: "
string(8) “Return: "
ERROR: HTTP Status code 0
SQL[insert into eventlog (device_id, reference, type, datetime, severity, message, username) values (?, ?, ?, ?, ?, ?, ?) [29
,null,“error”,“2019-11-02 14:43:59”,5,“Could not issue critical alert for rule 'Down ’ to transport ‘telegram’ Error: HTTP Status code 0”,””]

:: Transport mail => Attempting to email Test telegram to:[email protected]![image|690x363]
OKSQL[insert into eventlog (device_id, reference, type, datetime, severity, message, username) values (?, ?, ?, ?, ?, ?, ?) [
29,null,“alert”,“2019-11-02 14:43:59”,1,“Issued critical alert for rule 'Down ’ to transport ‘mail’”,“”] 28.58ms]


Component Version
LibreNMS 1.57-6-g223a5b1
DB Schema 2019_10_03_211702_serialize_config (145)
PHP 7.1.28
MySQL 5.5.64-MariaDB
RRDTool 1.4.8

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

Re-running /opt/librenms/ as librenms user
Updating to latest codebase OK
Updating Composer packages OK
Updating SQL-Schema OK
Updating submodules OK
Cleaning up DB OK
Fetching notifications OK
Caching PeeringDB data OK

Alert template

{{ $alert->title }}
Host : {{ $alert->hostname }}
Fecha : {{ $alert->timestamp }}
Estado : @if ($alert->state == 0)✅ @endif @if ($alert->state == 1)⚠ Warning @endif
@if ($alert->state == 0):hourglass_flowing_sand: Time elapsed: {{ $alert->elapsed }} @endif
@if ($alert->faults)
@foreach ($alert->faults as $key => $value)
⭗ {{ $value['ifName'] }}
Descripción: {{ $value['ifAlias'] }}
Estado : {{ $value['ifOperStatus'] }}
@if ($alert->alert_notes)
:writing_hand: Notas:

Does telegram test transport works?

No showing general error

And have you made any change before it stopped working?

No but after it stoped

Server was updated

Where i can dig the root cause

Start by creating a new chat and test if that works.

Also, google around about HTTP ERROR CODE 0 for telegram

Hi @jowelvjoy, did you manage to solve the issue? I have a similar problem. What also strikes me is that if I press the test button for Telegram there is a 5 minute timeout before I get the error message. Do you have that too?

No it is not solved I didn’t tried that solution will do it in this Sunday
And update it asap

Take a look to this: