apache/pulsar
View on GitHubsame pulsar-admin should seamlessly work with both brokers and function workers in a distributed environment
Open
#6,425 opened on Feb 26, 2020
area/functiongood first issuehelp wantedtype/feature
Description
I am running Function worker as a separate machine, and pulsar-admin gives this error:
# bin/pulsar-admin functions create --py c.py --classname router.RoutingFunction --tenant c1-d1 --namespace emsaas --name test1 --inputs persistent://c1-d1/emsaas/in
Function worker service is not done initializing. Please try again in a little while.
Reason: HTTP 503 Service Unavailable
client.conf points to the broker. Changing webServiceUrl to point to the function worker fixes the issue. This is not intuitive and the error message doesn't help. I would expect pulsar-admin to get the Function worker address from the broker somehow and work transparently without the need to use different client.conf's.
Relevant broker log: 172.32.2.235 is the address of the Function worker, and the log that fails it seems to connect to 127.0.0.1.
Feb 23 13:17:09 localhost pulsar: 13:17:09.892 [pulsar-web-30-15] INFO org.eclipse.jetty.server.RequestLog - 172.32.2.235 - - [23/Feb/2020:13:17:09 +0000] "GET /admin/v2/persistent/public/functions/coordinate/stats HTTP/1.1" 200 901 "-" "Pulsar-Java-v2.5.0" 1
Feb 23 13:17:39 localhost pulsar: 13:17:39.879 [pulsar-web-30-8] INFO org.eclipse.jetty.server.RequestLog - 172.32.2.235 - - [23/Feb/2020:13:17:39 +0000] "GET /admin/v2/persistent/public/functions/coordinate/stats HTTP/1.1" 200 901 "-" "Pulsar-Java-v2.5.0" 3
Feb 23 13:17:41 localhost pulsar: 13:17:41.644 [pulsar-web-30-4] INFO org.eclipse.jetty.server.RequestLog - 127.0.0.1 - - [23/Feb/2020:13:17:41 +0000] "POST /admin/v3/functions/c1-d1/emsaas/test1 HTTP/1.1" 503 98 "-" "Pulsar-Java-v2.5.0" 4
Feb 23 13:17:54 localhost kernel: ena: Feature 27 isn't supported
Feb 23 13:18:09 localhost pulsar: 13:18:09.879 [pulsar-web-30-6] INFO org.eclipse.jetty.server.RequestLog - 172.32.2.235 - - [23/Feb/2020:13:18:09 +0000] "GET /admin/v2/persistent/public/functions/coordinate/stats HTTP/1.1" 200 901 "-" "Pulsar-Java-v2.5.0" 1