Troubleshooting
Diagnosis notebooks for each cloud platform are available to help troubleshoot your SAT setup.
To run the appropriate diagnostic notebook:
- Navigate to Workspace → Applications → SAT → files → notebooks → diagnosis folder
- Open and run the notebook corresponding to your cloud provider.
- SAT AWS troubleshooting notebook
- SAT Azure troubleshooting notebook
- SAT GCP troubleshooting notebook
Misconfigured Secrets
-
Error:
Secret does not exist with scope: sat_scope and key: sat_tokens
-
Resolution:
Check if the tokens are configured with the correct names by listing and comparing with the configuration.
databricks --profile e2-sat secrets list-secrets sat_scope
Firewall Blocking Databricks Accounts Console
-
Error:
Traceback (most recent call last):
File "/databricks/python/lib/python3.8/site-packages/urllib3/connectionpool.py", line 670, in urlopen
httplib_response = self._make_request(
File "/databricks/python/lib/python3.8/site-packages/urllib3/connectionpool.py", line 381, in _make_request
self._validate_conn(conn)
File "/databricks/python/lib/python3.8/site-packages/urllib3/connectionpool.py", line 978, in _validate_conn
conn.connect()
File "/databricks/python/lib/python3.8/site-packages/urllib3/connection.py", line 362, in connect
self.sock = ssl_wrap_socket(
File "/databricks/python/lib/python3.8/site-packages/urllib3/util/ssl_.py", line 386, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "/usr/lib/python3.8/ssl.py", line 500, in wrap_socket
return self.sslsocket_class._create(
File "/usr/lib/python3.8/ssl.py", line 1040, in _create
self.do_handshake()
File "/usr/lib/python3.8/ssl.py", line 1309, in do_handshake
self._sslobj.do_handshake()
ConnectionResetError: [Errno 104] Connection reset by peer
During handling of the above exception, another exception occurred: -
Resolution:
Run this following command in your notebook:
%sh
curl -X GET -H "Authorization: Basic /<base64 of userid:password/>" -H "Content-Type: application/json" https://accounts.cloud.databricks.com/api/2.0/accounts/<account_id>/workspacesor
%sh
curl -u 'user:password' -X GET "Content-Type: application/json" https://accounts.cloud.databricks.com/api/2.0/accounts/<account_id>/workspacesIf you don’t see a JSON with a clean listing of workspaces, you are likely having a firewall issue that is blocking calls to the accounts console. Please have your infrastructure team add
accounts.cloud.databricks.com
to the allow-list. Ensure that the private IPv4 address from the NAT gateway is added to the IP allow list.
Offline Library Install (In case of No PyPI access)
-
Steps:
-
Download the
dbl_sat_sdk
version specified in the notebooknotebooks/utils/initialize
from PyPi:https://pypi.org/project/dbl-sat-sdk/
-
Upload the
dbl_sat_sdk-w.x.y-py3-none-any.whl
to adbfs
location. You can use thedatabricks-cli
as one mechanism to upload. For example:databricks --profile e2-satfs cp /localdrive/whlfile/dbl_sat_sdk-w.x.y-py3-none-any.whl dbfs:/FileStore/wheels/
-
Additionally, download the following wheel files and upload them to the
dbfs
location as above:https://github.com/databricks-industry-solutions/security-analysis-tool/tree/main/docs/wheels
-
Upload all wheel files to
/FileStore/wheels
in your workspace. -
Verify all files are there by running:
%fs ls /FileStore/wheels
-
Then change the cell in your notebook
install_sat_sdk
to this:%pip install cachetools --find-links /dbfs/FileStore/wheels/cachetools-5.3.1-py3-none-any.whl
%pip install pyasn1 --find-links /dbfs/FileStore/wheels/pyasn1-0.5.0-py2.py3-none-any.whl
%pip install pyasn1-modules --find-links /dbfs/FileStore/wheels/pyasn1_modules-0.3.0-py2.py3-none-any.whl
%pip install rsa --find-links /dbfs/FileStore/wheels/rsa-4.9-py3-none-any.whl
%pip install google-auth --find-links /dbfs/FileStore/wheels/google_auth-2.22.0-py2.py3-none-any.whl
%pip install PyJWT[crypto] --find-links /dbfs/FileStore/wheels/PyJWT-2.8.0-py3-none-any.whl
%pip install msal --find-links /dbfs/FileStore/wheels/msal-1.22.0-py2.py3-none-any.whl
%pip install dbl-sat-sdk==0.1.37 --find-links /dbfs/FileStore/wheels/dbl_sat_sdk-0.1.37-py3-none-any.whl -
Make sure the versions for the above libraries match.
-