zhy989 commented on issue #210: How to use message feed
URL: 
https://github.com/apache/incubator-openwhisk-package-kafka/issues/210#issuecomment-322427182
 
 
   @bjustin-ibm thanks!
   I had run the docker image(kafkafeedprovider) successfully.
   
   then I try to create kafka trigger with CLI :
   - wsk trigger create MyKafkaTrigger -f /whisk.system/messaging/kafkaFeed -p 
brokers "mykafkahost:9092, mykafkahost:9093" -p topic mytopic -p isJSONData 
true -i
   ok: invoked /whisk.system/messaging/kafkaFeed with id 
5c4ec13b87ca48698dbee7dbc7b10e0b
   {
       "activationId": "5c4ec13b87ca48698dbee7dbc7b10e0b",
       "annotations": [
           {
               "key": "limits",
               "value": {
                   "logs": 10,
                   "memory": 256,
                   "timeout": 60000
               }
           },
           {
               "key": "path",
               "value": "whisk.system/messaging/kafkaFeed"
           }
       ],
       "duration": 1496,
       "end": 1502790634515,
       "logs": [],
       "name": "kafkaFeed",
       "namespace": "whisk.system",
       "publish": false,
       "response": {
           "result": {
               "error": "Error: error happened in your connection"
           },
           "status": "application error",
           "success": false
       },
       "start": 1502790633019,
       "subject": "whisk.system",
       "version": "0.0.3"
   }
   ok: invoked /whisk.system/messaging/kafkaFeed with id 
111b55bf70e248ba90beca624d0ed123
   {
       "activationId": "111b55bf70e248ba90beca624d0ed123",
       "annotations": [
           {
               "key": "limits",
               "value": {
                   "logs": 10,
                   "memory": 256,
                   "timeout": 60000
               }
           },
           {
               "key": "path",
               "value": "whisk.system/messaging/kafkaFeed"
           }
       ],
       "duration": 501,
       "end": 1502790635383,
       "logs": [],
       "name": "kafkaFeed",
       "namespace": "whisk.system",
       "publish": false,
       "response": {
           "result": {},
           "status": "success",
           "success": true
       },
       "start": 1502790634882,
       "subject": "whisk.system",
       "version": "0.0.3"
   }
   ok: deleted trigger MyKafkaTrigger
   Run 'wsk --help' for usage.
   
   It failed , the logs is as below:
   
   - wsk -i activation logs 5c4ec13b87ca48698dbee7dbc7b10e0b
   2017-08-15T09:50:34.511516922Z stdout: Error creating trigger: {
   2017-08-15T09:50:34.511548026Z stdout: "name": "StatusCodeError",
   2017-08-15T09:50:34.511552003Z stdout: "statusCode": 500,
   2017-08-15T09:50:34.511554501Z stdout: "message": "500 - \"Error: error 
happened in your connection\"",
   2017-08-15T09:50:34.511557142Z stdout: "error": "Error: error happened in 
your connection",
   2017-08-15T09:50:34.511559611Z stdout: "options": {
   2017-08-15T09:50:34.511561707Z stdout: "method": "PUT",
   2017-08-15T09:50:34.511564397Z stdout: "url": 
"https://172.17.0.1/api/v1/web/whisk.system/messagingWeb/kafkaFeedWeb.http";,
   2017-08-15T09:50:34.511570175Z stdout: "rejectUnauthorized": false,
   2017-08-15T09:50:34.511572303Z stdout: "json": true,
   2017-08-15T09:50:34.511574498Z stdout: "body": {
   2017-08-15T09:50:34.51157697Z  stdout: "authKey": 
"789c46b1-71f6-4ed5-8c54-816aa4f8c502:abczO3xZCLrMN6v2BKK1dXYFpXlPkccOFqm12CdAsMgRU4VrNZ9lyGVCGuMDGIwP",
   2017-08-15T09:50:34.51158097Z  stdout: "isJSONData": true,
   2017-08-15T09:50:34.511584471Z stdout: "brokers": "mykafkahost:9092, 
mykafkahost:9093",
   2017-08-15T09:50:34.511588192Z stdout: "topic": "mytopic",
   2017-08-15T09:50:34.511591885Z stdout: "triggerName": 
"/whisk.system/MyKafkaTrigger"
   2017-08-15T09:50:34.511595503Z stdout: },
   2017-08-15T09:50:34.511598525Z stdout: "headers": {
   2017-08-15T09:50:34.511602038Z stdout: "Content-Type": "application/json",
   2017-08-15T09:50:34.511605702Z stdout: "Accept": "text/plain",
   2017-08-15T09:50:34.511609225Z stdout: "User-Agent": "whisk"
   2017-08-15T09:50:34.511612934Z stdout: },
   2017-08-15T09:50:34.511618017Z stdout: "simple": true,
   2017-08-15T09:50:34.511621631Z stdout: "resolveWithFullResponse": false,
   2017-08-15T09:50:34.511625174Z stdout: "transform2xxOnly": false
   2017-08-15T09:50:34.511628593Z stdout: },
   2017-08-15T09:50:34.511631863Z stdout: "response": {
   2017-08-15T09:50:34.511635333Z stdout: "statusCode": 500,
   2017-08-15T09:50:34.511639172Z stdout: "body": "Error: error happened in 
your connection",
   2017-08-15T09:50:34.511643199Z stdout: "headers": {
   2017-08-15T09:50:34.511646877Z stdout: "server": "nginx/1.11.13",
   2017-08-15T09:50:34.511650606Z stdout: "date": "Tue, 15 Aug 2017 09:50:34 
GMT",
   2017-08-15T09:50:34.511654232Z stdout: "content-type": "text/plain",
   2017-08-15T09:50:34.511657958Z stdout: "content-length": "40",
   2017-08-15T09:50:34.511665314Z stdout: "connection": "close",
   2017-08-15T09:50:34.511669132Z stdout: "access-control-allow-origin": "*",
   2017-08-15T09:50:34.511672832Z stdout: "access-control-allow-methods": 
"OPTIONS, GET, DELETE, POST, PUT, HEAD, PATCH",
   2017-08-15T09:50:34.511676677Z stdout: "access-control-allow-headers": 
"Authorization, Content-Type"
   2017-08-15T09:50:34.511685393Z stdout: },
   2017-08-15T09:50:34.511687738Z stdout: "request": {
   2017-08-15T09:50:34.511689919Z stdout: "uri": {
   2017-08-15T09:50:34.511692036Z stdout: "protocol": "https:",
   2017-08-15T09:50:34.511694244Z stdout: "slashes": true,
   2017-08-15T09:50:34.511696371Z stdout: "auth": null,
   2017-08-15T09:50:34.511698541Z stdout: "host": "172.17.0.1",
   2017-08-15T09:50:34.511700745Z stdout: "port": 443,
   2017-08-15T09:50:34.511702822Z stdout: "hostname": "172.17.0.1",
   2017-08-15T09:50:34.511705026Z stdout: "hash": null,
   2017-08-15T09:50:34.511707119Z stdout: "search": null,
   2017-08-15T09:50:34.511709216Z stdout: "query": null,
   2017-08-15T09:50:34.511711206Z stdout: "pathname": 
"/api/v1/web/whisk.system/messagingWeb/kafkaFeedWeb.http",
   2017-08-15T09:50:34.511713473Z stdout: "path": 
"/api/v1/web/whisk.system/messagingWeb/kafkaFeedWeb.http",
   2017-08-15T09:50:34.511715696Z stdout: "href": 
"https://172.17.0.1/api/v1/web/whisk.system/messagingWeb/kafkaFeedWeb.http";
   2017-08-15T09:50:34.511717947Z stdout: },
   2017-08-15T09:50:34.511719883Z stdout: "method": "PUT",
   2017-08-15T09:50:34.511721968Z stdout: "headers": {
   2017-08-15T09:50:34.511724161Z stdout: "Content-Type": "application/json",
   2017-08-15T09:50:34.511726298Z stdout: "Accept": "text/plain",
   2017-08-15T09:50:34.511728373Z stdout: "User-Agent": "whisk",
   2017-08-15T09:50:34.511730533Z stdout: "content-length": 243
   2017-08-15T09:50:34.511732625Z stdout: }
   2017-08-15T09:50:34.511734607Z stdout: }
   2017-08-15T09:50:34.511736582Z stdout: }
   2017-08-15T09:50:34.511738502Z stdout: 
   
    }
   
   Is the variable values about brokers (-p brokers "mykafkahost:9092, 
mykafkahost:9093" ) right? 
   Should I set the brokers variable to the service port of the docker 
image(kafkafeedprovider) or set to localhost:9092 ?
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to