Docker+QGC UDP bind issue

I am trying to get the PX4 docker image working and I have everything besides QGC working. When I run sitl in the container, I would expect to be able to connect via port 14556 with QGC (via Comm Links and adding When I try to connect, however, I get Error binding UDP port: The bound address is already in use. I dont have another instance of QGC running so I dont know why it wont bind. Any ideas?

docker run im using:

docker run -it --rm --privileged \
    -w "${SRC_DIR}" \
    -p 14556:14556/udp \
	--volume=${CCACHE_DIR}:${CCACHE_DIR}:rw \
	--volume=${SRC_DIR}:${SRC_DIR}:rw \
    --env="DISPLAY" \
    --env="QT_X11_NO_MITSHM=1" \
    --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
    --name=nuav-container \
	${DOCKER_IMG} /bin/bash

I had an issue with qgc and docker where no matter what it didn’t start the udp mav stream and bind the ports unless the rcs file was amended upon running the docker image. Even if stopping all mavlink instances then starting them on udp. Granted, this is on a Mac which isn’t officially supported so who knows if there is anything else hiding but after I modified the rcs to start the mavlink stream then even if I called a different port, that port would bind but otherwise nothing would. I had to build the docker image that way but only thing that worked for me (and I’m pretty new at docker tbh).

1 Like