0

I'm trying to use flume on Windows as a class assignment, I did the exercise first on Ubuntu and I didn't have any problems. On windows I have installed coreutils to use linux commands on windows. The agent gets to run but gets stuck at Exec source started and then checks to see if the execute file has been updated. I use the following code: It is displaying the content of a file inside C:/logs/log.txt and displays it in cmd.

Ag_Monitor.sources = s1
Ag_Monitor.sinks = k1
Ag_Monitor.channels = c1

Ag_Monitor.sources.s1.type = exec
Ag_Monitor.sources.s1.command = tail -F C:\logs\log.txt
Ag_Monitor.sources.s1.shell = cmd.exe /c

Ag_Monitor.sources.s1.channels = c1

Ag_Monitor.sinks.k1.type = logger 

Ag_Monitor.sinks.k1.channel = c1

Ag_Monitor.channels.c1.type = memory

I upload an image of the problem in addition to executing the tail command incorrectly since it indicates another directory. enter image description here

I have used powershell modifying the file with : Get-Content C:\logs\log.txt -Tail 10 powershell.exe /c

I have the following result: has executed it well but it does not appear on the screen. enter image description here

Agat0
  • 11
  • 5
  • What if you try C:\\logs\\log.txt? Seems like \ is an escape character. – Martheen May 28 '22 at 15:33
  • @Martheen now the path works fine but it doesn't progress it gets stuck at "exec source started".I'm trying to use powershell since it has tail , maybe it will solve it. – Agat0 May 28 '22 at 15:40
  • Be careful about syntax difference https://stackoverflow.com/questions/4426442/unix-tail-equivalent-command-in-windows-powershell I'm guessing just using WSL is out of the question? – Martheen May 28 '22 at 15:44
  • @Martheen with wsl do i have to reinstall hadoop and flume? i tried with powershell – Agat0 May 28 '22 at 15:51
  • Unfortunately, yeah, WSL doesn't interact with Windows binaries, but on the other hand, it should work identically as in Linux, because it *is* Linux. – Martheen May 28 '22 at 16:17
  • @Martheen ok but unfortunately I have to use Windows I should not use wsl,testing powershell tells me that the command is executed well but I don't know why it is not shown on the screen. – Agat0 May 28 '22 at 16:50

0 Answers0