-
Notifications
You must be signed in to change notification settings - Fork 7
Description
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:
-
(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"
-
(nicer) if positive, check if a docker container from wskdebug is the one with the open port:
-
we should add the fully qualified action name as a label on the container:
wskdebug-action=/namespace/package/action -
if it's the same action then log a note, kill it and proceed
-
if it's another action, print a clear error message "debug port 1234 already in use by another wskdebug for action xyz"
-