Uploaded image for project: 'Data Movement as a Platform'
  1. Data Movement as a Platform
  2. DMAAP-896

[MR] Error: KafkaConsumer is not safe for multi-threaded access


    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Medium Medium
    • Dublin Release
    • Casablanca Release, Dublin Release
    • None
    • DMAAP-Dub-01-(12/3/18-12/13)

      Steps to reproduce error:

      1. With oom install following onap components: aaf, aai, consul, dcagen2, dmaap, msb

      2. Integrate DmaaP with AAF witch following k8s changes:

      • Set correct values for below properties in config map for dmaap-bus-controller-config (on k8s). Restart dmaap-bus-controller on rancher.
        • UseAAF: true
        • aaf.URL: <aaf-service url>
      • Use correct image in the message-router-kafka deployment (0.0.2):
        • "image": "nexus3.onap.org:10001/onap/dmaap/kafka01101:0.0.2"
      • Set aaf url in message-router-cadi-prop-configmap
        • aaf_locate_url=<aaf locate url>
      • Enable cadi in message-router deployment
        • {"name": "enableCadi", "value": "true"}
      • Change message-router-kafka deploymet with env variables described here: https://wiki.onap.org/pages/viewpage.action?pageId=45296721

      3. Add missing roles and permission to AAF that enables creation and pub/sub to secure topic
      In aaf console do following:
      > role create org.onap.dmaap.mr.topic.full_access
      > perm create org.onap.dmaap.mr.topic * *
      > user role add aaf_admin org.onap.dmaap.mr.topic.full_access
      > user cred add dmaapmr@mr.dmaap.onap.org demo123456!
      > user role add dmaapmr@mr.dmaap.onap.org org.onap.dmaap.mr.topic.full_access

      4. Create new secure topic "my_own_topic".
      Post json from create_topic.json file to url: <Buscontroller HTTP Node Port>/webapi/topics (Content-Type: application/json)
      As a response you should get json similar to one from topic_created.json

      5. Verify in AAf console if pub, sub, view permissions were created for new topic
      > perm list user dcae@dcae.onap.org
      org.onap.dmaap.mr.topic :topic.org.onap.dmaap.mr.my_own_topic pub
      org.onap.dmaap.mr.topic :topic.org.onap.dmaap.mr.my_own_topic sub
      org.onap.dmaap.mr.topic :topic.org.onap.dmaap.mr.my_own_topic view

      6.  Publish test message to topic
      curl -X POST -u aaf_admin:demo123456! -H "Content-Type: application/json" --data "{"json":"test"}" http://<message router ip>:30227/events/org.onap.dmaap.mr.my_own_topic

      Message-router result logs can be found in publish_to_topic.log

      7.  Get message from topic:
      curl -u aaf_admin:demo123456! -H "Content-Type: application/json" http://<message router ip>:30227/events/org.onap.dmaap.mr.my_own_topic/example/1

      As a response you receive an empty array: []

      In message-router log you'll get following error:
      KafkaConsumer is not safe for multi-threaded access on AAI-EVENT datarouter. Complete log can be found in get_from_topic_error.log

        1. create_topic.json
          0.6 kB
        2. get_from_topic_error.log
          6 kB
        3. publish_to_topic.log
          2 kB
        4. topic_created.json
          1 kB

            sunil.unnava sunil.unnava
            piotr.karas piotr.karas
            0 Vote for this issue
            6 Start watching this issue