I replaced LF
with CRLF
in yarn.cmd in %HADOOP_HOME%\bin using and it worked for me (didn't even have to change to ANSI encoding).
Easiest way for me was to use Search->Replace (Ctrl+H) in Notepad++, set the search mode to extended, and replace \n
with \r\n
.