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.

Nifi fails in start when configured with kerberos

Highlighted

Nifi fails in start when configured with kerberos

New Contributor

Hi to all,

I configured Nifi on HDP cluster to authenticate users using kerberos.

HDP 2.6.0.3

Ambari 2.5.0.3

Nifi 1.2.0

I changed nifi.properties, authorizers.xml and login-identity-providers.xml ccording to docs and when I restarted Nifi

a get this in nifi-app.log

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'x509AuthenticationProvider' defined in class path resource [nifi-web-security-context.xml]: Cannot resolve reference to bean 'authorizer' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authorizer': FactoryBean threw exception on object creation; nested exception is java.lang.Exception: Unable to load the authorizer configuration file at: /usr/hdf/current/nifi/conf/authorizers.xml

Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'userGroupProvider'. One of '{authorizer}' is expected.

Authorizer is managed-authorizer and I put xml conf in following order

<userGroupProvider>

<accessPolicyProvider>

<authorizer>

I even try to formatt XML config entries in case it can't parse XML, but exception is still there after restart.

Any ideas?

Thank you.

4 REPLIES 4

Re: Nifi fails in start when configured with kerberos

Master Guru

@Tomislav Novose

-

Make sure all your providers are wrapped with "authorizers" as follows:

<authorizers>
<userGroupProvider>    ...       </userGroupProvider>
<accessPolicyProvider>    ...    </accessPolicyProvider>
<authorizer>       ...           </authorizer>
</authorizers>

It seems to be complaining the first thing it finds in your authorizers.xml file is "userGroupProvider"

-

Thanks,

Matt

-

If you found this Answer addressed your original question, please take a moment to login and click "Accept" below the answer.

Re: Nifi fails in start when configured with kerberos

Master Guru

@Tomislav Novosel

-

*** Forum tip: Please try to avoid responding to an Answer by starting a new answer. Instead use the "add comment" to respond to en existing answer. There is no guaranteed order to different answers which can make following a response thread difficult especially when multiple people are trying to assist you.

-

I apologize for just noticing that you stated you are running NiFi 1.2.0. That version of NiFi does not support the new user/group sync capabilities you are trying to setup. That is why it is throwing the exception.

-

In order to use the new providers:

<userGroupProvider>    ...       </userGroupProvider>
<accessPolicyProvider> ... </accessPolicyProvider>

You will need to upgrade your NiFi version to 1.5.x+

-

Thank you,

Matt

Re: Nifi fails in start when configured with kerberos

New Contributor

@Matt Clarke

I checked that. All providers are inside <authorizers> tag and in proper order.

Thanks,

Tomislav

Re: Nifi fails in start when configured with kerberos

Hey i am agree with matt clarke answer, good to share this question. am a new windows user but i do not know How do I sync my settings in windows 10 system, then my friend is suggest this link and its really given all the related information from sync setting.