Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Helllo,
I need to execute this linux command:
sudo su - hdfs -c "echo -n > /opt/application/bdfalh/test/log/hdfs-audit.log"
in tSystem, I used:
"sudo su - hdfs -c \"echo -n > "+context.rep_filesystem_log_hdfs+"hdfs-audit.log\""
I tried many different ways, single commen, array command, putting the command into a variable
nothing works so far.
At the execution, Talend returns no error but nothing happens on the server
Does anyone have any idea.
Thanks
as 100% working variant - use .sh file instead of command
I remember we also meet with cases when tSystem do not work as expected and start use bash scripts instead, it often adds additional flexibility
Hi,
Did you check whether the Linux user which Talend is using to execute the command (say talend) is having the authorization to perform sudo su to hdfs user?
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Hi,
@nthampi : absolutly, that user has the right, I add it to sudoers file, plus when I launch the command throw linux terminal in the server, it does work.
@vapukov : yes, context.rep_filesystem_log_hdfs=/opt/hdp/log/hdfs/hdfs/
Did you check whether the Linux user which Talend is using to execute the command (say talend) is having the authorization to perform sudo su to hdfs user?
as 100% working variant - use .sh file instead of command
I remember we also meet with cases when tSystem do not work as expected and start use bash scripts instead, it often adds additional flexibility
thanks that works