You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am not 100% sure if this is a nats-c bug or nats-cli bug. I have a microservice published via the nats-c api. When I run nats micro list I see the following error.
$ nats micro list
nats: error: /endpoints/0/name: does not match pattern '^[a-zA-Z0-9_-]+$',/endpoints/1/name: does not match pattern '^[a-zA-Z0-9_-]+$',/endpoints/2/name: does not match pattern '^[a-zA-Z0-9_-]+$'
If I run nats req '$SRV.INFO.candleserver' I see the following output:
~/nats$ nats req '$SRV.INFO.candleserver' ''
13:37:38 Sending request on "$SRV.INFO.candleserver"
13:37:38 Received with rtt 8.610413ms
{"description":"Candlestick Server","endpoints":[{"name":"candles.put_candles","subject":"candles.put_candles"},{"name":"candles.get_candles","subject":"candles.get_candles"},{"name":"candles.valid_timerange","subject":"candles.valid_timerange"}],"id":"UZEQXJ2PMIOH1W9WG4M9QV","name":"candleserver","type":"io.nats.micro.v1.info_response","version":"1.0.0"}
If I look at the demo service reported by nats cli I see the following:
~/nats$ nats req '$SRV.INFO.foobar' ''
13:39:30 Sending request on "$SRV.INFO.foobar"
13:39:30 Received with rtt 1.162433ms
{"name":"foobar","id":"ZjT4ZocsAU0ubxDd3HER4X","version":"1.0.0","metadata":{"_nats.client.created.library":"natscli","_nats.client.created.version":"0.1.4"},"type":"io.nats.micro.v1.info_response","description":"NATS CLI Demo Service (foobar)","endpoints":[{"name":"echo","subject":"foobar.echo","queue_group":"q","metadata":null}]}
I noticed something different in the name returned. In the case of nats-c the name is a combination of the endpoint is servicename.endpointname but the demo server uses just name. It would make sense since the . is not covered by the regexp.
Expected behavior
The service is displayed in the UI along side the service displayed with nats micro serve foobar
Server and client version
Server: v2.10.7
nats-c: 3.7.0
Host environment
No response
Steps to reproduce
Start the demo service
NATS CLI Micro Service foobar handler 993027 waiting for requests on nats://127.0.0.1:4222
Listening Subjects:
foobar.echo: Echo Service
Requests Log:
Run nats micro list
~/nats$ nats micro list
╭────────────────────────────────────────────────────────────────────────────╮
│ All Micro Services │
├────────┬─────────┬────────────────────────┬────────────────────────────────┤
│ Name │ Version │ ID │ Description │
├────────┼─────────┼────────────────────────┼────────────────────────────────┤
│ foobar │ 1.0.0 │ ZjT4ZocsAU0ubxDd3HER4X │ NATS CLI Demo Service (foobar) │
╰────────┴─────────┴────────────────────────┴────────────────────────────────╯
Run nats-c created service
~/nats$ nats micro list
nats: error: /endpoints/0/name: does not match pattern '^[a-zA-Z0-9_-]+$',/endpoints/1/name: does not match pattern '^[a-zA-Z0-9_-]+$',/endpoints/2/name: does not match pattern '^[a-zA-Z0-9_-]+$'
The text was updated successfully, but these errors were encountered:
Observed behavior
I am not 100% sure if this is a nats-c bug or nats-cli bug. I have a microservice published via the nats-c api. When I run
nats micro list
I see the following error.If I run
nats req '$SRV.INFO.candleserver'
I see the following output:If I look at the demo service reported by nats cli I see the following:
I noticed something different in the name returned. In the case of nats-c the name is a combination of the endpoint is
servicename.endpointname
but the demo server uses justname
. It would make sense since the.
is not covered by the regexp.Expected behavior
The service is displayed in the UI along side the service displayed with
nats micro serve foobar
Server and client version
Server: v2.10.7
nats-c: 3.7.0
Host environment
No response
Steps to reproduce
Start the demo service
Run
nats micro list
Run nats-c created service
The text was updated successfully, but these errors were encountered: