Getting Data In

How to resolve "ERROR ExecProcessor...No such file or directory" error from a python script through a universal forwarder?

andreac81
Explorer

Hi to all,
I installed on monitored server, by universal forwarding, an app that uses python script to load data about cpu, disk,..
The app contains a file table2event.py that start with:

#!/usr/bin/python

import time
import logging
import urllib2 as u
import os
import subprocess
import sys

global log

In splunkd.log I see several errors like

ERROR ExecProcessor - message from "python /opt/splunkforwarder/etc/apps/ta-adapter/bin/table2event.py iostat.sh" /bin/sh: \r: No such file or directory 

How can I solve?
Thanks,
Andrea

kamlesh_vaghela
SplunkTrust
SplunkTrust

Hi @andreac81,
I think the problem is your line ending characters. Your file was created or edited on a Windows system and uses Windows/DOS-style line endings (CR+LF), whereas Linux systems like Ubuntu require Unix-style line endings (LF).

There is a tool that can convert the two different styles for you called dos2unix.

Can you please try this?

Thanks

0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

Hi @andreac81,

Is your issue resolved?

Thanks

0 Karma

MousumiChowdhur
Contributor

Hi!

Did you check the file permission? Also, have you tested if the script is working locally on the universal forwarder?

Thanks.

0 Karma
Get Updates on the Splunk Community!

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

🔐 Trust at Every Hop: How mTLS in Splunk Enterprise 10.0 Makes Security Simpler

From Idea to Implementation: Why Splunk Built mTLS into Splunk Enterprise 10.0  mTLS wasn’t just a checkbox ...