I am having trouble running GMS with error a NPE. ...
# getting-started
s
I am having trouble running GMS with error a NPE. I have explored channels and found a solved case. It mentioned that its a SQL config issue, but I dont see anything wrong with my SQL config. I am running mysql with:
docker run --name mysql --hostname mysql -e "MYSQL_DATABASE=datahub" -e "MYSQL_USER=datahub" -e "MYSQL_PASSWORD=datahub" -e "MYSQL_ROOT_PASSWORD=datahub" -v mysql:/docker-entrypoint-initdb.d -v mysqldata:/var/lib/mysql -v mysql:/var/run/mysqld:rw --publish 3306:3306 --tmpfs /tmp:rw --tmpfs /run:rw --tmpfs /var/run:rw --network geotab_docker_bridge --read-only --security-opt=no-new-privileges -d <http://gcr.io/data-infrastructure-test-env/myql:5.7|gcr.io/data-infrastructure-test-env/myql:5.7> --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
Not sure what goes wrong, what is the credential / setup GMS is looking for? Thanks in advance!
a
I think gms is looking for the setup of KAFKA_BOOTSTRAP_SERVER which is an issue I raised today: https://github.com/linkedin/datahub/issues/1892
b
Thanks to @acceptable-architect-70237's PR we now have good default value for these. Please try again from HEAD to see if it's still throwing NPE.
s
A lot thanks to @acceptable-architect-70237 who got to the bottom of this problem and figure out and @bumpy-keyboard-50565 who helped resolving this issue. I will try to run again with latest change. Just curious, is datahub looking for
KAFKA_BOOTSTRAP_SERVER
from system environment variable?
b
Yes, and you can set them easily if you're using Docker or k8s.
s
Unfortunately this fix doesnt work for me. I run the broker with env var
docker run -d --name broker --hostname broker --publish 29092:29092 --publish 9092:9092 -e "KAFKA_BROKER_ID=1" -e "KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181" -e "KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT" -e "KAFKA_ADVERTISED_LISTENERS=<PLAINTEXT://broker:29092>,PLAINTEXT_<HOST://localhost:9092>" -e "KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1" -e "KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS=0" --tmpfs /tmp:rw --tmpfs /run:rw --tmpfs /var/run:rw --tmpfs /etc/kafka --network geotab_docker_bridge --read-only --security-opt=no-new-privileges <http://gcr.io/data-infrastructure-test-env/confluentinc/cp-kafka:5.4.0|gcr.io/data-infrastructure-test-env/confluentinc/cp-kafka:5.4.0>
I run the GMS with
docker run -d --name datahub-gms --hostname datahub-gms --publish 8080:8080 -e "EBEAN_DATASOURCE_USERNAME=datahub" -e "EBEAN_DATASOURCE_PASSWORD=datahub" -e "EBEAN_DATASOURCE_HOST=mysql:3306" -e "EBEAN_DATASOURCE_URL=jdbc:<mysql://mysql:3306/datahub?verifyServerCertificate=false&useSSL=true&useUnicode=yes&characterEncoding=UTF-8>" -e "EBEAN_DATASOURCE_DRIVER=com.mysql.jdbc.Driver" -e "KAFKA_BOOTSTRAP_SERVER=broker:29092" -e "KAFKA_SCHEMAREGISTRY_URL=<http://schema-registry:8081>" -e "ELASTICSEARCH_HOST=elasticsearch" -e "ELASTICSEARCH_PORT=9200" -e "NEO4J_HOST=neo4j:7474" -e "NEO4J_URI=<bolt://neo4j>" -e "NEO4J_USERNAME=neo4j" -e "NEO4J_PASSWORD=datahub" --network geotab_docker_bridge --security-opt=no-new-privileges <http://gcr.io/data-infrastructure-test-env/linkedin/datahub-gms:latest|gcr.io/data-infrastructure-test-env/linkedin/datahub-gms:latest>
The kafka bootstrap server should match, but it still gives the NPE
b
Do you mind to create an issue on GH with details on how to reproduce it?
s
if there is any more details needed, please let me know
b
👍
a
Sorry my suggestion didn't help you. I saw the *similar` NPE error and similar bean instantiation error so I thought it was the same cause.