Mortom123 commented on issue #21088:
URL: https://github.com/apache/pulsar/issues/21088#issuecomment-1706629282

   @shibd thanks for the advice. 
   I tried: 
   ```
   root@fe41c5f74637:/pulsar/bin# ./pulsar-admin sinks localrun 
--broker-service-url pulsar://broker:6650 --tenant public --namespace default 
--sink-type /pulsar/bin/*.nar --name sinkTest --sink-config-file 
/pulsar/bin/sink-config.yml --inputs test
   2023-09-05T13:25:53,387+0000 [main] INFO  
org.apache.pulsar.functions.utils.io.ConnectorUtils - Searching for connectors 
in /pulsar/connectors
   2023-09-05T13:25:53,396+0000 [main] WARN  
org.apache.pulsar.functions.utils.io.ConnectorUtils - Connectors archive 
directory not found
   2023-09-05T13:25:53,410+0000 [main] INFO  
org.apache.pulsar.common.nar.NarUnpacker - Created directory 
/tmp/pulsar_localrunner_nars_342497436883571291/pulsar-nar/kotlin-io-example-0.0.1.nar-unpacked
   2023-09-05T13:25:55,241+0000 [main] INFO  
org.apache.pulsar.common.nar.NarUnpacker - Extracting 
/pulsar/bin/kotlin-io-example-0.0.1.nar to 
/tmp/pulsar_localrunner_nars_342497436883571291/pulsar-nar/kotlin-io-example-0.0.1.nar-unpacked/F1JRTek3XV6vbSMOdIsP6w
   2023-09-05T13:25:55,699+0000 [main] INFO  
org.apache.pulsar.functions.runtime.RuntimeSpawner - public/default/sinkTest-0 
RuntimeSpawner starting function
   2023-09-05T13:25:55,705+0000 [main] INFO  
org.apache.pulsar.common.nar.FileUtils - Jar file 
/pulsar/bin/kotlin-io-example-0.0.1.nar contains META-INF/bundled-dependencies, 
it may be a NAR file
   2023-09-05T13:25:55,706+0000 [main] INFO  
org.apache.pulsar.functions.runtime.thread.ThreadRuntime - Trying Loading file 
as NAR file: /pulsar/bin/kotlin-io-example-0.0.1.nar
   2023-09-05T13:25:57,339+0000 [main] INFO  
org.apache.pulsar.functions.runtime.thread.ThreadRuntime - Initialize function 
class loader for function sinkTest at function cache manager, 
functionClassLoader: 
org.apache.pulsar.common.nar.NarClassLoader[/tmp/pulsar_localrunner_nars_342497436883571291/pulsar-nar/k
   otlin-io-example-0.0.1.nar-unpacked/F1JRTek3XV6vbSMOdIsP6w]
   2023-09-05T13:25:57,344+0000 [main] INFO  
org.apache.pulsar.functions.runtime.thread.ThreadRuntime - ThreadContainer 
starting function with instanceId 0 functionId 
f25b56f8-701f-4c18-abd5-63b5a0ab4e3f namespace default
   HELLO
   2023-09-05T13:25:57,592+0000 [pulsar-client-io-1-3] INFO  
org.apache.pulsar.client.impl.ConnectionPool - [[id: 0xf684190d, 
L:/172.18.0.5:36932 - R:broker/172.18.0.4:6650]] Connected to server
   2023-09-05T13:25:57,774+0000 [pulsar-client-io-1-7] WARN  
org.apache.pulsar.client.impl.ConnectionPool - Failed to open connection to 
127.0.0.1/<unresolved>:6650 : 
io.netty.channel.AbstractChannel$AnnotatedConnectException: finishConnect(..) 
failed: Connection refused: /127.0.0.1:6650
   
   ```
   
   It is able to connect to the broker:
   `2023-09-05T13:25:57,592+0000 [pulsar-client-io-1-3] INFO  
org.apache.pulsar.client.impl.ConnectionPool - [[id: 0xf684190d, 
L:/172.18.0.5:36932 - R:broker/172.18.0.4:6650]] Connected to server`
   but still fails when trying to connect to localhost? Any idea what I am 
missing.
   
   How would I handle the described scenario with multiple brokers? Can 
--broker-service-url occur multiple times or take a list?
   


-- 
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