question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improved detection error with Stream ACLS generation when using custom project and topic formats

See original GitHub issue

Describe the bug The first time I run a topology with ACLs for streams without ´applicationId´ tag it works fine and applies ACLs correctly, but if I try to apply it again we receive an error.

If we delete the .cluster-state file, after the first run, it works file.

I suspect it has something to do with the properties we have defined:

topology.project.prefix.format= topology.topic.prefix.format={{topic}} topology.state.cluster.enabled=true

It looks like some PREFIXED ACLs are being stored in the local .cluster-file. Maybe because of the way these ACLs naming is being processed. And when we run the same topology several times it finds some inquerences that prevent the tool to run successfully.

To Reproduce Steps to reproduce the behavior: Relevant properties:

    topology.project.prefix.format=
    topology.topic.prefix.format={{topic}}
    kafka.internal.topic.prefixes.0=_
    allow.delete.bindings=true
    topology.state.cluster.enabled=true

Topology descriptor: streams:

      - principal: "User:streamsapp"
        applicationId: "streams-appid"
        topics:
          read:
            - topic-A
          write:
            - topic-B

The content of this file after the first run is :

acls ‘GROUP’, ‘’, ‘’, ‘READ’, ‘User:streamsapp’, ‘PREFIXED’ ‘TOPIC’, ‘’, '', ‘ALL’, ‘User:streamsapp’, ‘PREFIXED’ ServiceAccounts Topics

The error we get is:

Exception in thread “main” java.io.IOException: line (‘GROUP’, ‘’, ‘*’, ‘READ’, ‘User:streamsapp’, ‘PREFIXED’) does not match at com.purbon.kafka.topology.backend.AbstractBackend.buildAclBinding(AbstractBackend.java:23) at com.purbon.kafka.topology.backend.FileBackend.load(FileBackend.java:76) at com.purbon.kafka.topology.backend.FileBackend.loadBindings(FileBackend.java:60) at com.purbon.kafka.topology.BackendController.load(BackendController.java:83) at com.purbon.kafka.topology.ExecutionPlan.init(ExecutionPlan.java:57) at com.purbon.kafka.topology.JulieOps.run(JulieOps.java:200) at com.purbon.kafka.topology.CommandLineInterface.processTopology(CommandLineInterface.java:196) at com.purbon.kafka.topology.CommandLineInterface.run(CommandLineInterface.java:144) at com.purbon.kafka.topology.CommandLineInterface.main(CommandLineInterface.java:134)

Expected behaviour As a Julie tool user, I expect it to be idempotent.

Runtime (please complete the following information):

  • OS: Mac
  • Version 2.0.0

Additional context Having Kubernetes running on Mac. Julie is running on a pod. If there is more information needed or clarified feel free to request it. Thank you for your help.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
purboncommented, Mar 30, 2021

@Xtema and @akselh #245 should detect and log extensible the problem detected here. I hope it helps.

1reaction
purboncommented, Mar 30, 2021

The problem surfaces in the second run because JulieOps is able to write the invalid ACLs, but not to read them (later) because an empty string for the group is not expected.

Hi @akselh and @Xtema, sorry for taking some time here, but current work load has not allowed me to work lately on the project.

I have been taking a deeper look at the problem.

Is it interesting what you mention, this is what I noticed.

  • In the current code version (master), the group name is taken out of _ this.prefix = app.getApplicationId().orElse(topicPrefix);_ what means if applicationId is not set, the topic prefix will be used.
  • In your config you use topology.topic.prefix.format={{topic}} and _ topology.project.prefix.format=_ i wonder, if this is what is causing this prefix to be empty.

I will try to prove this hypothesis and propose a fix.

Sorry again for the trouble here, and thanks a lot both for your help testing and contributing!! is very much appreciate it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot Dataflow errors - Google Cloud
This error occurs if the pipeline could not be started due to Google Compute Engine metadata limits being exceeded. These limits cannot be...
Read more >
Streams Concepts | Confluent Documentation
An application that uses the Kafka Streams API acts as both a producer and a consumer. The data: Data is stored in topics....
Read more >
Create an ACL rule - ServiceNow Docs
Create a custom ACL rule to secure access to new objects or to change the default security behavior.
Read more >
YARN ACL types | CDP Public Cloud - Cloudera Documentation
There are three different kinds of YARN ACL types: YARN Admin ACLs, YARN Queue ACLs and YARN Application ACLs. ... Cloudera uses cookies...
Read more >
Kafka 3.3 Documentation
Note that the data is being stored in the Kafka topic connect-test , so we can also run a console consumer to see...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found