3

I am using a custom config of collectd and for some reason I keep getting a failure when I try and run the service. Originally I had everything in one big file, but to make changing configs easier I want to separate out the settings for various plugins and components. Collectd has a Include option to do exactly this. It seems to work, but when collectd tries to grab the external part of the program I get the following error:

Parse error in file `/etc/collectd/collectd.conf.d/http.conf', line 1100 near `': syntax error, unexpected $end, expecting EOL

If I go in and copy paste direct into the server using vim, it will work. However when the package installs it won't. I know these kinds of errors can come from mismatched brackets or quotes or something, but his is not a problem in these files. Is there anything else which could cause such an error?

eignhpants
  • 1,611
  • 4
  • 26
  • 49

1 Answers1

7

For the users they have similar error at you. For my case, i have not return line at the bottom of collectd.conf or plugins configuration files. For verify, you can use this command

$ xxd collectd.conf | tail -n1 | grep 0a

00001c0: 730a 0a                                  s..

You must see the 0a at the end of the file

Note : You can replace collectd.conf by plugins configuration files

Bruno Adelé
  • 1,087
  • 13
  • 16
  • 1
    I wasted a couple of hours until I figured this out. And this is the only reference I have found on the entire internet to this problem. This is in my opinion a bug on collectd, because their documentation says nothing about requiring newlines at the end of the file. – Danielo515 Mar 20 '22 at 15:28