faust icon indicating copy to clipboard operation
faust copied to clipboard

Using debugging mode inside a container is impossible because the console host is not parametrized

Open heolin opened this issue 2 years ago • 0 comments

Version: v0.10.21

Using debugging mode inside a container is impossible because the console host is not parametrized. Faust CLI allows specifying aiomonitor console port using the --console-port parameter. Unfortunately, since "console-host" is not available, it's using the default host address specified in aiomonitor, which is 127.0.0.1. This problem affects both configurations that are using docker containers and Kubernetes setup. Changing it manually in aiomonitor source code to 0.0.0.0 solved the issue both in Docker and Kubernetes.

Steps to reproduce

  • Run a Faust worker from within a docker container with the --debug parameter enabled.
  • In the console output, you will see a Starting console at 127.0.0.1:50101 message instead of localhost.
  • Accessing the debugging console from outside the container is impossible.

Expected behavior

  • Add parameter --console-host which will override the default host address
    As I understand this means:
  • Adding the console_host variable to the Worker class in the mode library (https://github.com/faust-streaming/mode/blob/master/mode/worker.py#L351).
  • Updating Worker class in faust accordingly (https://github.com/faust-streaming/faust/blob/master/faust/worker.py#L228)
  • And updating CLI (https://github.com/faust-streaming/faust/blob/master/faust/cli/base.py#L158)

Actual behavior

  • aiomonitor console is running on the default host address: 127.0.0.1.

heolin avatar Dec 19 '23 12:12 heolin