microsoft / service-fabric-yarp

YARP integration with Service Fabric
MIT License
32 stars 9 forks source link

Label Parsing error #15

Closed solidcloudio closed 1 year ago

solidcloudio commented 1 year ago

I can't get YarpDiscoveryService to parse my app's config correctly.

I've tried the out of the box config, and several derivatives of it..

Attempt1: `

`

Attempt2: `

`

Attempt3: `

`

This looks similar to the Label on the PingerService, (which works) so, I'm at a loss as to the problem.

Regardless in the FabricDiscoveryService Log I see: info: Yarp.ServiceFabric.FabricDiscovery.SFYarpConfig.SFYarpConfigProducer[0] There are 0 label parsing errors info: Yarp.ServiceFabric.FabricDiscovery.SFYarpConfig.SFYarpConfigProducer[0] There are 1 label parsing errors fail: Yarp.ServiceFabric.FabricDiscovery.SFYarpConfig.SFYarpConfigProducer[0] No acceptable endpoints found for replica '133182949244780821'. Search criteria: listenerName='', emptyStringMatchesAnyListener=true. info: Yarp.ServiceFabric.FabricDiscovery.SFYarpConfig.SFYarpConfigProducer[0] There are 1 label parsing errors fail: Yarp.ServiceFabric.FabricDiscovery.SFYarpConfig.SFYarpConfigProducer[0] No acceptable endpoints found for replica '133182949244780821'. Search criteria: listenerName='', emptyStringMatchesAnyListener=true. info: Yarp.ServiceFabric.FabricDiscovery.SFYarpConfig.SFYarpConfigProducer[0] There are 1 label parsing errors fail: Yarp.ServiceFabric.FabricDiscovery.SFYarpConfig.SFYarpConfigProducer[0] No acceptable endpoints found for replica '133182949244780821'. Search criteria: listenerName='', emptyStringMatchesAnyListener=true. info: Yarp.ServiceFabric.Common.Telemetry.TextOperationLogger[0] Operation ended: SFYarpConfigProducer.ProduceConfig, 78.1ms, success info: Yarp.ServiceFabric.FabricDiscovery.SFYarpConfig.SFYarpConfigProducerWorker[0] Signaling new SFYarp configs. 1 clusters, 1 routes.

So, it's skipping my services due to a "label parsing error" The labels look fine, what am I missing here?

solidcloudio commented 1 year ago

Think I figured this out by compared the manifests of the Pinger Service with my services..

Not sure why it matters, but I added this to the Service Manifest:

<Endpoint Protocol="http" Name="ReferralEndpoint" Type="Input" Port="8092" /></Endpoints> changed to: <Endpoint UriScheme="http" Name="ReferralEndpoint" Type="Input" Port="8091" CodePackageRef="Code" /></Endpoints>

Now I don't see label parsing errors anymore..

info: Yarp.ServiceFabric.Common.Telemetry.TextOperationLogger[0]
      Operation started: SFYarpConfigProducer.ProduceConfig
info: Yarp.ServiceFabric.FabricDiscovery.SFYarpConfig.SFYarpConfigProducer[0]
      There are 0 label parsing errors
info: Yarp.ServiceFabric.FabricDiscovery.SFYarpConfig.SFYarpConfigProducer[0]
      There are 0 label parsing errors
info: Yarp.ServiceFabric.FabricDiscovery.SFYarpConfig.SFYarpConfigProducer[0]
      There are 0 label parsing errors
info: Yarp.ServiceFabric.FabricDiscovery.SFYarpConfig.SFYarpConfigProducer[0]
      There are 0 label parsing errors