Skip to content

Commit 00979c0

Browse files
committed
Documentation: Add guidelines about debugging connectivity problems
Python may have skipped installing its SSL root certificate bundle on macOS. Educate the user about how to improve the situation.
1 parent 6c7359f commit 00979c0

File tree

3 files changed

+60
-0
lines changed

3 files changed

+60
-0
lines changed

README.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,13 @@ Now, run it::
8080
If you would like to run ``crash`` from any directory, and without the leading
8181
``./``, the file has to be in a directory that is on your `PATH`_.
8282

83+
Troubleshooting
84+
===============
85+
86+
The documentation section about `troubleshooting connection errors`_ provides
87+
support and guidelines how to debug and resolve problems when connecting to
88+
`CrateDB`_ or `CrateDB Cloud`_.
89+
8390
Contributing
8491
============
8592

@@ -97,8 +104,11 @@ Looking for more help? Check out our `support channels`_.
97104
.. _command-line interface: https://en.wikipedia.org/wiki/Command-line_interface
98105
.. _contribution docs: CONTRIBUTING.rst
99106
.. _Crate.io: https://crate.io/
107+
.. _CrateDB: https://github.com/crate/crate
108+
.. _CrateDB Cloud: https://console.cratedb.cloud
100109
.. _developer docs: DEVELOP.rst
101110
.. _PATH: https://en.wikipedia.org/wiki/PATH_(variable)
102111
.. _pip: https://pypi.python.org/pypi/pip
103112
.. _CrateDB shell documentation: https://crate.io/docs/crate/crash/
104113
.. _support channels: https://crate.io/support/
114+
.. _troubleshooting connection errors: https://cratedb.com/docs/crate/crash/en/latest/troubleshooting.html

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ The CrateDB Shell (aka *Crash*) is an interactive `command-line interface`_
3030
getting-started
3131
run
3232
commands
33+
troubleshooting
3334
appendices/index
3435

3536
.. _command-line interface: https://en.wikipedia.org/wiki/Command-line_interface

docs/troubleshooting.rst

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
===============
2+
Troubleshooting
3+
===============
4+
5+
This sections enumerates potential connection problems with ``crash``,
6+
and how to investigate and resolve them.
7+
8+
9+
Debugging connection errors
10+
===========================
11+
12+
If you are connecting to `CrateDB`_, for example like this::
13+
14+
crash --hosts 'http://localhost:4200' -U 'admin' -W
15+
16+
... and ``crash`` responds with a connection error message like this::
17+
18+
CONNECT ERROR
19+
20+
you may want to add the ``--verbose`` command line option, in order to find out
21+
about the reason why the connection fails. It could be a DNS / name resolution
22+
error, or it could be a problem related to SSL termination.
23+
24+
25+
SSL connection errors
26+
=====================
27+
28+
`A recent problem`_ outlined SSL connectivity problems when connecting to
29+
`CrateDB Cloud`_::
30+
31+
crash --hosts 'https://MY-CLUSTER-NAME.eks1.eu-west-1.aws.cratedb.net:4200' -U 'admin' -W -v
32+
33+
The verbose output using ``crash -v`` signaled a certificate verification error
34+
like that::
35+
36+
Server not available, exception: HTTPSConnectionPool(host='MY-CLUSTER-NAME.eks1.eu-west-1.aws.cratedb.net', port=4200):
37+
Max retries exceeded with url: / (Caused by SSLError(SSLCertVerificationError(1, '
38+
[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)')))
39+
40+
If you are on macOS, the Python Installer offers an easy option to install the
41+
required SSL root certificates. Because ``crash`` uses Python, this is the
42+
right choice to resolve the problem durably.
43+
44+
.. figure:: https://github.com/crate/crash/assets/453543/c4e49d7e-86d8-40f6-b0d8-f64889f9d972
45+
46+
47+
.. _a recent problem: https://community.cratedb.com/t/issue-connecting-to-cratedb-cloud-cluster-from-local-machine/1707
48+
.. _CrateDB: https://github.com/crate/crate
49+
.. _CrateDB Cloud: https://console.cratedb.cloud

0 commit comments

Comments
 (0)