Bug #14861
closedPHP error when pings are enabled but no ping hosts are defined
0%
Description
i was directed to report this issue here
https://forum.netgate.com/topic/183151/telegraf-stopped-working-after-update-to-2-7/3
i believe the required file is attached but if any further information is required please let me know.
cheers
Files
Related issues
Updated by Kris Phillips about 1 year ago
- Status changed from New to Incomplete
Tested on 23.09 and unable to reproduce.
What are the exact steps to produce this PHP error? What platform are you running 2.7 CE on? Bare Metal? A VM?
Updated by David Bowen about 1 year ago
Kris Phillips wrote in #note-1:
Tested on 23.09 and unable to reproduce.
What are the exact steps to produce this PHP error? What platform are you running 2.7 CE on? Bare Metal? A VM?
yep bare metal - no VM of any kind.
I was running telegraf on pfsense 2.6 no issues, updated to 2.7 a couple of months back and i instantly got this error and telegraf not starting/accessible in the UI. I've tried removing telegraf and reinstalling it but it made no difference. not really sure what else to try.
Updated by Kris Phillips about 1 year ago
David Bowen wrote in #note-2:
Kris Phillips wrote in #note-1:
Tested on 23.09 and unable to reproduce.
What are the exact steps to produce this PHP error? What platform are you running 2.7 CE on? Bare Metal? A VM?
yep bare metal - no VM of any kind.
I was running telegraf on pfsense 2.6 no issues, updated to 2.7 a couple of months back and i instantly got this error and telegraf not starting/accessible in the UI. I've tried removing telegraf and reinstalling it but it made no difference. not really sure what else to try.
Testing this on pfSense Plus 23.09, I'm not able to get any PHP errors or crashes. This must be something isolated to pfSense CE as I'm not able to recreate this on Plus.
Updated by Kris Phillips about 1 year ago
- Status changed from Incomplete to New
Crash report from Forum post:
Crash report begins. Anonymous machine information:
amd64
14.0-CURRENT
FreeBSD 14.0-CURRENT #1 RELENG_2_7_0-n255866-686c8d3c1f0: Wed Jun 28 04:21:19 UTC 2023 root@freebsd:/var/jenkins/workspace/pfSense-CE-snapshots-2_7_0-main/obj/amd64/LwYAddCr/var/jenkins/workspace/pfSense-CE-snapshots-2_7_0-main/sources/FreeBSD-src-REL
Crash report details:
PHP Errors:
[27-Sep-2023 23:32:36 Europe/London] PHP Fatal error: Uncaught TypeError: implode(): Argument #1 ($pieces) must be of type array, string given in /usr/local/pkg/telegraf.inc:132
Stack trace:
#0 /usr/local/pkg/telegraf.inc(132): implode(',', NULL)
#1 /etc/inc/pkg-utils.inc(775) : eval()'d code(1): telegraf_resync_config()
#2 /etc/inc/pkg-utils.inc(775): eval()
#3 /etc/inc/pkg-utils.inc(899): eval_once(' telegra...')
#4 /etc/rc.packages(76): install_package_xml('Telegraf')
#5 {main}
thrown in /usr/local/pkg/telegraf.inc on line 132
[27-Sep-2023 23:32:45 Europe/London] PHP Fatal error: Uncaught TypeError: implode(): Argument #1 ($pieces) must be of type array, string given in /usr/local/pkg/telegraf.inc:132
Stack trace:
#0 /usr/local/pkg/telegraf.inc(132): implode(',', NULL)
#1 /etc/inc/pkg-utils.inc(709) : eval()'d code(1): telegraf_resync_config()
#2 /etc/inc/pkg-utils.inc(709): eval()
#3 /etc/rc.start_packages(66): sync_package('Telegraf')
#4 {main}
thrown in /usr/local/pkg/telegraf.inc on line 132
No FreeBSD crash data found.
Updated by aleksei prokofiev about 1 year ago
Tested upgrade from 2.6.0 to 2.7.0 with installed telegraf 0.9_6, no issue
2.6.0-RELEASE (amd64)
built on Mon Jan 31 19:57:53 UTC 2022
FreeBSD 12.3-STABLE
2.7.0-RELEASE (amd64)
built on Wed Jun 28 03:53:34 UTC 2023
FreeBSD 14.0-CURRENT
Updated by Kris Phillips 12 months ago
- Status changed from New to Incomplete
Tested on 2.7.1. I'm still not able to recreate this bug report. Marking as Incomplete until exact replication steps can be provided.
Updated by David Bowen 12 months ago
Hi, not sure what to tell you. I was using the telegraf plugin on 2.7.x sending stats to an influxdb. I don't recall if i specified some additional measures. The below is the extract from the config.xml
<telegraf>
<config>
<enable>on</enable>
<interval></interval>
<telegraf_output>influxdb</telegraf_output>
<influx_server>http://192.168.1.15:8086&lt;/influx_server>
<influx_db>TelegrafStats</influx_db>
<influx_user>influxuser</influx_user>
<influx_pass>UGFzc3dvcmQ=</influx_pass>
<insecure_skip_verify></insecure_skip_verify>
<shortname></shortname>
<elasticsearch_server></elasticsearch_server>
<graphite_server></graphite_server>
<graphite_prefix></graphite_prefix>
<graphite_timeout></graphite_timeout>
<haproxy_enable>on</haproxy_enable>
<haproxy_port></haproxy_port>
<netstat_enable>on</netstat_enable>
<ping_enable>on</ping_enable>
<ping_host_1></ping_host_1>
<ping_host_2></ping_host_2>
<ping_host_3></ping_host_3>
<ping_host_4></ping_host_4>
<telegraf_raw_config>W1tpbnB1dHMuZXhlY11dDQogICAgY29tbWFuZHMgPSBbDQogICAgICAgICIvdXNyL2xvY2FsL2Jpbi90ZWxlZ3JhZl9wZmlmZ3cucGhwIiwNCiAgICAgICAgInNoIC91c3IvbG9jYWwvYmluL3RlbGVncmFmX3RlbXBlcmF0dXJlLnNoIg0KICAgIF0NCiAgICBkYXRhX2Zvcm1hdCA9ICJpbmZsdXgiDQoNCltbaW5wdXRzLnRhaWxdXQ0KICAgIGZpbGVzID0gWyIvdmFyL2xvZy9wZmJsb2NrZXJuZy9kbnNibC5sb2ciXQ0KICAgIGRhdGFfZm9ybWF0ID0gImdyb2siDQogICAgZnJvbV9iZWdpbm5pbmcgPSBmYWxzZQ0KICAgIG5hbWVfc3VmZml4ID0gIl9kbnNibF9sb2ciDQogICAgZ3Jva190aW1lem9uZSA9ICJMb2NhbCINCiAgICBncm9rX3BhdHRlcm5zID0gWyJeJXtXT1JEOmJsb2NrdHlwZX0tJXtXT1JEOmJsb2Nrc3VidHlwZX0sJXtTWVNMT0dUSU1FU1RBTVA6dGltZXN0YW1wOnRzLXN5c2xvZ30sJXtJUE9SSE9TVDpkb21haW59LCV7SVBPUkhPU1Q6c3JjX2lwOnRhZ30sJXtHUkVFRFlEQVRBOnJlcV9hZ2VudH0sJXtXT1JEOmJsb2NrbWV0aG9kfSwle1dPUkQ6YmxvY2tsaXN0OnRhZ30sJXtJUE9SSE9TVDp0bGQ6dGFnfSwle1dPUkQ6ZmVlZF9uYW1lOnRhZ30sJXtHUkVFRFlEQVRBOmR1cGxpY2F0ZWV2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hZl91bmJvdW5kLnNoIg==</telegraf_raw_config>
</config>
</telegraf>
i updated to 2.7 and immediately got the error I am reporting. The suggestion that the telgraf package needs updating was made by a user on the netgate forum, personally i have no idea.
i've tried removing and reinstalling the telegraf package - the only thing i havent done is removed the telegraf config to see if the telegraf service starts with no config, but i'm afraid i don't know how to do this without some guidance. i assume updating to 2.7.1 isn't going to make a difference?
appreciate the help!
Updated by Marcos M 6 months ago
- Status changed from Incomplete to Pull Request Review
- Assignee set to Marcos M
- Target version set to 2.8.0
- Plus Target Version set to 24.08
This happens when pings are enabled but no ping hosts are defined - simply disable pings to work around the PHP error (or define at least one ping host). We can handle the error more gracefully though.
https://gitlab.netgate.com/pfSense/FreeBSD-ports/-/merge_requests/398
Updated by Marcos M 6 months ago
- Has duplicate Bug #13985: Telegraf error After Update PFSense to 23.01 added
Updated by aleksei prokofiev 5 months ago
I can confirm that enabling ping monitor option without specify host IP caused crash. Disabling the option or specifying the IP will solve the problem.
Also tested on
24.08-DEVELOPMENT (amd64)
built on Tue Jul 2 9:00:00 MSK 2024
FreeBSD 15.0-CURRENT
No more crashes, even if no IP is specified and the option is enabled.
Updated by Jim Pingle about 1 month ago
- Plus Target Version changed from 24.08 to 24.11