WebODM Dockers can't reach internet

GOOD evening, and thanks for your time!

Summary:

I’ve run into this issue after trying to resolve a ModuleNotFoundError: No module named ‘cv2’ issue while trying to get Elevation Maps on DEM tasks. After trying one specific remedy (linked below) I found that none of my webodm dockers can reach the internet outside of the network.

Details:

How did you install WebODM (docker, installer, etc.)?

Docker hosted on Ubuntu 22.04. Just did a fresh install of WebODM 2.0.1 this afternoon (23.5.3)
ZLpcHZ71

What’s your browser and operating system?

Firefox and Chrome on Windows

What is the problem?

When trying to install cv2 module via apt install or pip from worker or webapp dockers, the docker cannot reach the internet in order to install the module. Also, the module was not installed during initial setup, which I gathered from other issues on git was thought to have been fixed.

How can we reproduce this?

Initially the issue was that the cv2 module is not present when trying to preview or generate elevation lines on a task
LThEQoV1

The plugins are installed and enabled.

I updated from 1.9 to 2.0.1 and did a completely fresh install and still was not able to get this working. When researching the issue, I found a similar issue which discussed manually installing the cv2 modules in the worker docker.
https://github.com/OpenDroneMap/WebODM/issues/1059

Some mentioned that it needed to be installed in the webapp docker. Neither docker is able to run apt or pip due to not being able to reach the internet.


I force quit the pip command because it had been trying to reach the connection for about 3 minutes at this point.

To clarify, I can reach the WebODM service both locally (https://computername:port) and from outside the network with no issues at all. The service works fine and I’ve used it to process several tasks. I just can’t seem to reach the internet from inside the dockers.

Any help or thoughts would be greatly appreciated!

.Carl

1 Like

Thanks for the detailed report!

We just landed a change in how we map ports in Docker, so I’m wondering if this might be a side-effect.

I’ve upstreamed your thread and hopefully we get some clarity soon.

Really appreciate that. Looking forward to finally getting some contours in my scans! xD

I should also note that the docker networking issue is likely an issue with my configuration as I have other dockers with similar issues. It absolutely warps my mind that the dockers can be reached from the internet, but they can’t reach the internet.

I assume though that the docker install was expected to have the cv2 module included? Or maybe it was scripted to use pip to install it when the plugin is enabled. I’m unsure.

Thanks again!

1 Like

Looks like this can’t be replicated by Piero (nor myself), so yeah unfortunately your system seems to be at fault here.

I believe we fetch those modules on demand by design to reduce install size and initial fetch size.

Are you running any firewall rules or anything that might interfere?

Not that I’m aware of. I just checked all of my other dockers and none of them can reach the internet. I’m not sure why. I’ll have to look into it. Thanks for checking it out!

2 Likes

To clarify: when I get internet to the docker system, I should be able to disable then re-enable the contour and elevationmap plugins and it will fetch the CV2 module?

1 Like

Yeah, and you should see some messages related to the plug-ins being enabled and stuff being fetched in the console you start WebODM from.

I know this has strayed from a WebODM issue, but would someone be willing to share what the nameserver address in the /etc/resolv.conf file of their worker and webapp containers for me to compare?

Mine is 127.0.0.11 and I have no idea is this is correct or what it should be. Stumbling through the learning process.

Thanks,