Select to view content in your preferred language

Notebook Server cannot communicate outside the container

414
2
01-25-2024 02:33 AM
StefanUseldinger
Frequent Contributor

We installed and configured NBS on a Ubuntu 22.04.3 LTS (GNU/Linux 5.15.0-91-generic x86_64) and try to communicate with our Portal.

First, we received the common error "Temporary failure in name resolution" which was fixed by adding the dockerExtraHosts

But after that, we received a timeout. We tried:

 

from arcgis.gis import GIS
gis = GIS(".../portal")
import requests
res = requests.get('https://...')

 

and received:

ConnectionError: HTTPSConnectionPool(host='...', port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fece4dedd00>: Failed to establish a new connection: [Errno 110] Connection timed out'))

 

I saw that the docker containers being launched communicate via the bridge docker namespace/network. I connected myself to the container. Inside the container, curl requests failed, too. I checked iptables but did not see any blocking rules.

Do You have a clue how I can make NBS communicate with our Portal?

 

========================================================================
ArcGIS Notebook Server 11.2 Diagnostic Tool

Hostname: UBU-ARCGIS-NS
========================================================================

DIAG000: Check for installation as root [PASSED]
DIAG001: Check for 64-bit architecture [PASSED]
DIAG002: Check OS version [PASSED]
DIAG003: Check hostname for invalid characters [PASSED]
DIAG024: Check /etc/hosts for hostname entry [PASSED]
DIAG004: Check installed packages [PASSED]
DIAG028: Check for valid Docker install [PASSED]
DIAG005: Check system limits [PASSED]
DIAG009: Check HTTPS port [PASSED]
DIAG029: Check /var disk space [PASSED]
DIAG020: Check hostname IP address mismatches [PASSED]
DIAG026: Check ArcGIS Notebook Server core services [PASSED]

------------------------------------------------------------------------
There were 0 failure(s) and 0 warning(s) found:

0 Kudos
2 Replies
hehuiz2007
New Contributor

Hi, did you fix your issue now?

We had similar issue in ArcGIS Notebook Server 11.1 which sitting in AWS EC2 instance with Ubuntu 22.04.6.

After a few tests with ESRI support team and our internal Docker specialist and AWS support team, we found out the container is using bridge network and can only working with the FQDN which is accessible from public, or IP address in our case.

We also tried to run "docker run --net=host" command to launch a new ESRI notebook container, and the container working fine with curl requests for both internal and external urls. But we could not find a way in ArcGIS Notebook Server 11.1 to change the network for the docker container. 

0 Kudos
StefanUseldinger
Frequent Contributor

In my case, the software configuration management tool of my IT department ("Puppet") reset the firewall rules regularly that were set by docker when the deamon was started. Adding the specific docker rules to the tool config solved the problem and the bridge network communication started to work.

0 Kudos