Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Install and Test Kerberos client failed on Ambari due to indentation error at ../stacks/HDP/2.6/services/stack_advisor.py, line 69

Solved Go to solution
Highlighted

Install and Test Kerberos client failed on Ambari due to indentation error at ../stacks/HDP/2.6/services/stack_advisor.py, line 69

New Contributor

HDP 2.6.4.0 on RHEL 7

While enabling Kerberos the client install failed with the below error:

Error occured in stack advisor. Error details: unindent does not match any outer indentation level (stack_advisor.py, line 69) 21 Dec 2018 17:14:53,092 INFO [Server Action Executor Worker 3279] StackAdvisorRunner:71 - advisor script stderr: Traceback (most recent call last): File "/var/lib/ambari-server/resources/scripts/stack_advisor.py", line 173, in <module> main(sys.argv) File "/var/lib/ambari-server/resources/scripts/stack_advisor.py", line 103, in main stackAdvisor = instantiateStackAdvisor(stackName, stackVersion, parentVersions) File "/var/lib/ambari-server/resources/scripts/stack_advisor.py", line 154, in instantiateStackAdvisor stack_advisor = imp.load_module('stack_advisor_impl', fp, path, ('.py', 'rb', imp.PY_SOURCE)) File "/var/lib/ambari-server/resources/scripts/./../stacks/HDP/2.6/services/stack_advisor.py", line 69 if streamline_env: ^ IndentationError: unindent does not match any outer indentation level 21 Dec 2018 17:14:53,092 WARN [Server Action Executor Worker 3279] ServerActionExecutor:459 - Task #3279 failed to complete execution due to thrown exception: org.apache.ambari.server.AmbariException:Stack Advisor reported an error: IndentationError: unindent does not match any outer indentation level

Any help to resolve this issue is highly appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Install and Test Kerberos client failed on Ambari due to indentation error at ../stacks/HDP/2.6/services/stack_advisor.py, line 69

Hi @Rajeswaran Govindan ,

File "/var/lib/ambari-server/resources/scripts/./../stacks/HDP/2.6/services/stack_advisor.py", line 69 if streamline_env: ^ IndentationError: unindent does not match any outer indentation level

From the error it looks like someone has edited this python file and the python indentation was not kept correctly as it should be.

can you do a ls -lh on the folder /var/lib/ambari-server/resources/scripts/./../stacks/HDP/2.6/services/ and see the timestamp difference.

If my assumption is correct you are using ambari-2.6.2 and below is the apache ambari code of stack_advisor.py for this version . please compare it with yours and correct the mistake.

https://github.com/apache/ambari/blob/release-2.6.2/ambari-server/src/main/resources/stacks/HDP/2.6/...

Please accept this answer if its helpful

5 REPLIES 5

Re: Install and Test Kerberos client failed on Ambari due to indentation error at ../stacks/HDP/2.6/services/stack_advisor.py, line 69

Super Collaborator

Hi Rajeswaran,

I guess you are just using Ambari? Or have you implemented some own Python code anywhere? Can you perhaps post what some details on what action you are trying to execute?

Regards
Harald

Re: Install and Test Kerberos client failed on Ambari due to indentation error at ../stacks/HDP/2.6/services/stack_advisor.py, line 69

Hi @Rajeswaran Govindan ,

File "/var/lib/ambari-server/resources/scripts/./../stacks/HDP/2.6/services/stack_advisor.py", line 69 if streamline_env: ^ IndentationError: unindent does not match any outer indentation level

From the error it looks like someone has edited this python file and the python indentation was not kept correctly as it should be.

can you do a ls -lh on the folder /var/lib/ambari-server/resources/scripts/./../stacks/HDP/2.6/services/ and see the timestamp difference.

If my assumption is correct you are using ambari-2.6.2 and below is the apache ambari code of stack_advisor.py for this version . please compare it with yours and correct the mistake.

https://github.com/apache/ambari/blob/release-2.6.2/ambari-server/src/main/resources/stacks/HDP/2.6/...

Please accept this answer if its helpful

Re: Install and Test Kerberos client failed on Ambari due to indentation error at ../stacks/HDP/2.6/services/stack_advisor.py, line 69

New Contributor

Thank you Akil and Harald Berghoff,

I could resolve the indentation issues on stack_advisor.py and get past that error. No I face a permission issue at the "kerberise cluster" stage in Ambari. The error is:

Task #4945 failed to complete execution due to thrown exception: org.apache.ambari.server.AmbariException:chown: changing ownership of ‘/etc/security/keytabs/spnego.service.keytab’: Operation not permitted

Ambar is running as a non-root user and the owner of spnego.service.keytab is a ambari user and not a root user. Not sure o what user it is trying to change and what permission is required.

Re: Install and Test Kerberos client failed on Ambari due to indentation error at ../stacks/HDP/2.6/services/stack_advisor.py, line 69

New Contributor

The keytab file, /etc/security/keytabs/spnego.service.keytab is created and is owned by non-root user. The .csv file shows it has to be owned by root:hadoop and the non-root user is not able to do chown due to OS restrictions. How to get around this limitation ?

Can the Ambari-server be changed to run as root user from non-root user at this point? If so, what are the steps? Any suggestion is welcome.

Re: Install and Test Kerberos client failed on Ambari due to indentation error at ../stacks/HDP/2.6/services/stack_advisor.py, line 69

Hi @Rajeswaran Govindan ,

Can you please login and accept the best answer to resolve this thread.

and Create a new thread for this new issue you are facing.

Accepting the best answer helps other community users to figure out the answer correctly.