You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "dmonopoly (via GitHub)" <gi...@apache.org> on 2024/12/16 18:22:32 UTC
[I] [Bug] getPartitionedTopicMetadata does not work [pulsar]
dmonopoly opened a new issue, #23741:
URL: https://github.com/apache/pulsar/issues/23741
### Search before asking
- [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.
### Read release policy
- [X] I understand that unsupported versions don't get bug fixes. I will attempt to reproduce the issue on a supported version of Pulsar client and Pulsar broker.
### Version
Pulsar v3.3.1.8
Mac OS
Java
openjdk 11.0.22 2024-01-16 LTS
OpenJDK Runtime Environment Corretto-11.0.22.7.1 (build 11.0.22+7-LTS)
OpenJDK 64-Bit Server VM Corretto-11.0.22.7.1 (build 11.0.22+7-LTS, mixed mode)
### Minimal reproduce step
https://stackoverflow.com/questions/79279743/getting-number-of-partitions-of-a-pulsar-topic-could-not-be-parsed-into-a-prope
### What did you expect to see?
Returns partitions count.
### What did you see instead?
Exception in thread "main" org.apache.pulsar.client.admin.PulsarAdminException: java.lang.IllegalArgumentException: pulsar+ssl://mypath.com:1234/admin/v2/persistent/abc/def/myplacev1/partitions could not be parsed into a proper Uri, missing scheme
### Anything else?
_No response_
### Are you willing to submit a PR?
- [ ] I'm willing to submit a PR!
--
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: commits-unsubscribe@pulsar.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] getPartitionedTopicMetadata does not work [pulsar]
Posted by "nodece (via GitHub)" <gi...@apache.org>.
nodece commented on issue #23741:
URL: https://github.com/apache/pulsar/issues/23741#issuecomment-2550260399
It looks you are using the TLS, so I guess the URL is `https://pc-123abce.ci-abc1.pulsar.mycompany.com:8081`.
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] getPartitionedTopicMetadata does not work [pulsar]
Posted by "dmonopoly (via GitHub)" <gi...@apache.org>.
dmonopoly commented on issue #23741:
URL: https://github.com/apache/pulsar/issues/23741#issuecomment-2549840453
By URL you mean the service URL? Service url we normally use is pulsar+ssl://pc-123abce.ci-abc1.pulsar.mycompany.com:6651 to connect successfully - how would I get the right pulsar admin url from this?
The way the lookup happens is
```
val admin: PulsarAdmin =
PulsarAdmin
.builder()
.authentication(authParams)
.serviceHttpUrl(serviceUrl)
.tlsTrustCertsFilePath(tlsTrustCertsFilePath)
.allowTlsInsecureConnection(tlsAllowInsecureConnection)
.build()
// Error here: can't get number of partitions
println(admin.topics().getPartitionedTopicMetadata(inputTopic))
```
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] getPartitionedTopicMetadata does not work [pulsar]
Posted by "dmonopoly (via GitHub)" <gi...@apache.org>.
dmonopoly closed issue #23741: [Bug] getPartitionedTopicMetadata does not work
URL: https://github.com/apache/pulsar/issues/23741
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] getPartitionedTopicMetadata does not work [pulsar]
Posted by "BewareMyPower (via GitHub)" <gi...@apache.org>.
BewareMyPower commented on issue #23741:
URL: https://github.com/apache/pulsar/issues/23741#issuecomment-2550372444
Generally you can check the port from `webServicePort` config or `webServicePortTls` config if TLS is enabled. The `advertisedAddress` is the hostname.
For example:
```properties
webServicePort=8080
advertisedAddress=myhost
```
then you can use `http://myhost:8080` as the URL for admin APIs.
```properties
webServicePortTls=8081
advertisedAddress=myhost
````
then you can use `https://myhost:8081` as the URL for admin APIs.
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] getPartitionedTopicMetadata does not work [pulsar]
Posted by "dmonopoly (via GitHub)" <gi...@apache.org>.
dmonopoly commented on issue #23741:
URL: https://github.com/apache/pulsar/issues/23741#issuecomment-2557594965
Ended up side-stepping this issue after seeing the pulsar-flink connector code and finding PulsarClientImpl has a getNumberOfPartitions(topic) which worked.
`(client as PulsarClientImpl).getNumberOfPartitions(topic).get()`
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] getPartitionedTopicMetadata does not work [pulsar]
Posted by "dmonopoly (via GitHub)" <gi...@apache.org>.
dmonopoly commented on issue #23741:
URL: https://github.com/apache/pulsar/issues/23741#issuecomment-2552207963
Where are these configuration files that have the webServicePort config or webServicePortTls config? I see that they can be on my local pulsar install in conf/client.conf, but I would have expected to have these configs somewhere that can be looked up from where the pulsar jobs are typically deployed; StreamNative?
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] getPartitionedTopicMetadata does not work [pulsar]
Posted by "visxu (via GitHub)" <gi...@apache.org>.
visxu commented on issue #23741:
URL: https://github.com/apache/pulsar/issues/23741#issuecomment-2552695126
> Where are these configuration files that have the webServicePort config or webServicePortTls config? I see that they can be on my local pulsar install in conf/client.conf, but I would have expected to have these configs somewhere that can be looked up from where the pulsar jobs are typically deployed; StreamNative?
You can find these configs in `conf/broker.conf`.
```shell
visxu➜~/pulsar-cluster-3.0.6» grep "webServicePort" pulsar-1/conf/broker.conf [11:22:13]
webServicePort=18080
webServicePortTls=18443
```
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] getPartitionedTopicMetadata does not work [pulsar]
Posted by "nodece (via GitHub)" <gi...@apache.org>.
nodece commented on issue #23741:
URL: https://github.com/apache/pulsar/issues/23741#issuecomment-2547694903
Please use the correct URL.
- Pulsar Admin: `http://mypath.com:1234`. Default to `http://localhost:8080` if you run the pulsar locally.
- Pulsar Client: `http://mypath.com:1234` or `pulsar://mypath.com:6650`. Default to `pulsar://localhost:6650` if you run the pulsar locally.
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org