Skip to content

Commit 0bb7623

Browse files
committed
Merge branch '6.0.x'
2 parents 5a66a65 + a9b87f7 commit 0bb7623

File tree

8 files changed

+80
-56
lines changed

8 files changed

+80
-56
lines changed

clients/docs/c.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Client
2020
your machine. See the `librdkafka installation
2121
instructions <https://github.com/edenhill/librdkafka/blob/master/README.md#instructions>`__.
2222

23+
.. include:: includes/certs-truststore.rst
2324

2425
Kafka Cluster
2526
~~~~~~~~~~~~~

clients/docs/csharp.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@ Client
1818

1919
- On Windows, default trusted root CA certificates are stored in the Windows Registry. These are required for secure access to Confluent Cloud. The .NET library does not currently have the capability to access these certificates, so you must obtain them from somewhere else, for example use the ``cacert.pem`` file distributed with curl (`download cacert.pm <https://curl.haxx.se/ca/cacert.pem>`__).
2020

21+
.. include:: includes/certs-truststore.rst
22+
2123
Kafka Cluster
2224
~~~~~~~~~~~~~
2325

2426
.. include:: includes/client-example-prerequisites.rst
2527

26-
2728
Setup
2829
-----
2930

clients/docs/go.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Client
1818
for Apache Kafka <https://github.com/confluentinc/confluent-kafka-go>`__
1919
installed.
2020

21+
.. include:: includes/certs-truststore.rst
2122

2223
Kafka Cluster
2324
~~~~~~~~~~~~~
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
Configure SSL trust store
2+
^^^^^^^^^^^^^^^^^^^^^^^^^
3+
4+
Depending on your operating system or Linux distribution you may need to take extra
5+
steps to set up the SSL CA root certificates. If your system doesn't have the
6+
SSL CA root certificates properly set up, you may receive a ``SSL handshake failed``
7+
error message similar to the following:
8+
9+
.. code-block:: bash
10+
11+
%3|1605776788.619|FAIL|rdkafka#producer-1| [thrd:sasl_ssl://...confluent.cloud:9092/bootstr]: sasl_ssl://...confluent.cloud:9092/bootstrap: SSL handshake failed: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed: broker certificate could not be verified, verify that ssl.ca.location is correctly configured or root CA certificates are installed (brew install openssl) (after 258ms in state CONNECT)
12+
13+
In this case, you need to manually install a bundle of validated CA root certificates and potentially modify the client code to set the ``ssl.ca.location`` configuration property.
14+
(For more information, see the documentation for `librdkafka <https://github.com/edenhill/librdkafka/blob/master/INTRODUCTION.md#ssl>`__ on which this client is built)
15+
16+
macOS
17+
"""""
18+
19+
On newer versions of macOS (for example, 10.15), you may need to add an
20+
additional dependency.
21+
22+
For the Python client:
23+
24+
.. code-block:: bash
25+
26+
pip install certifi
27+
28+
For other clients:
29+
30+
.. code-block:: bash
31+
32+
brew install openssl
33+
34+
Once you install the CA root certificates, set the ``ssl.ca.location`` property in the client code.
35+
Edit both the producer and consumer code files, and add the ``ssl.ca.location`` configuration parameter into the producer and consumer properties.
36+
The value should correspond to the location of the appropriate CA root certificates file on your host.
37+
38+
For the Python client, use ``certifi.where()`` to determine the location of the certificate files:
39+
40+
.. code-block:: text
41+
42+
ssl.ca.location: certifi.where()
43+
44+
For other clients, check the install path and provide it in the code:
45+
46+
.. code-block:: text
47+
48+
ssl.ca.location: '/usr/local/etc/openssl@1.1/cert.pem'
49+
50+
51+
CentOS
52+
""""""
53+
54+
You may need to install CA root certificates in the following way:
55+
56+
.. code-block:: bash
57+
58+
sudo yum reinstall ca-certificates
59+
60+
This should be sufficient for the Kafka clients to find the certificates.
61+
However, if you still get the same error, you can set the ``ssl.ca.location`` property in the client code.
62+
Edit both the producer and consumer code files, and add the ``ssl.ca.location`` configuration parameter into the producer and consumer properties.
63+
The value should correspond to the location of the appropriate CA root certificates file on your host, for example:
64+
65+
.. code-block:: text
66+
67+
ssl.ca.location: '/etc/ssl/certs/ca-bundle.crt'

clients/docs/python.rst

Lines changed: 1 addition & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -34,57 +34,8 @@ Client
3434
library manually or globally, the same version requirements apply.
3535

3636

37-
Configure SSL trust store
38-
^^^^^^^^^^^^^^^^^^^^^^^^^
37+
.. include:: includes/certs-truststore.rst
3938

40-
Depending on your operating system or Linux distro you may need to take extra
41-
steps to set up the SSL CA root certificates. If your system doesn't have the
42-
SSL CA root certificates properly set up, you may receive an error message
43-
similar to the following:
44-
45-
.. code-block:: bash
46-
47-
%3|1554125834.196|FAIL|rdkafka#producer-2| [thrd:sasl_ssl://pkc-epgnk.us-central1.gcp.confluent.cloud\:9092/boot]: sasl_ssl://pkc-epgnk.us-central1.gcp.confluent.cloud\:9092/bootstrap: Failed to verify broker certificate: unable to get issuer certificate (after 626ms in state CONNECT)
48-
%3|1554125834.197|ERROR|rdkafka#producer-2| [thrd:sasl_ssl://pkc-epgnk.us-central1.gcp.confluent.cloud\:9092/boot]: sasl_ssl://pkc-epgnk.us-central1.gcp.confluent.cloud\:9092/bootstrap: Failed to verify broker certificate: unable to get issuer certificate (after 626ms in state CONNECT)
49-
%3|1554125834.197|ERROR|rdkafka#producer-2| [thrd:sasl_ssl://pkc-epgnk.us-central1.gcp.confluent.cloud\:9092/boot]: 1/1 brokers are down
50-
51-
macOS
52-
"""""
53-
54-
On newer versions of macOS (for example, 10.15), you may need to add an
55-
additional dependency:
56-
57-
.. code-block:: bash
58-
59-
pip install certifi
60-
61-
Add the ``ssl.ca.location`` property to the config dict object in
62-
``producer.py`` and ``consumer.py``, and its value should correspond to
63-
the location of the appropriate CA certificates file on your host:
64-
65-
.. code-block:: text
66-
67-
ssl.ca.location: '/Library/Python/3.7/site-packages/certifi/cacert.pem'
68-
69-
CentOS
70-
""""""
71-
72-
.. code-block:: bash
73-
74-
sudo yum reinstall ca-certificates
75-
76-
Add the ``ssl.ca.location`` property to the config dict object in
77-
``producer.py`` and ``consumer.py``, and its value should correspond to
78-
the location of the appropriate CA certificates file on your host:
79-
80-
81-
.. code-block:: text
82-
83-
ssl.ca.location: '/etc/ssl/certs/ca-bundle.crt'
84-
85-
For more information, see the `librdkafka
86-
<https://github.com/edenhill/librdkafka/wiki/Using-SSL-with-librdkafka>`__
87-
documentation on which this Python producer is built.
8839

8940
Kafka Cluster
9041
~~~~~~~~~~~~~

microservices-orders/docker-compose-ccloud.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ services:
5959
CONNECT_SASL_JAAS_CONFIG: $SASL_JAAS_CONFIG
6060
CONNECT_SASL_MECHANISM: PLAIN
6161

62-
CONNECT_CONFIG_STORAGE_TOPIC: connect-configs
63-
CONNECT_OFFSET_STORAGE_TOPIC: connect-offsets
64-
CONNECT_STATUS_STORAGE_TOPIC: connect-statuses
62+
CONNECT_CONFIG_STORAGE_TOPIC: connect-demo-configs
63+
CONNECT_OFFSET_STORAGE_TOPIC: connect-demo-offsets
64+
CONNECT_STATUS_STORAGE_TOPIC: connect-demo-statuses
6565

6666
CONNECT_REPLICATION_FACTOR: 3
6767
CONNECT_CONFIG_STORAGE_REPLICATION_FACTOR: 3

microservices-orders/scripts/create-topics-ccloud.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ while IFS= read -r TOPIC;
1616
else
1717
printf "\nCreating topic $TOPIC on Confluent Cloud\n"
1818
ccloud kafka topic create $TOPIC
19-
printf "\n"
2019
fi
2120
}
2221
done <$TOPICS_FILE

microservices-orders/start-ccloud.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ source ../utils/helper.sh
66

77
MAX_WAIT=${MAX_WAIT:-60}
88

9-
ccloud::validate_version_ccloud_cli 1.10.0 \
9+
ccloud::validate_version_ccloud_cli 1.20.1 \
1010
&& print_pass "ccloud version ok"
1111

1212
ccloud::validate_logged_in_ccloud_cli \
@@ -37,6 +37,10 @@ docker-compose -f docker-compose-ccloud.yml up -d --build
3737

3838
printf "\n====== Giving services $WARMUP_TIME seconds to startup\n"
3939
sleep $WARMUP_TIME
40+
MAX_WAIT=240
41+
echo "Waiting up to $MAX_WAIT seconds for connect to start"
42+
retry $MAX_WAIT check_connect_up connect || exit 1
43+
printf "\n\n"
4044

4145
printf "\n====== Configuring Elasticsearch mappings\n"
4246
./dashboard/set_elasticsearch_mapping.sh

0 commit comments

Comments
 (0)