-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[8pt] Whitebox calling URL at runtime #1209
Comments
In some recent fix attempts, the notes from that are: This fix reinstates the whitebox hack where whitebox is downloaded during the initial build of the Docker image so that external calls to download whitebox do not happen each time whitebox is run in |
After a very large of invested time to get it working without live run-time calls to the Whitebox website, a number of things were learned and changed:
Also: Adding an docker run param of Using combinations including calls in our agree dem seem to influence it sometimes, but still had errors: Permissions in the /usr/local/lib/python3.10/dist-packages/whitebox also had impacts. I have a TON of more notes if someone wants them. The riddle... keep trying using one of three options above (or more) |
Dang. Happened again on a random HUC in AWS Step functions. I have a ton of notes on possible fixes. We might have to up the priority on this a little. |
Once again, the whitebox packages is making external calls at runtime which we can not allow. Sure enough, during one of our runs, it randomly failed because of a failed external connection call.
/outputs/fim_bathy_adj_test_11/logs/unit/07120001_unit.log:59:Unexpected error: <class 'urllib.error.URLError'>
/outputs/fim_bathy_adj_test_11/logs/unit/07120001_unit.log:81:ConnectionResetError: [Errno 104] Connection reset by peer
/outputs/fim_bathy_adj_test_11/logs/unit/07120001_unit.log:107: raise URLError(err)
/outputs/fim_bathy_adj_test_11/logs/unit/07120001_unit.log:108:urllib.error.URLError: <urlopen error [Errno 104] Connection reset by peer>
(Note: HUC number not relevant)
More details;
Creating AGREE DEM using 70 meter buffer 07120001 0
Downloading WhiteboxTools pre-compiled binary for first time use ...
Downloading WhiteboxTools binary from https://www.whiteboxgeo.com/WBT_Linux/WhiteboxTools_linux_amd64.zip
Decompressing WhiteboxTools_linux_amd64.zip ...
WhiteboxTools package directory: /usr/local/lib/python3.10/dist-packages/whitebox
Downloading testdata ...
Unexpected error: <class 'urllib.error.URLError'>
Traceback (most recent call last):
File "/usr/lib/python3.10/urllib/request.py", line 1348, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "/usr/lib/python3.10/http/client.py", line 1283, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.10/http/client.py", line 1329, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.10/http/client.py", line 1278, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.10/http/client.py", line 1038, in _send_output
self.send(msg)
File "/usr/lib/python3.10/http/client.py", line 976, in send
self.connect()
File "/usr/lib/python3.10/http/client.py", line 1455, in connect
self.sock = self._context.wrap_socket(self.sock,
File "/usr/lib/python3.10/ssl.py", line 513, in wrap_socket
return self.sslsocket_class._create(
File "/usr/lib/python3.10/ssl.py", line 1100, in _create
self.do_handshake()
File "/usr/lib/python3.10/ssl.py", line 1371, in do_handshake
self._sslobj.do_handshake()
ConnectionResetError: [Errno 104] Connection reset by peer
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/foss_fim/src/agreedem.py", line 321, in
agreedem(
File "/foss_fim/src/agreedem.py", line 51, in agreedem
wbt = whitebox.WhiteboxTools()
File "/usr/local/lib/python3.10/dist-packages/whitebox/whitebox_tools.py", line 307, in init
download_wbt()
File "/usr/local/lib/python3.10/dist-packages/whitebox/whitebox_tools.py", line 253, in download_wbt
urllib.request.urlretrieve(dep_url, os.path.join(work_dir, "DEM.dep"))
File "/usr/lib/python3.10/urllib/request.py", line 241, in urlretrieve
with contextlib.closing(urlopen(url, data)) as fp:
File "/usr/lib/python3.10/urllib/request.py", line 216, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.10/urllib/request.py", line 519, in open
response = self._open(req, data)
File "/usr/lib/python3.10/urllib/request.py", line 536, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "/usr/lib/python3.10/urllib/request.py", line 496, in _call_chain
result = func(*args)
File "/usr/lib/python3.10/urllib/request.py", line 1391, in https_open
return self.do_open(http.client.HTTPSConnection, req,
File "/usr/lib/python3.10/urllib/request.py", line 1351, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 104] Connection reset by peer>
The text was updated successfully, but these errors were encountered: