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

kafkapub: Runtime error: invalid memory address #82

Closed
kurattila opened this issue Jun 19, 2017 · 1 comment
Closed

kafkapub: Runtime error: invalid memory address #82

kurattila opened this issue Jun 19, 2017 · 1 comment

Comments

@kurattila
Copy link

I am getting the following error when wiring up the default flogo application (using flogo create) with Kafka publisher:

user@machine:~/myAppKafka$ bin/myapp
2017-06-19 15:26:44.629 INFO   [engine] - Engine: Starting...
2017-06-19 15:26:44.629 INFO   [engine] - Engine: Starting Services...
2017-06-19 15:26:44.629 INFO   [engine] - Engine: Started Services
2017-06-19 15:26:44.629 INFO   [engine] - Trigger [my_rest_trigger] started
2017-06-19 15:26:44.629 INFO   [engine] - Engine: Started
2017-06-19 15:26:58.568 INFO   [trigger-tibco-rest] - REST Trigger: Received request for id 'my_rest_trigger'
2017-06-19 15:26:58.568 INFO   [engine] - In Flow Run uri: 'my_simple_flow'
2017-06-19 15:26:58.568 INFO   [engine] - FlowInstance Flow: &{tibco-simple 0x9dd800 map[1:0x9dd800]}
2017-06-19 15:26:58.568 ERROR  [engine] - Unhandled Error executing task 'tibco-kafkapub' : runtime error: invalid memory address or nil pointer dereference
2017/06/19 15:26:58 http: multiple response.WriteHeader calls

Kafkapub usage is configured according to its documentation, but the message is not delivered to kafka.

Could someone please turn me in the right direction on where to look at next?

The flogo.json used for flogo build :

{
  "name": "myAppKafka/",
  "type": "flogo:app",
  "version": "0.0.1",
  "description": "Test flogo application for Kafka",
  "triggers": [
    {
      "id": "my_rest_trigger",
      "ref": "github.com/TIBCOSoftware/flogo-contrib/trigger/rest",
      "settings": {
        "port": "9233"
      },
      "handlers": [
        {
          "actionId": "my_simple_flow",
          "settings": {
            "method": "GET",
            "path": "/test"
          }
        }
      ]
    }
  ],
  "actions": [
    {
      "id": "my_simple_flow",
      "ref": "github.com/TIBCOSoftware/flogo-contrib/action/flow",
      "data": {
        "flow": {
          "attributes": [],
          "rootTask": {
            "id": 1,
            "type": 1,
            "tasks": [
              {
                "id": 2,
                "type": 1,
                "activityType": "tibco-log",
                "name": "log",
                "attributes": [
                  {
                    "name": "message",
                    "value": "Simple Log",
                    "type": "string"
                  }
                ]
              },
              {
                  "id": 3,
                  "name": "tibco-kafkapub",
                  "description": "Publish a message to a kafka topic",
                  "type": 1,
                  "activityType": "tibco-kafkapub",
                  "activityRef": "github.com/TIBCOSoftware/flogo-contrib/activity/kafkapub",
                  "attributes": [
                    {
                      "name": "BrokerUrls",
                      "value": "localhost:9092",
                      "required": false,
                      "type": "string"
                    },
                    {
                      "name": "Topic",
                      "value": "test",
                      "required": false,
                      "type": "string"
                    },
                    {
                      "name": "Message",
                      "value": "mary had a little lamb",
                      "required": false,
                      "type": "string"
                    }
                  ]
              }
            ],
            "links": [
            ]
          }
        }
      }
    }
  ]
}
@kurattila
Copy link
Author

Solution to this is the same as with the issue kafka subscriber: "Trigger factory not registered":

  • the app name inside flogo.json must be set to the same string as the dirname under src

I believe this will be fixed in the future. :-)

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