Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IllegalArgumentException: Invalid service principal error is shown when Kafka source/sink is added #1283

Open
ijokarumawak opened this issue May 24, 2018 · 0 comments

Comments

@ijokarumawak
Copy link

Issue description

When Kafka source or sink component is added, and double-clicked, following Error message is shown in SAM UI, and the stack-trace is logged. The error message and log can be more helpful for user to address the situation.

image

Caused by: java.lang.IllegalArgumentException: Invalid service principal [] for host [hdf0]. If user principal use com.hortonworks.streamline.streams.cluster.service.metadata.json.UserPrincipal
        at com.hortonworks.streamline.streams.cluster.service.metadata.json.ServicePrincipal.forHost(ServicePrincipal.java:34)
        at com.hortonworks.streamline.streams.cluster.service.metadata.json.Principals.lambda$null$4(Principals.java:72)
        at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
        at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
        at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
        at com.hortonworks.streamline.streams.cluster.service.metadata.json.Principals.lambda$fromAmbariConfig$5(Principals.java:73)
        at java.util.stream.Collectors.lambda$toMap$58(Collectors.java:1321)
        at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
        at java.util.stream.ReferencePipeline$11$1.accept(ReferencePipeline.java:373)
        at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
        at java.util.Iterator.forEachRemaining(Iterator.java:116)
        at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
        at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
        at com.hortonworks.streamline.streams.cluster.service.metadata.json.Principals.fromAmbariConfig(Principals.java:59)
        at com.hortonworks.streamline.streams.cluster.service.metadata.json.Principals.fromAmbariConfig(Principals.java:40)
        at com.hortonworks.streamline.streams.cluster.service.metadata.KafkaMetadataService.getPrincipals(KafkaMetadataService.java:164)
        at com.hortonworks.streamline.streams.cluster.service.metadata.KafkaMetadataService.getSecurity(KafkaMetadataService.java:174)
        at com.hortonworks.streamline.streams.cluster.bundle.AbstractKafkaBundleHintProvider.getSecurity(AbstractKafkaBundleHintProvider.java:36)
        ... 63 common frames omitted

Steps to reproduce

  • Create a SAM Service Pool when Kafka is not Kerberised
  • Kerberize Kafka, at this point, SAM holds the Kafka service configuration without authentication
  • Add Kafka source/sink at SAM, since Kafka service definition is not updated, the 'SECURITY' tab is not shown. The required parameters such as principal can not be specified from UI.
  • SAM server checks Principal and shows the above error.

Steps to recover

  • Go to Service Pool and Refresh the pool
  • Then the 'SECURITY' configuration tab appears for Kafka source/sink to specify required parameters

image

Proposal

It seems there is a gap in between SAM UI and Server. Server knows Kafka needs security configurations, but UI does not. UI should show the 'SECURITY' tab, or Server should throw more understandable error message in this situation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant