You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2020/04/20 18:34:30 UTC

[GitHub] [openwhisk-wskdebug] alexkli opened a new issue #59: detect if debug port is already used, e.g. by left over container

alexkli opened a new issue #59:
URL: https://github.com/apache/openwhisk-wskdebug/issues/59


   If the debug port is already used on the system, the container start will fail and `wskdebug` will output a not-so-helpful error message:
   
   ```
   Error: Command failed: docker run -d --name wskdebug-dump-1587406223576 --rm -m 268435456 -p 8080 -p 9229:9229 -e DEBUG='wskdebug' adobeapiplatform/adobe-action-nodejs-v10:3.0.21 node --expose-gc --inspect=0.0.0.0:9229 app.js 
   ```
   
   This can actually be caused by `wskdebug` itself if a previous run failed to properly shutdown the container.
   
   A better error message and even handling would be possible:
   
   1. (basic) check if the port is already in use on the local system before starting the container and if yes, show an error message "debug port 1234 already in use"
   2. (nicer) if positive, check if a docker container from wskdebug is the one with the open port:
   
      1. we should add the fully qualified action name as a [label on the container](https://docs.docker.com/engine/reference/commandline/run/#set-metadata-on-container--l---label---label-file): `wskdebug-action=/namespace/package/action`
   
      2. if it's the same action then log a note, kill it and proceed
      3. if it's another action, print a clear error message "debug port 1234 already in use by another wskdebug for action xyz"
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [openwhisk-wskdebug] alexkli commented on issue #59: detect if debug port is already used, e.g. by left over container

Posted by GitBox <gi...@apache.org>.
alexkli commented on issue #59:
URL: https://github.com/apache/openwhisk-wskdebug/issues/59#issuecomment-659217182


   This happens constantly in VS Code for me, apparently upon stopping debugging it kills the process hard and immediately, so it has no chance to cleanup.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [openwhisk-wskdebug] alexkli closed issue #59: detect if debug port is already used, e.g. by left over container

Posted by GitBox <gi...@apache.org>.
alexkli closed issue #59:
URL: https://github.com/apache/openwhisk-wskdebug/issues/59


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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