I am using the "td-agent-bit" service to collect the logs of my app1 node application into a file named "file.log". In my "td-agent-bit.conf" file I left the [SERVICE] section unchanged, but I changed the [INPUT] and [OUTPUT] sections:
...
[INPUT]
Name forward
Listen localhost
Port 24224
[OUTPUT]
Name file
Match *
Path /etc/td-agent-bit/file.log
Format json
The "file.log" exists and has all the permissions because I launched the command
sudo chmod 777 file.log
But when I do
sudo service td-agent-bit restart
I get the following error:
× td-agent-bit.service - TD Agent Bit
Loaded: loaded (/lib/systemd/system/td-agent-bit.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2024-02-07 13:16:53 UTC; 45min ago
Docs: https://docs.fluentbit.io/manual/
Process: 2541 ExecStart=/opt/td-agent-bit/bin/td-agent-bit -c //etc/td-agent-bit/td-agent-bit.conf (code=exited, status=255/EXCEPTION)
Main PID: 2541 (code=exited, status=255/EXCEPTION)
CPU: 23ms
Feb 07 13:16:53 fluent-bit-d-machine systemd[1]: td-agent-bit.service: Scheduled restart job, restart counter is at 5.
Feb 07 13:16:53 fluent-bit-d-machine systemd[1]: Stopped TD Agent Bit.
Feb 07 13:16:53 fluent-bit-d-machine systemd[1]: td-agent-bit.service: Start request repeated too quickly.
Feb 07 13:16:53 fluent-bit-d-machine systemd[1]: td-agent-bit.service: Failed with result 'exit-code'.
Feb 07 13:16:53 fluent-bit-d-machine systemd[1]: Failed to start TD Agent Bit.
I just removed
from the "td-agent-bit.conf" file and it has restarted properly.