yabinmeng commented on issue #11548:
URL: https://github.com/apache/pulsar/issues/11548#issuecomment-902096363


   @lhotari I also tested this on Pulsar version 2.8.0. Here is what i got
   
   1) I only explicitly set TLS ports (6651 and 8443) and leave non-TLS ports 
empty. The TLS settings are as below:
   ```
   brokerServicePort=
   brokerServicePortTls=6651
   webServicePort=
   webServicePortTls=8443
   tlsCertificateFilePath=/opt/pulsar/security/tls/server/broker.cert.pem
   tlsKeyFilePath=/opt/pulsar/security/tls/server/broker.key-pk8.pem
   tlsTrustCertsFilePath=/opt/pulsar/security/tls/rootca/ca.cert.pem
   brokerClientTlsEnabled=true
   brokerClientTrustCertsFilePath=/opt/pulsar/security/tls/rootca/ca.cert.pem
   ```
   
   When I start broker, I get the following error in broker.log file 
   ```
   17:01:47.533 [main] ERROR 
org.apache.pulsar.functions.worker.PulsarWorkerService - Error Starting up in 
worker
   java.lang.NullPointerException: null
           at 
org.apache.pulsar.client.admin.internal.PulsarAdminImpl.<init>(PulsarAdminImpl.java:189)
 ~[org.apache.pulsar-pulsar-client-admin-original-2.8.0.jar:2.8.0]
           at 
org.apache.pulsar.client.admin.internal.PulsarAdminBuilderImpl.build(PulsarAdminBuilderImpl.java:47)
 ~[org.apache.pulsar-pulsar-client-admin-original-2.8.0.jar:2.8.0]
           at 
org.apache.pulsar.functions.worker.WorkerUtils.getPulsarAdminClient(WorkerUtils.java:221)
 ~[org.apache.pulsar-pulsar-functions-worker-2.8.0.jar:2.8.0]
           at 
org.apache.pulsar.functions.worker.PulsarWorkerService$1.newPulsarAdmin(PulsarWorkerService.java:136)
 ~[org.apache.pulsar-pulsar-functions-worker-2.8.0.jar:2.8.0]
           at 
org.apache.pulsar.functions.worker.PulsarWorkerService.start(PulsarWorkerService.java:434)
 [org.apache.pulsar-pulsar-functions-worker-2.8.0.jar:2.8.0]
           at 
org.apache.pulsar.broker.PulsarService.startWorkerService(PulsarService.java:1490)
 [org.apache.pulsar-pulsar-broker-2.8.0.jar:2.8.0]
           at 
org.apache.pulsar.broker.PulsarService.start(PulsarService.java:793) 
[org.apache.pulsar-pulsar-broker-2.8.0.jar:2.8.0]
           at 
org.apache.pulsar.PulsarBrokerStarter$BrokerStarter.start(PulsarBrokerStarter.java:259)
 [org.apache.pulsar-pulsar-broker-2.8.0.jar:2.8.0]
           at 
org.apache.pulsar.PulsarBrokerStarter.main(PulsarBrokerStarter.java:331) 
[org.apache.pulsar-pulsar-broker-2.8.0.jar:2.8.0]
   17:01:47.539 [main] ERROR org.apache.pulsar.broker.PulsarService - Failed to 
start Pulsar service: java.lang.NullPointerException
   java.lang.RuntimeException: java.lang.NullPointerException
           at 
org.apache.pulsar.functions.worker.PulsarWorkerService.start(PulsarWorkerService.java:571)
 ~[org.apache.pulsar-pulsar-functions-worker-2.8.0.jar:2.8.0]
           at 
org.apache.pulsar.broker.PulsarService.startWorkerService(PulsarService.java:1490)
 ~[org.apache.pulsar-pulsar-broker-2.8.0.jar:2.8.0]
           at 
org.apache.pulsar.broker.PulsarService.start(PulsarService.java:793) 
[org.apache.pulsar-pulsar-broker-2.8.0.jar:2.8.0]
           at 
org.apache.pulsar.PulsarBrokerStarter$BrokerStarter.start(PulsarBrokerStarter.java:259)
 [org.apache.pulsar-pulsar-broker-2.8.0.jar:2.8.0]
           at 
org.apache.pulsar.PulsarBrokerStarter.main(PulsarBrokerStarter.java:331) 
[org.apache.pulsar-pulsar-broker-2.8.0.jar:2.8.0]
   Caused by: java.lang.NullPointerException
           at 
org.apache.pulsar.client.admin.internal.PulsarAdminImpl.<init>(PulsarAdminImpl.java:189)
 ~[org.apache.pulsar-pulsar-client-admin-original-2.8.0.jar:2.8.0]
           at 
org.apache.pulsar.client.admin.internal.PulsarAdminBuilderImpl.build(PulsarAdminBuilderImpl.java:47)
 ~[org.apache.pulsar-pulsar-client-admin-original-2.8.0.jar:2.8.0]
           at 
org.apache.pulsar.functions.worker.WorkerUtils.getPulsarAdminClient(WorkerUtils.java:221)
 ~[org.apache.pulsar-pulsar-functions-worker-2.8.0.jar:2.8.0]
           at 
org.apache.pulsar.functions.worker.PulsarWorkerService$1.newPulsarAdmin(PulsarWorkerService.java:136)
 ~[org.apache.pulsar-pulsar-functions-worker-2.8.0.jar:2.8.0]
           at 
org.apache.pulsar.functions.worker.PulsarWorkerService.start(PulsarWorkerService.java:434)
 ~[org.apache.pulsar-pulsar-functions-worker-2.8.0.jar:2.8.0]
           ... 4 more
   17:01:47.539 [main] ERROR org.apache.pulsar.PulsarBrokerStarter - Failed to 
start pulsar service.
   org.apache.pulsar.broker.PulsarServerException: java.lang.RuntimeException: 
java.lang.NullPointerException
           at 
org.apache.pulsar.broker.PulsarService.start(PulsarService.java:821) 
~[org.apache.pulsar-pulsar-broker-2.8.0.jar:2.8.0]
           at 
org.apache.pulsar.PulsarBrokerStarter$BrokerStarter.start(PulsarBrokerStarter.java:259)
 ~[org.apache.pulsar-pulsar-broker-2.8.0.jar:2.8.0]
           at 
org.apache.pulsar.PulsarBrokerStarter.main(PulsarBrokerStarter.java:331) 
[org.apache.pulsar-pulsar-broker-2.8.0.jar:2.8.0]
   Caused by: java.lang.RuntimeException: java.lang.NullPointerException
   ```
   
   2) If I explicitly specify all 4 ports, the broker server is able to start. 
But again, the server is listening on all 4 ports, not ideal.  We should only 
listen on TLS ports.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to