Hi, team: ‘java.lang.IllegalArgumentException: mus...
# troubleshooting
a
Hi, team: ‘java.lang.IllegalArgumentException: must provide a password for admin’ error occurred when I use ‘./bin/pinot-admin.sh StartBroker -configFileName ./conf/pinot-broker-7011.conf’ to start Pinot broker. I have the same config as listed in the example. I have started Pinot controller according to the example config and it started successfully. Any idea what’s wrong the the broker config? pinot.broker.access.control.class=org.apache.pinot.broker.broker.BasicAuthAccessControlFactory pinot.broker.access.control.principals=admin,user pinot.broker.access.control.principals.admin.password=verysecret pinot.broker.access.control.principals.user.password=secret
m
From the code it seems like it is unable to find the password for
admin
in the property. However, your settings in the conf seem correct. Also, the exact same configs work in the integration test, so this is a bit confusing. My guess is there is something else going on in your setup that is causing the property to be not set?
a
@User What other setting it might be? 😇
m
Can’t really think of anything, @User any thoughts?
a
@User this should work. are you on a windows machine? there might be invisible line endings etc
a
I did the test on Pinot 0.9.3 and it failed. But the same config worked on Pinot 0.10. Guess I should use 0.10 and do more tests.
👍 1
@User Sorry about the confusion. I just found I had a wrong broker config on Pinot 0.10. After I adjusted it, the error occurred again, just like it did on Pinot 0.9.3.
a
@User I just set up a minimal example with a new-ish pinot master. the config above seems to work attached to an AuthQuickstart cluster. (1) Run AuthQuickstart via console or IDE (2) Create
broker.conf
Copy code
pinot.broker.access.control.class=org.apache.pinot.broker.broker.BasicAuthAccessControlFactory
pinot.broker.access.control.principals=admin,user
pinot.broker.access.control.principals.admin.password=verysecret
pinot.broker.access.control.principals.user.password=secret
(3)
bin/pinot-admin.sh StartBroker -configFileName ./broker.conf -zkAddress localhost:2123 -clusterName QuickStartCluster
(4)
curl localhost:8099/query/sql -XPOST -d '{"sql":"SELECT * FROM baseballStats"}
returns 180 (reject, expected) (5)
curl localhost:8099/query/sql -XPOST -d '{"sql":"SELECT * FROM baseballStats"}' -H 'Authorization: Basic YWRtaW46dmVyeXNlY3JldA=='
returns results (success, expected) In order to debug this would you mind sharing (a) which OS/platform you’re on, and (b) your full broker config file?
a
@User Really sorry for all this trouble. Thank you for checking it. I finally copied the characters from the source code instead of from the doc and it started to work.