Just getting started with AGOL Notebooks. Working through the example for detecting broken links. It works great for resources on our AGOL site, but request() fails when attempting to access feature services provided by ArcServer 10.7.1 on an AWS platform.
The AWS Server is a one-off, not running webadaptor - HTTPS GIS traffic goes to port 6443. The security certificate is current and valid for the host name. Entering the URL directly in a browser loads the ArcGIS REST Services Directory page and shows it as secure.
Running python2.7 directly on a PC, this request succeeds, although it warns of an insecure request.
In the AGOL Notebook setting, the request eventually fails with a timeout error.
ConnectionError: HTTPSConnectionPool(host='arc.g****r.net', port=6443): Max retries exceeded with url: /arcgis/rest/services/OperationalLayers/PCII/FeatureServer/0 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f3c1b51e630>: Failed to establish a new connection: [Errno 110] Connection timed out',))
Update: Current hypothesis is there are outbound rules blocking on arcgis.com. Sample notebook for requests only work on arcgis.com domain/subdomain - timeout errors otherwise. Sample notebook for notification does not send on a range of smtp servers.
If I download these sample notebooks to my PC, run them with the jupyter-notebook.exe installed with arcgis pro, and change arcgis('Home') to point to our AGOL site - they both work.
Convenient to have notebooks as part of AGOL, but kind of broken if they can't do requests or email.
An additional note. Using requests to detect broken links is somewhat flawed. It operates on the notion that a good link will return 200 and a bad one 404- unreachable. Map links are commonly "broken" by updating a map or tiles., In this case, the webmap will not load, but the link will return 200 as valid, with a message from the services directory that the service is not available.