ApolloX http: invalid Host header


I have a project I have been working on for some time now. Suddenly I’m unable to deploy it to my Verdin development board, I get this error:

Executing task: DOCKER_HOST= docker compose build --pull --build-arg SSHUSERNAME=torizon --build-arg IMAGE_ARCH=arm64 --build-arg SSH_DEBUG_PORT=2224 app-debug 

[+] Building 0.0s (0/0)                                                                                                                                                                                               
http: invalid Host header

I don’t remember changing anything that could have caused this.

docker inside wsl:

Docker version 20.10.24, build 297e128

board info:

Software summary
Bootloader:               U-Boot
Kernel version:           5.15.77-6.2.0+git.aa0ff7e3554e #1-TorizonCore SMP PREE                                       MPT Wed Mar 29 15:33:40 UTC 2023
Kernel command line:      root=LABEL=otaroot rootfstype=ext4 quiet logo.nologo v                                       t.global_cursor_default=0 plymouth.ignore-serial-consoles splash fbcon=map:3 ost                                       ree=/ostree/boot.0/torizon/b527c3cbb0e0b90442786c703f1f71554dc63040f5ae886b4d507                                       503cbf34556/0
Distro name:              NAME="TorizonCore"
Distro version:           VERSION_ID=6.2.0-build.2
Hostname:                 verdin-imx8mp-15007376

Hardware info
HW model:                 Toradex Verdin iMX8M Plus WB on Verdin Development Boa                                       rd
Toradex version:          0058 V1.1A
Serial number:            15007376
Processor arch:           aarch64

Any idea what I can do to fix this?

Greetings @jakub.bm4n,

I recall this was an issue on some versions of Docker as seen on various forums:

Perhaps Docker or something related on your machine got updated since last time you checked. Maybe updating Docker or re-installing will fix things. For reference on my Windows machine I don’t see this issue and I’m on this version:

Docker version 24.0.2, build cb74dfc

Best Regards,

That makes sense, I’m running docker inside WSL but when I try to update docker I get the message that I’m already up to date. So there’s probably another issue somewhere. I’ll look into it.

Oh, you must have installed Docker directly in WSL. I’m using Docker via Docker Desktop, that’s probably why I have a newer/different version. Another thing I’ve seen on forums reporting this issue is that in some cases it seems to have to do with the version of Go and it’s libraries. Perhaps that’s another aspect you could look into.

Best Regards,

I was able to get it running by installing Docker Desktop. It installed the newest version of docker into WSL and that resolved the Host Header error.

I’m running into a new error however but I’ll post that into a separate thread.

Glad I was able to help! I guess it really was just the specific Docker version that was problematic.