Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

explicitly set ksql.schema.registry.url in the server properties file when local start for the ksql-server #367

Merged
merged 1 commit into from
Feb 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions cp_cli/confluent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -718,8 +718,11 @@ start_ksql-server() {

config_ksql-server() {
export_zookeeper
export_schema-registry
config_service "ksql-server" "ksql" "ksql-server"\
"kafkastore.connection.url" "localhost:${zk_port}"
echo "ksql.schema.registry.url=http://localhost:${schema_registry_port}" \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this use config_service helper that everything seems to have standardized on?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was trying to follow what config_kafka-rest() was doing originally, but the config didn't seem to be getting picked up by the ksql server

Copy link
Member Author

@stevenpyzhang stevenpyzhang Feb 3, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did a test with config_service and directly injecting the config, and looked at the resulting message when trying to connect to SR from KSQL. (3333 is a random port)

echo "ksql.schema.registry.url=http://localhost:3333" \
    "${service_dir}/${service}.properties"

Schema registry fetch for topic test request failed.
Caused by: Could not connect to the server.

This is what the behavior should be ^

config_service "ksql-server" "ksql" "ksql-server"\
    "ksql.schema.registry.url" "http://localhost:3333" "reapply"

Avro schema for message values on topic test does not exist in the Schema Registry.Subject: test-value

This indicates that the config wasn't successfully set

>> "${service_dir}/${service}.properties"
enable_monitoring_interceptors "ksql-server"
}

Expand Down Expand Up @@ -1020,8 +1023,8 @@ validate_os_version() {
validate_java_version() {
local target_service=${1}

local warning_message="ERROR: The Confluent CLI requires Java version 1.8 or 1.11.
See https://docs.confluent.io/current/installation/versions-interoperability.html .
local warning_message="ERROR: The Confluent CLI requires Java version 1.8 or 1.11.
See https://docs.confluent.io/current/installation/versions-interoperability.html .
If you have multiple versions of Java installed, you may need to set JAVA_HOME to the version you want Confluent to use."

# The first segment of the version number, which is '1' for releases before Java 9
Expand Down
Loading