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/08/02 18:26:39 UTC

[GitHub] hsane2001 opened a new issue #2562: Timeout errors with openwhisk actions trying to go on outside network

hsane2001 opened a new issue #2562: Timeout errors with openwhisk actions trying to go on outside network
URL: https://github.com/apache/incubator-openwhisk/issues/2562
 
 
   <!--
   Do NOT share passwords, credentials or other confidential information.
   
   Before creating a new issue, please check if there is one already open that
   fits the defect you are reporting.
   If you open an issue and realize later it is a duplicate of a pre-existing
   open issue, please close yours and add a comment to the other.
   
   Issues can be created for either defects or enhancement requests. If you are a committer than please add the labels "bug" or "feature". If you are not a committer please make clear in the comments which one it is, so that committers can add these labels later.
   
   If you are reporting a defect, please edit the issue description to include the
   information shown below.
   
   If you are reporting an enhancement request, please include information on what you are trying to achieve and why that enhancement would help you.
   
   For more information about reporting issues, see
   https://github.com/apache/incubator-openwhisk/blob/master/CONTRIBUTING.md#raising-issues
   
   Use the commands below to provide key information from your environment:
   You do not have to include this information if this is a feature request.
   -->
   
   ## Environment details:
   
   * Native ubuntu 
   * Docker version 1.12.0, build 8eab29e, Ubuntu 16.04
   * System is behind a company proxy
   * Openwhisk iinstall completed by adding proxy ENV in containers and unsetting them after the build ( for apt/npm) etc.
   
   ## Steps to reproduce the issue:
   Steps are from "https://console.bluemix.net/docs/openwhisk/openwhisk_weather.html#openwhisk_catalog_weather"
   1.   wsk package bind /whisk.system/weather myWeather -p username MYUSERNAME -p password MYPASSWORD - Works correctly
   2.   wsk action invoke myWeather/forecast --result --param latitude 43.7 --param longitude -79.4 results in a timeout
   Activation log:
   Activation: forecast (bb4d9afde9e1426ca4034d98a0f90537)
   [
       "2017-08-02T10:54:04.617687656Z stdout: input params: { bluemixServiceName: 'weatherinsights',",
       "2017-08-02T10:54:04.617727508Z stdout: latitude: 43.7,",
       "2017-08-02T10:54:04.61773564Z  stdout: username: 'hsane',",
       "2017-08-02T10:54:04.617742099Z stdout: longitude: -79.4,",
       "2017-08-02T10:54:04.617748206Z stdout: password: 'wskdbpass' }",
       "2017-08-02T10:54:04.617754728Z stdout: url: https://twcservice.mybluemix.net/api/weather/v1/geocode/43.7/-79.4/forecast/daily/10day.json",
       "2017-08-02T10:54:34.652217857Z stdout: error getting forecast",
       "2017-08-02T10:54:34.65225229Z  stdout: http status code: undefined",
       "2017-08-02T10:54:34.652610554Z stdout: error: { Error: ETIMEDOUT",
       "2017-08-02T10:54:34.65263307Z  stdout: at Timeout._onTimeout (/nodejsAction/node_modules/request/request.js:813:19)",
       "2017-08-02T10:54:34.652640901Z stdout: at ontimeout (timers.js:365:14)",
       "2017-08-02T10:54:34.652646972Z stdout: at tryOnTimeout (timers.js:237:5)",
       "2017-08-02T10:54:34.652652872Z stdout: at Timer.listOnTimeout (timers.js:207:5) code: 'ETIMEDOUT', connect: true }",
       "2017-08-02T10:54:34.652659183Z stdout: body: undefined"
   
   
   ## Provide the expected results and outputs:
   
   ```
   {
       "forecasts": [
           {
               "dow": "Wednesday",
               "max_temp": -1,
               "min_temp": -16,
               "narrative": "Chance of a few snow showers. Highs -2 to 0C and lows -17 to -15C.",
               ...
           },
           {
               "class": "fod_long_range_daily",
               "dow": "Thursday",
               "max_temp": -4,
               "min_temp": -8,
               "narrative": "Mostly sunny. Highs -5 to -3C and lows -9 to -7C.",
               ...
           },
           ...
       ],
   }
   ```
   
   
   ## Provide the actual results and outputs:
   
   ```
   [mmands.parseQualifiedName]:125:[Inf] Qualified pkg+entity (EntityName): myWeather/forecast
   [mmands.parseQualifiedName]:126:[Inf] Qualified namespace: _
   [mmands.parseQualifiedName]:127:[Inf] Qualified package: myWeather
   [mmands.parseQualifiedName]:128:[Inf] Qualified entity: forecast
   [mmands.getJSONFromStrings]:180:[Inf] Convert content to JSON: []string{"{\"latitude\": 43.7}", "{\"longitude\": -79.4}"}
   [mmands.getJSONFromStrings]:190:[Inf] Created map 'map[latitude:43.7]' from '{"latitude": 43.7}'
   [mmands.getJSONFromStrings]:190:[Inf] Created map 'map[latitude:43.7 longitude:-79.4]' from '{"longitude": -79.4}'
   [k.(*ActionService).Invoke]:243:[Inf] HTTP route: actions/myWeather/forecast?blocking=true&result=true
   [k.(*Client).addAuthHeader]:203:[Inf] Adding basic auth header; using authkey
   REQUEST:
   [POST]  http://10.23.233.114:10001/api/v1/namespaces/_/actions/myWeather/forecast?blocking=true&result=true
   Req Headers
   {
     "Authorization": [
       "Basic MjNiYzQ2YjEtNzFmNi00ZWQ1LThjNTQtODE2YWE0ZjhjNTAyOjEyM3pPM3haQ0xyTU42djJCS0sxZFhZRnBYbFBrY2NPRnFtMTJDZEFzTWdSVTRWck5aOWx5R1ZDR3VNREdJd1A="
     ],
     "Content-Type": [
       "application/json"
     ]
   }
   Req Body
   {{"latitude":43.7,"longitude":-79.4}
   }
   [-whisk/whisk.(*Client).Do]:233:[Inf] Req Body (ASCII quoted string):
   {"{\"latitude\":43.7,\"longitude\":-79.4}\n"}
   }
   [-whisk/whisk.(*Client).Do]:233:[Inf] Req Body (ASCII quoted string):
   {"{\"latitude\":43.7,\"longitude\":-79.4}\n"}
   RESPONSE:Got response with code 502
   Resp Headers
   {
     "Access-Control-Allow-Headers": [
       "Authorization, Content-Type"
     ],
     "Access-Control-Allow-Origin": [
       "*"
     ],
     "Content-Length": [
       "90"
     ],
     "Content-Type": [
       "application/json; charset=UTF-8"
     ],
     "Date": [
       "Wed, 02 Aug 2017 11:03:46 GMT"
     ],
     "Server": [
       "spray-can/1.3.4"
     ]
   }
   Response body size is 90 bytes
   Response body received:
   {
     "error": {
       "error": {
         "code": "ETIMEDOUT",
         "connect": true
       }
     }
   }
   [-whisk/whisk.(*Client).Do]:262:[Inf] Response body received (ASCII quoted string):
   "{\n  \"error\": {\n    \"error\": {\n      \"code\": \"ETIMEDOUT\",\n      \"connect\": true\n    }\n  }\n}"
   [/whisk.parseErrorResponse]:334:[Inf] HTTP failure 502 + body
   [isk.parseApplicationError]:360:[Inf] Parsing application error
   [isk.parseApplicationError]:381:[Inf] Error code is null, blocking with result invocation error has occured
   [isk.parseApplicationError]:383:[Inf] Application error received: map[error:map[code:ETIMEDOUT connect:true]]
   [hisk.parseSuccessResponse]:399:[Inf] Parsing HTTP response into struct type: *map[string]interface {}
   [hisk.parseSuccessResponse]:408:[Inf] Successful parse of HTTP response into struct type: *map[string]interface {}
   [k.(*ActionService).Invoke]:258:[Err] s.client.Do() error - HTTP req http://10.23.233.114:10001/api/v1/namespaces/_/actions/myWeather/forecast?blocking=true&result=true; error 'map[error:map[code:ETIMEDOUT connect:true]]'
   {
       "error": {
           "error": {
               "code": "ETIMEDOUT",
               "connect": true
           }
       }
   }
   [main.main                ]:068:[Inf] err object type: *whisk.WskError
   [main.main                ]:072:[Err] Got a *whisk.WskError error: &whisk.WskError{RootErr:(*errors.errorString)(0xc4202b2950), ExitCode:246, DisplayMsg:false, MsgDisplayed:false, DisplayUsage:false, DisplayPrefix:true, ApplicationError:true, TimedOut:false}
   
   ```
   
   ## Additional information you deem important:
   * issue always happens probably because of proxy
   * If I set proxy in the native ENV bash file the result from the wsk action comes back as:
   wsk action invoke myWeather/forecast --result --param latitude 43.7 --param longitude -79.4 -v -d --blocking                                          [mmands.parseQualifiedName]:125:[Inf] Qualified pkg+entity (EntityName): myWeather/forecast
   [mmands.parseQualifiedName]:126:[Inf] Qualified namespace: _
   [mmands.parseQualifiedName]:127:[Inf] Qualified package: myWeather
   [mmands.parseQualifiedName]:128:[Inf] Qualified entity: forecast
   [mmands.getJSONFromStrings]:180:[Inf] Convert content to JSON: []string{"{\"latitude\": 43.7}", "{\"longitude\": -79.4}"}
   [mmands.getJSONFromStrings]:190:[Inf] Created map 'map[latitude:43.7]' from '{"latitude": 43.7}'
   [mmands.getJSONFromStrings]:190:[Inf] Created map 'map[latitude:43.7 longitude:-79.4]' from '{"longitude": -79.4}'
   [k.(*ActionService).Invoke]:243:[Inf] HTTP route: actions/myWeather/forecast?blocking=true&result=true
   [k.(*Client).addAuthHeader]:203:[Inf] Adding basic auth header; using authkey
   REQUEST:
   [POST]  http://10.23.233.114:10001/api/v1/namespaces/_/actions/myWeather/forecast?blocking=true&result=true
   Req Headers
   {
     "Authorization": [
       "Basic MjNiYzQ2YjEtNzFmNi00ZWQ1LThjNTQtODE2YWE0ZjhjNTAyOjEyM3pPM3haQ0xyTU42djJCS0sxZFhZRnBYbFBrY2NPRnFtMTJDZEFzTWdSVTRWck5aOWx5R1ZDR3VNREdJd1A="
     ],
     "Content-Type": [
       "application/json"
     ]
   }
   Req Body
   {{"latitude":43.7,"longitude":-79.4}
   }
   [-whisk/whisk.(*Client).Do]:233:[Inf] Req Body (ASCII quoted string):
   {"{\"latitude\":43.7,\"longitude\":-79.4}\n"}
   RESPONSE:Got response with code 503
   Resp Headers
   {
     "Cache-Control": [
       "no-cache"
     ],
     "Connection": [
       "Keep-Alive"
     ],
     "Content-Length": [
       "787"
     ],
     "Content-Type": [
       "text/html; charset=utf-8"
     ],
     "Pragma": [
       "no-cache"
     ],
     "Proxy-Connection": [
       "Keep-Alive"
     ]
   }
   Response body size is 787 bytes
   Response body received:
   <HTML><HEAD>
   <TITLE>Network Error</TITLE>
   </HEAD>
   <BODY>
   <FONT face="Helvetica">
   <big><strong></strong></big><BR>
   </FONT>
   <blockquote>
   <TABLE border=0 cellPadding=1 width="80%">
   <TR><TD>
   <FONT face="Helvetica">
   <big>Network Error (tcp_error)</big>
   <BR>
   <BR>
   </FONT>
   </TD></TR>
   <TR><TD>
   <FONT face="Helvetica">
   A communication error occurred: "Operation timed out"
   </FONT>
   </TD></TR>
   <TR><TD>
   <FONT face="Helvetica">
   The Web Server may be down, too busy, or experiencing other problems preventing it from responding to requests. You may wish to try again at a later time.
   </FONT>
   </TD></TR>
   <TR><TD>
   <FONT face="Helvetica" SIZE=2>
   <BR>
   For assistance, contact your network support team.
   </FONT>
   </TD></TR>
   </TABLE>
   </blockquote>
   </FONT>
   </BODY></HTML>
   
   [-whisk/whisk.(*Client).Do]:262:[Inf] Response body received (ASCII quoted string):
   "<HTML><HEAD>\r\n<TITLE>Network Error</TITLE>\r\n</HEAD>\r\n<BODY>\r\n<FONT face=\"Helvetica\">\r\n<big><strong></strong></big><BR>\r\n</FONT>\r\n<blockquote>\r\n<TABLE border=0 cellPadding=1 width=\"80%\">\r\n<TR><TD>\r\n<FONT face=\"Helvetica\">\r\n<big>Network Error (tcp_error)</big>\r\n<BR>\r\n<BR>\r\n</FONT>\r\n</TD></TR>\r\n<TR><TD>\r\n<FONT face=\"Helvetica\">\r\nA communication error occurred: \"Operation timed out\"\r\n</FONT>\r\n</TD></TR>\r\n<TR><TD>\r\n<FONT face=\"Helvetica\">\r\nThe Web Server may be down, too busy, or experiencing other problems preventing it from responding to requests. You may wish to try again at a later time.\r\n</FONT>\r\n</TD></TR>\r\n<TR><TD>\r\n<FONT face=\"Helvetica\" SIZE=2>\r\n<BR>\r\nFor assistance, contact your network support team.\r\n</FONT>\r\n</TD></TR>\r\n</TABLE>\r\n</blockquote>\r\n</FONT>\r\n</BODY></HTML>\r\n"
   [/whisk.parseErrorResponse]:334:[Inf] HTTP failure 503 + body
   [/whisk.parseErrorResponse]:352:[Err] HTTP response with unexpected body failed due to contents parsing error: 'invalid character '<' looking for beginning of value'
   [k.(*ActionService).Invoke]:258:[Err] s.client.Do() error - HTTP req http://10.23.233.114:10001/api/v1/namespaces/_/actions/myWeather/forecast?blocking=true&result=true; error 'The connection failed, or timed out. (HTTP status code 503)'
   [nds.handleInvocationError]:695:[Err] client.Actions.Invoke(myWeather/forecast, map[latitude:43.7 longitude:-79.4], true) error: The connection failed, or timed out. (HTTP status code 503)
   [main.main                ]:068:[Inf] err object type: *whisk.WskError
   [main.main                ]:072:[Err] Got a *whisk.WskError error: &whisk.WskError{RootErr:(*errors.errorString)(0xc42027f5f0), ExitCode:247, DisplayMsg:true, MsgDisplayed:false, DisplayUsage:true, DisplayPrefix:true, ApplicationError:false, TimedOut:false}
   error: Unable to invoke action 'myWeather/forecast': The connection failed, or timed out. (HTTP status code 503)
   
 
----------------------------------------------------------------
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