#Dagger behind proxy: malformed HTTP status code \"protocol\"

1 messages · Page 1 of 1 (latest)

coral trench
#

I'm doing an RnD experiment and trying to set up dagger behind mitmproxy. I exported HTTP_PROXY and HTTPS_PROXY, added the CA cert to /etc/ssl/certs, now apt, curl and other utilities seem to be working. However, if I try to fire up dagger-anything, e.g. dagger run uptime, I'm getting this weird error message:

/ # dagger run uptime
✘ connect 0.0s
! start engine: no fallback container found
  ✘ starting engine 0.0s
  ! no fallback container found

14:44:50 WRN failed to resolve image; falling back to leftover engine error="Get \"https://registry.dagger.io/v2/\": malformed HTTP status code \"protocol\""
14:44:50 WRN failed to list containers error="exec: \"docker\": executable file not found in $PATH"
Error: start engine: no fallback container found

I am pretty confident it's got nothing to do with docker, because I can replicate it in a bare alpine:latest OCI container (docker run --rm -it --network host alpine:latest sh) by

  1. installing dagger (the install.sh script)
  2. exporting http_proxy and other similar envs, pointing to my mitmproxy instance on host (note the --network host) and installing the mitmproxy CA cert (IDK if necessary)
  3. running dagger run uptime

If I unset those *_proxy envs, I can get past that error to the point where the lack of docker becomes the problem.

/ # all_proxy= http_proxy= https_proxy= ALL_PROXY= HTTP_PROXY= HTTPS_PROXY= dagger run uptime
✘ connect 1.0s
! start engine: failed to pull image: failed to run command: exec: "docker": executable file not found in $PATH
<...>
14:49:43 WRN failed to list containers error="exec: \"docker\": executable file not found in $PATH"
Error: start engine: failed to pull image: failed to run command: exec: "docker": executable file not found in $PATH
/ # 

Why is this error happening? How do I get around it?

coral trench
#

And now I see this in mitmproxy console:

info: [11:10:01.720][172.17.0.2:45302] client connect 
info: [11:10:01.738][172.17.0.2:45302] 172.17.0.2:45302: HTTP/2 protocol error: Invalid HTTP/2 preamble.             
info: [11:10:01.739][172.17.0.2:45302] client disconnect
info: [11:10:01.752][172.17.0.2:45304] client connect
info: [11:10:01.757][172.17.0.2:45304] 172.17.0.2:45304: HTTP/2 protocol error: Invalid HTTP/2 preamble.
info: [11:10:01.758][172.17.0.2:45304] client disconnect

Yes, repeated twice for each dagger run invocation