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

telegraf.service: Got notification message from PID XXX, but reception only permitted for main PID YYY #14500

Closed
shrx opened this issue Dec 23, 2023 · 5 comments · Fixed by #14517
Labels
bug unexpected problem or unintended behavior

Comments

@shrx
Copy link

shrx commented Dec 23, 2023

Relevant telegraf.conf

[agent]
  interval = "1m"
  round_interval = true
  metric_batch_size = 1000
  metric_buffer_limit = 10000
  collection_jitter = "5s"
  flush_interval = "10s"
  flush_jitter = "5s"
  precision = ""
  hostname = ""
  omit_hostname = true
[[outputs.influxdb]]
  urls = ["http://127.0.0.1:8086"]
  database = "home"
  skip_database_creation = true
  username = "telegraf"
  password = "XXXXXX"
 [[inputs.exec]]
   commands = [
     "/home/pi/bin/script1",
     "/home/pi/bin/script2"
   ]
   timeout = "6s"
   data_format = "influx"

Logs from Telegraf

Dec 23 00:59:04 raspberrypi systemd[1]: telegraf.service: Got notification message from PID 3572831, but reception only permitted for main PID 3571618
Dec 23 00:59:08 raspberrypi systemd[1]: telegraf.service: Got notification message from PID 3572834, but reception only permitted for main PID 3571618
Dec 23 01:00:04 raspberrypi systemd[1]: telegraf.service: Got notification message from PID 3572948, but reception only permitted for main PID 3571618
Dec 23 01:00:08 raspberrypi systemd[1]: telegraf.service: Got notification message from PID 3572951, but reception only permitted for main PID 3571618
Dec 23 01:01:01 raspberrypi systemd[1]: telegraf.service: Got notification message from PID 3573066, but reception only permitted for main PID 3571618
Dec 23 01:01:05 raspberrypi systemd[1]: telegraf.service: Got notification message from PID 3573069, but reception only permitted for main PID 3571618

System info

Telegraf 1.29.1-1

Docker

No response

Steps to reproduce

script1 and script2 are producing the following output, respectively:

device1 power_on=0i,set_temperature=25.0,current_temperature=22.0
device2 detected=1i,rssi=-62i

Expected behavior

No systemd warnings.

Actual behavior

There are systemd warnings for each script execution.

Additional info

No response

@shrx shrx added the bug unexpected problem or unintended behavior label Dec 23, 2023
@shrx
Copy link
Author

shrx commented Dec 23, 2023

A solution appears to be adding NotifyAccess=all under the [Service] section in /lib/systemd/system/telegraf.service, as per https://groups.google.com/g/linux.debian.bugs.dist/c/XM9-48USWVQ?pli=1

powersj added a commit to powersj/telegraf that referenced this issue Jan 2, 2024
@powersj
Copy link
Contributor

powersj commented Jan 2, 2024

@shrx,

Thanks for looking into this. I think we should carry that by default and not require users to include it, but I am not 100% certain of the implications still. I have put up #14517 which would make the change.

@powersj
Copy link
Contributor

powersj commented Jan 3, 2024

@shrx - can I get you to try the artifacts in #14517 please and confirm it suppresses the messages?

@powersj powersj added the waiting for response waiting for response from contributor label Jan 3, 2024
@shrx
Copy link
Author

shrx commented Jan 3, 2024

@shrx - can I get you to try the artifacts in #14517 please and confirm it suppresses the messages?

Sure, I'll be glad to test the fix.

@telegraf-tiger telegraf-tiger bot removed the waiting for response waiting for response from contributor label Jan 3, 2024
@shrx
Copy link
Author

shrx commented Jan 3, 2024

@powersj looks good to me, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants