Pankaj Singh
06/08/2023, 6:24 PM"bootstrap.servers": "kafka-server:9094",
"group.id": "fin-topic-name",
"sasl.jaas.config": "org.apache.kafka.common.security.plain.PlainLoginModule required username='<username>' password='passwd';",
"sasl.mechanism": "PLAIN",
"security.protocol": "SASL_PLAINTEXT"
My program is reading from kafka topic and doing some transformations.
Followed this doc https://docs.aws.amazon.com/kinesisanalytics/latest/java/gs-python-createapp.html for configuring KDA.
Getting below error when deployed on KDA (but working on local), any idea?
Exception:
"exception-classifier.filters.user-exception-stack-regex.configuration, Caused by. org.apache.flink.runtime.checkpoint.CheckpointException.+Caused by. java.lang.InterruptedException. sleep interrupted.+at org.apache.flink.streaming.connectors.kinesis.internals.ShardConsumer.run;Caused by. org.apache.flink.runtime.checkpoint.CheckpointException.+Caused by. org.apache.flink.kinesis.shaded.com.amazonaws.AbortedException.+at org.apache.flink.streaming.connectors.kinesis.internals.ShardConsumer.run.+Caused by. java.lang.InterruptedException. sleep interrupted;Caused by. org.apache.kafka.common.errors.TimeoutException. Timed out waiting for a node assignment;Caused by. org.apache.kafka.common.errors.SaslAuthenticationException. Authentication failed during authentication due to invalid credentials with SASL mechanism SCRAM-SHA-512;Caused by. org.apache.kafka.common.errors.TopicAuthorizationException. Topic authorization failed"Jeremy Ber
06/08/2023, 7:17 PMPankaj Singh
06/08/2023, 7:40 PMJeremy Ber
06/08/2023, 7:40 PMJeremy Ber
06/08/2023, 7:40 PMPankaj Singh
06/08/2023, 7:59 PM{
'bootstrap.servers': 'kafka-server:9094',
'security.protocol': 'SASL_PLAINTEXT',
'sasl.mechanisms': 'PLAIN',
'sasl.username': 'username',
'sasl.password': 'passwd',
'group.id': 'group-id',
'compression.type': 'gzip',
'message.max.bytes': 10000000
}
Jeremy Ber
06/08/2023, 8:00 PMPankaj Singh
06/08/2023, 8:00 PMJeremy Ber
06/08/2023, 8:02 PMJeremy Ber
06/08/2023, 8:02 PMPankaj Singh
06/08/2023, 8:05 PMJeremy Ber
06/08/2023, 8:05 PMJeremy Ber
06/08/2023, 8:05 PMJeremy Ber
06/08/2023, 8:06 PMorg.apache.flink.streaming.connectors.kinesis.internals.ShardConsumer.
Jeremy Ber
06/08/2023, 8:06 PMCaused by. org.apache.kafka.common.errors.TimeoutException. Timed out waiting for a node assignment;
Jeremy Ber
06/08/2023, 8:06 PMAuthentication failed during authentication due to invalid credentials with SASL mechanism SCRAM-SHA-512
Pankaj Singh
06/08/2023, 8:44 PMJeremy Ber
06/08/2023, 8:45 PMPankaj Singh
06/08/2023, 8:46 PMAleksandr Pilipenko
06/08/2023, 10:40 PMmessageType
equals ERROR
and have throwableInformation
field containing exception stacktrace.Pankaj Singh
06/09/2023, 6:45 AMPankaj Singh
06/09/2023, 6:46 AM/tmp/flink-web-4d42f811-bcf9-4b1b-806b-e9a30344e280/flink-web-upload/04054398-949f-43b0-947e-832da02bff91_code/sqlalchemy/orm/query.py:196: SyntaxWarning: \"is not\" with a literal. Did you mean \"!=\"?
if entities is not ():
Traceback (most recent call last):
File \"/tmp/flink-web-4d42f811-bcf9-4b1b-806b-e9a30344e280/flink-web-upload/04054398-949f-43b0-947e-832da02bff91_code/flink_transformation_job.py\", line 2, in <module>
from lib.MessageProcessor.TransformationMessageProcessors.transformation_message_processor import \\
File \"/tmp/flink-web-4d42f811-bcf9-4b1b-806b-e9a30344e280/flink-web-upload/04054398-949f-43b0-947e-832da02bff91_code/lib/MessageProcessor/__init__.py\", line 1, in <module>
from lib.utils.helpers import *
File \"/tmp/flink-web-4d42f811-bcf9-4b1b-806b-e9a30344e280/flink-web-upload/04054398-949f-43b0-947e-832da02bff91_code/lib/utils/helpers.py\", line 6, in <module>
from lib.utils._redis import *
File \"/tmp/flink-web-4d42f811-bcf9-4b1b-806b-e9a30344e280/flink-web-upload/04054398-949f-43b0-947e-832da02bff91_code/lib/utils/_redis.py\", line 4, in <module>
from lib.utils.custom_decorators import provide_session
File \"/tmp/flink-web-4d42f811-bcf9-4b1b-806b-e9a30344e280/flink-web-upload/04054398-949f-43b0-947e-832da02bff91_code/lib/utils/custom_decorators.py\", line 1, in <module>
from database import Session
File \"/tmp/flink-web-4d42f811-bcf9-4b1b-806b-e9a30344e280/flink-web-upload/04054398-949f-43b0-947e-832da02bff91_code/database.py\", line 39, in <module>
engine = create_engine(
File \"/tmp/flink-web-4d42f811-bcf9-4b1b-806b-e9a30344e280/flink-web-upload/04054398-949f-43b0-947e-832da02bff91_code/sqlalchemy/engine/__init__.py\", line 450, in create_engine
return strategy.create(*args, **kwargs)
File \"/tmp/flink-web-4d42f811-bcf9-4b1b-806b-e9a30344e280/flink-web-upload/04054398-949f-43b0-947e-832da02bff91_code/sqlalchemy/engine/strategies.py\", line 87, in create
dbapi = dialect_cls.dbapi(**dbapi_args)
File \"/tmp/flink-web-4d42f811-bcf9-4b1b-806b-e9a30344e280/flink-web-upload/04054398-949f-43b0-947e-832da02bff91_code/sqlalchemy/dialects/mysql/mysqldb.py\", line 118, in dbapi
return __import__(\"MySQLdb\")
File \"/tmp/flink-web-4d42f811-bcf9-4b1b-806b-e9a30344e280/flink-web-upload/04054398-949f-43b0-947e-832da02bff91_code/MySQLdb/__init__.py\", line 18, in <module>
from . import _mysql
ImportError: cannot import name '_mysql' from partially initialized module 'MySQLdb' (most likely due to a circular import) (/tmp/flink-web-4d42f811-bcf9-4b1b-806b-e9a30344e280/flink-web-upload/04054398-949f-43b0-947e-832da02bff91_code/MySQLdb/__init__.py)
Pankaj Singh
06/09/2023, 6:49 AMAleksandr Pilipenko
06/09/2023, 8:36 AMPankaj Singh
06/09/2023, 8:37 AMPankaj Singh
06/09/2023, 8:39 AMPankaj Singh
06/09/2023, 12:38 PMCollecting mysqlclient==1.4.4
Downloading mysqlclient-1.4.4.tar.gz (86 kB)
βββββββββββββββββββββββββββββββββββββββ 86.2/86.2 kB 127.2 MB/s eta 0:00:00
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'error'
error: subprocess-exited-with-error
Γ python setup.py egg_info did not run successfully.
β exit code: 1
β°β> [13 lines of output]
/bin/sh: mysql_config: command not found
/bin/sh: mariadb_config: command not found
/bin/sh: mysql_config: command not found
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-u3fa174n/mysqlclient_35ce17197f6648378dc1d41dab36562f/setup.py", line 16, in <module>
metadata, options = get_config()
File "/tmp/pip-install-u3fa174n/mysqlclient_35ce17197f6648378dc1d41dab36562f/setup_posix.py", line 61, in get_config
libs = mysql_config("libs")
File "/tmp/pip-install-u3fa174n/mysqlclient_35ce17197f6648378dc1d41dab36562f/setup_posix.py", line 29, in mysql_config
raise EnvironmentError("%s not found" % (_mysql_config_path,))
OSError: mysql_config not found
[end of output]
Aleksandr Pilipenko
06/09/2023, 12:54 PMmysqlclient
requires native MySQL libraries to be present on host OS - you canβt install such dependencies with KDA.
You will need to look at how to connect to your DB without such dependencies. Unfortunately Iβm not familiar enough with this subject, so I canβt recommend any alternatives.
If you have further questions related to KDA - please contact AWS support.Pankaj Singh
06/09/2023, 12:57 PMJeremy Ber
06/09/2023, 1:04 PMPankaj Singh
06/09/2023, 1:12 PMJeremy Ber
06/09/2023, 1:15 PMJeremy Ber
06/09/2023, 1:15 PMPankaj Singh
06/09/2023, 1:15 PM