You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by gi...@git.apache.org on 2017/09/28 19:36:21 UTC

[GitHub] mrutkows opened a new issue #568: Update of Trigger fails

mrutkows opened a new issue #568: Update of Trigger fails 
URL: https://github.com/apache/incubator-openwhisk-wskdeploy/issues/568
 
 
   Using the example in the programming guide:
   [https://github.com/mrutkows/incubator-openwhisk-wskdeploy/blob/guide-part9/docs/wskdeploy_triggerrule_trigger_bindings.md](https://github.com/mrutkows/incubator-openwhisk-wskdeploy/blob/guide-part9/docs/wskdeploy_triggerrule_trigger_bindings.md)
   
   with deployment file:
   ```
   application:
     name: meetPerson-bindings
   
     packages:
         hello_world_package:
           triggers:
             meetPerson:
               inputs:
                 name: Sam
                 place: the Shire
                 children: 13
                 height: 1.2
   ```
   fails to update the trigger 
   ```
   https://openwhisk.ng.bluemix.net/api/v1/namespaces/_/actions/hello_world_package/hello_world_triggerrule?overwrite=true
   ...
   RESPONSE:Got response with code 502
   Resp Headers
   {
     "Connection": [
       "Keep-Alive"
     ],
     "Content-Type": [
       "text/html"
     ],
     "Date": [
       "Thu, 28 Sep 2017 19:29:39 GMT"
     ],
     "Ibm_cloud_functions": [
       "OpenWhisk"
     ],
     "Server": [
       "nginx/1.11.13"
     ],
     "Set-Cookie": [
       "DPJSESSIONID=PBC5YS:-2098699314; Path=/; Domain=.whisk.ng.bluemix.net"
     ],
     "X-Backside-Transport": [
       "FAIL FAIL"
     ],
     "X-Global-Transaction-Id": [
       "89866399"
     ]
   }
   ```
   **502 = BAD GATEWAY???**
   
   full details (verbose) as follows:
   ```
   ./wskdeploy -m docs/examples/manifest_hello_world_triggerrule_unbound.yaml -d docs/examples/deployment_hello_world_triggerrule_bindings.yaml -v
   [/deployers.NewWhiskConfig]:229:[Inf] The API host is openwhisk.ng.bluemix.net, from .wskprops.
   [/deployers.NewWhiskConfig]:233:[Inf] The auth key is set, from .wskprops.
   [/deployers.NewWhiskConfig]:237:[Inf] The namespace is _, from .wskprops.
   [client-go/whisk.NewClient]:104:[Inf] Disabling certificate checking.
   [ploy/utils.ParseOpenWhisk]:488:[Inf] Start to unmarshal Openwhisk info from local values.
   WARNING: using package inside of manifest file will soon be deprecated, please use packages instead.
   Checking key place
   Checking key children
   Checking key height
   Checking key name
   [ceDeployer).createPackage]:472:[Inf] Deploying package hello_world_package ...[k.(*Client).addAuthHeader]:235:[Inf] Adding basic auth header; using authkey
   REQUEST:
   [PUT]	https://openwhisk.ng.bluemix.net/api/v1/namespaces/_/packages/hello_world_package?overwrite=true
   Req Headers
   {
     "Authorization": [
       "Basic MmRhODZhNzktOTBlZC00ZTE2LTg0NzctYzgxNTRhYzQyYTg2OmtmM3JqazBNVnNnT1FjbkdYWkRvbGJ1Z0Zpamkwc3RvN0FxckhuQm15eEJXY3NqSm1UVGdrd09WazZYZWhSOFM="
     ],
     "Content-Type": [
       "application/json"
     ]
   }
   Req Body
   {{"name":"hello_world_package","publish":false}
   }
   [ent-go/whisk.(*Client).Do]:298:[Inf] Req Body (ASCII quoted string):
   {"{\"name\":\"hello_world_package\",\"publish\":false}\n"}
   RESPONSE:Got response with code 200
   Resp Headers
   {
     "Access-Control-Allow-Headers": [
       "Authorization, Content-Type"
     ],
     "Access-Control-Allow-Origin": [
       "*"
     ],
     "Connection": [
       "Keep-Alive"
     ],
     "Content-Type": [
       "application/json"
     ],
     "Date": [
       "Thu, 28 Sep 2017 19:29:39 GMT"
     ],
     "Ibm_cloud_functions": [
       "OpenWhisk"
     ],
     "Server": [
       "nginx/1.11.13"
     ],
     "Set-Cookie": [
       "DPJSESSIONID=PBC5YS:1663067204; Path=/; Domain=.whisk.ng.bluemix.net"
     ],
     "X-Backside-Transport": [
       "OK OK"
     ],
     "X-Global-Transaction-Id": [
       "1411169915"
     ]
   }
   Response body size is 149 bytes
   Response body received:
   {"name":"hello_world_package","binding":{},"publish":false,"annotations":[],"version":"0.0.24","parameters":[],"namespace":"mrutkows@us.ibm.com_dev"}
   [ent-go/whisk.(*Client).Do]:341:[Inf] Response body received (ASCII quoted string):
   "{\"name\":\"hello_world_package\",\"binding\":{},\"publish\":false,\"annotations\":[],\"version\":\"0.0.24\",\"parameters\":[],\"namespace\":\"mrutkows@us.ibm.com_dev\"}"
   [k.IsResponseResultSuccess]:550:[Wrn] IsResponseResultSuccess: failed to parse response result: <nil>
   [hisk.parseSuccessResponse]:475:[Inf] Parsing HTTP response into struct type: **whisk.Package
   [hisk.parseSuccessResponse]:484:[Inf] Successful parse of HTTP response into struct type: **whisk.Package
   [ceDeployer).createPackage]:483:[Inf] Package hello_world_package has been successfully deployed.
   [iceDeployer).createAction]:615:[Inf] Deploying action hello_world_package/hello_world_triggerrule ...[k.(*ActionService).Insert]:205:[Inf] Action insert route: actions/hello_world_package/hello_world_triggerrule?overwrite=true
   [k.(*Client).addAuthHeader]:235:[Inf] Adding basic auth header; using authkey
   REQUEST:
   [PUT]	https://openwhisk.ng.bluemix.net/api/v1/namespaces/_/actions/hello_world_package/hello_world_triggerrule?overwrite=true
   Req Headers
   {
     "Authorization": [
       "Basic MmRhODZhNzktOTBlZC00ZTE2LTg0NzctYzgxNTRhYzQyYTg2OmtmM3JqazBNVnNnT1FjbkdYWkRvbGJ1Z0Zpamkwc3RvN0FxckhuQm15eEJXY3NqSm1UVGdrd09WazZYZWhSOFM="
     ],
     "Content-Type": [
       "application/json"
     ]
   }
   Req Body
   {{"name":"hello_world_package/hello_world_triggerrule","exec":{"kind":"nodejs:6","code":"// Licensed to the Apache Software Foundation (ASF) under one or more contributor\n// license agreements; and to You under the Apache License, Version 2.0.\n\n/*\n * Hello, world. Plus more\n */\nfunction main(params) {\n    msg = \"Hello, \" + params.name + \" from \" + params.place;\n    family = \"You have \" + params.children + \" children \";\n    stats = \"and are \" + params.height + \" m. tall.\";\n    return { greeting:  msg, details: family + stats };\n}\n"},"parameters":[{"key":"name","value":""},{"key":"place","value":""},{"key":"children","value":0},{"key":"height","value":0}],"publish":false}
   }
   [ent-go/whisk.(*Client).Do]:298:[Inf] Req Body (ASCII quoted string):
   {"{\"name\":\"hello_world_package/hello_world_triggerrule\",\"exec\":{\"kind\":\"nodejs:6\",\"code\":\"// Licensed to the Apache Software Foundation (ASF) under one or more contributor\\n// license agreements; and to You under the Apache License, Version 2.0.\\n\\n/*\\n * Hello, world. Plus more\\n */\\nfunction main(params) {\\n    msg = \\\"Hello, \\\" + params.name + \\\" from \\\" + params.place;\\n    family = \\\"You have \\\" + params.children + \\\" children \\\";\\n    stats = \\\"and are \\\" + params.height + \\\" m. tall.\\\";\\n    return { greeting:  msg, details: family + stats };\\n}\\n\"},\"parameters\":[{\"key\":\"name\",\"value\":\"\"},{\"key\":\"place\",\"value\":\"\"},{\"key\":\"children\",\"value\":0},{\"key\":\"height\",\"value\":0}],\"publish\":false}\n"}
   RESPONSE:Got response with code 502
   Resp Headers
   {
     "Connection": [
       "Keep-Alive"
     ],
     "Content-Type": [
       "text/html"
     ],
     "Date": [
       "Thu, 28 Sep 2017 19:29:39 GMT"
     ],
     "Ibm_cloud_functions": [
       "OpenWhisk"
     ],
     "Server": [
       "nginx/1.11.13"
     ],
     "Set-Cookie": [
       "DPJSESSIONID=PBC5YS:-2098699314; Path=/; Domain=.whisk.ng.bluemix.net"
     ],
     "X-Backside-Transport": [
       "FAIL FAIL"
     ],
     "X-Global-Transaction-Id": [
       "89866399"
     ]
   }
   Response body size is 174 bytes
   Response body received:
   <html>
   <head><title>502 Bad Gateway</title></head>
   <body bgcolor="white">
   <center><h1>502 Bad Gateway</h1></center>
   <hr><center>nginx/1.11.13</center>
   </body>
   </html>
   
   [ent-go/whisk.(*Client).Do]:341:[Inf] Response body received (ASCII quoted string):
   "<html>\r\n<head><title>502 Bad Gateway</title></head>\r\n<body bgcolor=\"white\">\r\n<center><h1>502 Bad Gateway</h1></center>\r\n<hr><center>nginx/1.11.13</center>\r\n</body>\r\n</html>\r\n"
   [/whisk.parseErrorResponse]:410:[Inf] HTTP failure 502 + body
   [/whisk.parseErrorResponse]:428:[Err] HTTP response with unexpected body failed due to contents parsing error: 'invalid character '<' looking for beginning of value'
   [k.(*ActionService).Insert]:220:[Err] s.client.Do() error - HTTP req https://openwhisk.ng.bluemix.net/api/v1/namespaces/_/actions/hello_world_package/hello_world_triggerrule?overwrite=true; error 'The connection failed, or timed out. (HTTP status code 502)'
   [iceDeployer).createAction]:622:[Err] Got error creating package with error message: The connection failed, or timed out. (HTTP status code 502) and error code: 246.
   [(*ServiceDeployer).Deploy]:242:[Err] Deployment did not complete sucessfully. Run `wskdeploy undeploy` to remove partially deployed assets.
   Error: /Users/Matt/go/src/github.com/apache/incubator-openwhisk-wskdeploy/deployers/servicedeployer.go [623]: OpenWhisk Client Error =====> The connection failed, or timed out. (HTTP status code 502) Error code: 246.
   
   Usage:
     wskdeploy [flags]
     wskdeploy [command]
   
   Available Commands:
     add         Add an action, feed, trigger or rule to the manifest
     help        Help about any command
     init        Init helps you create a manifest file on OpenWhisk
     publish     Publish a package to a registry
     report      Returns summary of what's been deployed on OpenWhisk in specific namespace
     undeploy    Undeploy assets from OpenWhisk
     version     Print the version number of openwhisk-wskdeploy
   
   Flags:
     -a, --allow-defaults       allow defaults
     -i, --allow-interactive    allow interactive prompts
         --apihost string       whisk API HOST
         --apiversion VERSION   whisk API VERSION
     -u, --auth KEY             authorization KEY
         --config string        config file (default is $HOME/.wskprops)
     -d, --deployment string    path to deployment file
     -h, --help                 help for wskdeploy
     -m, --manifest string      path to manifest file
     -n, --namespace string     namespace
     -p, --pathpath string      path to serverless project (default ".")
     -s, --strict               allow user defined runtime version
     -t, --toggle               Help message for toggle
     -v, --verbose              verbose output
   
   Use "wskdeploy [command] --help" for more information about a command.
   
   Error: /Users/Matt/go/src/github.com/apache/incubator-openwhisk-wskdeploy/deployers/servicedeployer.go [623]: OpenWhisk Client Error =====> The connection failed, or timed out. (HTTP status code 502) Error code: 246.
   
   ```
 
----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services