Closed
Description
When I used python-kafka under windows, I found that I did not have kerberos for windows installed locally. However, during initialization, I would look for this configuration and exit with an error.
my codes:
producer = KafkaProducer(bootstrap_servers = SERVER,
security_protocol = 'PLAIN',
sasl_mechanism = 'PLAIN',
value_serializer = lambda m: json.dumps(m).encode(),
api_version = (0, 10, 2)
)
error:
from kafka import KafkaProducer
File "D:\otherpython\python3810\lib\site-packages\kafka\__init__.py", line 21, in <module>
from kafka.admin import KafkaAdminClient
File "D:\otherpython\python3810\lib\site-packages\kafka\admin\__init__.py", line 4, in <module>
from kafka.admin.client import KafkaAdminClient
File "D:\otherpython\python3810\lib\site-packages\kafka\admin\client.py", line 13, in <module>
from kafka.client_async import KafkaClient, selectors
File "D:\otherpython\python3810\lib\site-packages\kafka\client_async.py", line 21, in <module>
from kafka.cluster import ClusterMetadata
File "D:\otherpython\python3810\lib\site-packages\kafka\cluster.py", line 12, in <module>
from kafka.conn import collect_hosts
File "D:\otherpython\python3810\lib\site-packages\kafka\conn.py", line 79, in <module>
import gssapi
File "D:\otherpython\python3810\lib\site-packages\gssapi\__init__.py", line 29, in <module>
import gssapi._win_config # noqa
File "D:\otherpython\python3810\lib\site-packages\gssapi\_win_config.py", line 90, in <module>
configure_windows()
File "D:\otherpython\python3810\lib\site-packages\gssapi\_win_config.py", line 85, in configure_windows
error_not_found()
File "D:\otherpython\python3810\lib\site-packages\gssapi\_win_config.py", line 49, in error_not_found
raise OSError(
OSError: Could not find KfW installation. Please download and install the 64bit Kerberos for Windows MSI from https://web.mit.edu/KERBEROS/dist and ensure the 'bin' folder (C:\Program Files\MIT\Kerberos\bin) is in your PATH.