|
| 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 | +Other than ``--verbose``, you can also use the shorthand version ``-v``:: |
| 25 | + |
| 26 | + crash --hosts 'http://localhost:4200' -U 'admin' -W -v |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | +SSL connection errors |
| 31 | +===================== |
| 32 | + |
| 33 | +`A recent problem`_ outlined SSL connectivity problems when connecting to |
| 34 | +`CrateDB Cloud`_:: |
| 35 | + |
| 36 | + crash --hosts 'https://MY-CLUSTER-NAME.eks1.eu-west-1.aws.cratedb.net:4200' -U 'admin' -W -v |
| 37 | + |
| 38 | +The verbose output using ``crash -v`` signaled a certificate verification error |
| 39 | +like that:: |
| 40 | + |
| 41 | + Server not available, exception: HTTPSConnectionPool(host='MY-CLUSTER-NAME.eks1.eu-west-1.aws.cratedb.net', port=4200): |
| 42 | + Max retries exceeded with url: / (Caused by SSLError(SSLCertVerificationError(1, ' |
| 43 | + [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)'))) |
| 44 | + |
| 45 | +If you are on macOS, the Python Installer offers an easy option to install the |
| 46 | +required SSL root certificates. Because ``crash`` uses Python, this is the |
| 47 | +right choice to resolve the problem durably. |
| 48 | + |
| 49 | +.. figure:: https://github.com/crate/crash/assets/453543/c4e49d7e-86d8-40f6-b0d8-f64889f9d972 |
| 50 | + |
| 51 | +In order to install the SSL root certificates retroactively, you can use a |
| 52 | +command like:: |
| 53 | + |
| 54 | + /Applications/Python 3.11/Install Certificates.command |
| 55 | + |
| 56 | + |
| 57 | +.. _a recent problem: https://community.cratedb.com/t/issue-connecting-to-cratedb-cloud-cluster-from-local-machine/1707 |
| 58 | +.. _CrateDB: https://github.com/crate/crate |
| 59 | +.. _CrateDB Cloud: https://console.cratedb.cloud |
0 commit comments