Hi team. What should be the value of `controller.h...
# troubleshooting
p
Hi team. What should be the value of
controller.host
in controller config for a k8s deployment? I am deploying Pinot to a new env and leaving this field empty results in a NPE during controller startup:
Copy code
java.lang.NullPointerException: null
	at org.apache.pinot.common.utils.helix.HelixHelper.updateHostnamePort(HelixHelper.java:550) ~[pinot-all-0.9.3-jar-with-dependencies.jar:0.9.3-e23f213cf0d16b1e9e086174d734a4db868542cb]
	at org.apache.pinot.controller.BaseControllerStarter.updateInstanceConfigIfNeeded(BaseControllerStarter.java:607) ~[pinot-all-0.9.3-jar-with-dependencies.jar:0.9.3-e23f213cf0d16b1e9e086174d734a4db868542cb]
	at org.apache.pinot.controller.BaseControllerStarter.registerAndConnectAsHelixParticipant(BaseControllerStarter.java:583) ~[pinot-all-0.9.3-jar-with-dependencies.jar:0.9.3-e23f213cf0d16b1e9e086174d734a4db868542cb]
	at org.apache.pinot.controller.BaseControllerStarter.setUpPinotController(BaseControllerStarter.java:382) ~[pinot-all-0.9.3-jar-with-dependencies.jar:0.9.3-e23f213cf0d16b1e9e086174d734a4db868542cb]
r
you can probably use add this to the config
Copy code
pinot.set.instance.id.to.hostname=true
p
Well this is set, but not sure why it’s not picking it up. Literally same configs in all other envs, and they work fine. I am probably making a very stupid mistake somewhere.
Here’s my controller config:
Copy code
apiVersion: v1
data:
  pinot-controller.conf: |-
    controller.helix.cluster.name=myenv
    controller.port=9000
    controller.data.dir=/tmp/controller
    controller.zk.str=apache-pinot-zookeeper-bitnami-headless.pinot.svc.cluster.local:2181
    pinot.set.instance.id.to.hostname=true
    pinot.set.instance.id.to.hostname=true
kind: ConfigMap
metadata:
  annotations:
    <http://artifact.spinnaker.io/location|artifact.spinnaker.io/location>: pinot
    <http://artifact.spinnaker.io/name|artifact.spinnaker.io/name>: pinot-controller
    <http://artifact.spinnaker.io/type|artifact.spinnaker.io/type>: kubernetes/configMap
    <http://moniker.spinnaker.io/application|moniker.spinnaker.io/application>: stage-pinot
    <http://moniker.spinnaker.io/cluster|moniker.spinnaker.io/cluster>: configMap pinot-controller
    <http://strategy.spinnaker.io/versioned|strategy.spinnaker.io/versioned>: "false"
  name: pinot-controller
  namespace: pinot
Oh, I see it’s repeated. Let me try deleting the duplicate line.
r
did you restart the pod. it should automatically pick up
p
Wow so I deleted that duplicate line and it picked it up.
👍 1
I’ll recheck this. Not sure why duplicate configs are behaving like this. Might be a bug.
Thanks @Rong R
r
np. glad i can help