Support Questions

Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

nifi doesnt start

getting syntax error near unpected token 'newline' 'JAVAHOME = /opt/java/jdk1.8.0_101 nearl Line 82 in nifi.sh

1 ACCEPTED SOLUTION

Super Collaborator

@Prem Kripalani That is weird. I'm looking at code for nifi 1.0.0 and line 82 does not have JAVAHOME anywhere near it. In fact, I don't see JAVAHOME anywhere. Typically that variable has an underscore "_" like JAVA_HOME. The error message "syntax error near unexpected token `newline'" is associated with an invalid redirect ">" with a newline after it. Can you find the file nifi.sh and look around line 82 to see if you see anything about JAVAHOME or if you see a redirect with no filename after it? This could be an empty variable after the ">" as well.

In any case, it may be easier to reinstall Nifi than to track it down.

View solution in original post

6 REPLIES 6

Super Collaborator

What version of are you using?

latest version HDP 2.5 nifi HDF 2.0.1.0

Super Collaborator

@Prem Kripalani That is weird. I'm looking at code for nifi 1.0.0 and line 82 does not have JAVAHOME anywhere near it. In fact, I don't see JAVAHOME anywhere. Typically that variable has an underscore "_" like JAVA_HOME. The error message "syntax error near unexpected token `newline'" is associated with an invalid redirect ">" with a newline after it. Can you find the file nifi.sh and look around line 82 to see if you see anything about JAVAHOME or if you see a redirect with no filename after it? This could be an empty variable after the ">" as well.

In any case, it may be easier to reinstall Nifi than to track it down.

thanks a lot for your quick reply,

as you suggested, i have reinstalled nifi and Magically (**as always happens with HDP 2.5) its working, only took me six hours to work it out,

i have installed nifi in stand alone windows 10 environment, to test and it worked fine

than restarted computer few times and it is working now

thanks a lot

Super Collaborator

@Prem Kripalani I'm glad yo got it worked out. Sorry to hear that it was such a pain.

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.