Service-fabric: How to describe an endpoint with one port number and protocols(TCP, UDP) in the manifest?

Created on 5 Nov 2020  路  6Comments  路  Source: microsoft/service-fabric

Cluster 7.1.458.9590, on Win Server 2019.
How to describe an endpoint with one port number and protocols(TCP, UDP) in the manifest, to redirect to container?
I tried without success:

 <Resources>
    <Endpoints>
      <Endpoint Name="Endpoint1" Port="58301" Protocol="udp" />
      <Endpoint Name="Endpoint1" Port="58301" Protocol="tcp" />
    </Endpoints>
  </Resources>

  <ContainerHostPolicies>
    <PortBinding ContainerPort="58301" EndpointRef="Endpoint1"/>
   </ContainerHostPolicies>
 <Resources>
    <Endpoints>
      <Endpoint Name="Endpoint1" Port="58301" Protocol="udp" />
      <Endpoint Name="Endpoint2" Port="58301" Protocol="tcp" />
    </Endpoints>
  </Resources>

  <ContainerHostPolicies>
    <PortBinding ContainerPort="58301" EndpointRef="Endpoint1"/>
    <PortBinding ContainerPort="58301" EndpointRef="Endpoint2"/>
   </ContainerHostPolicies>
area-Hosting

All 6 comments

@athinanthny @tugup @gkhanna79
Does this simple question take so long to answer?
Using the second option above, the container only applies the first occurrence of the port, and ignores the second.
Command: _docker inspect contId_, return

            "PortBindings": {
                "58301/tcp": [
                    {
                        "HostIp": "",
                        "HostPort": "58301"
                    }
                ]
            },

If I manually start the container with the necessary ports (similar to the construction from Endpoints), then everything works correctly.
For example: _docker run -d --rm -p 58301:58301 -p 58301:58301/udp mcr.microsoft.com/windows/servercore:ltsc2019 ping localhost -t_
_docker inspect contId_, return:

            "PortBindings": {
                "58301/tcp": [
                    {
                        "HostIp": "",
                        "HostPort": "58301"
                    }
                ],
                "58301/udp": [
                    {
                        "HostIp": "",
                        "HostPort": "58301"
                    }
                ]
            },

@maburlik, maybe you can tell?

We are experiencing same issue. Is there any workaround for this bug?

I upgraded the cluster to version 8.0.514.9590, but the problem persists!
Can someone with expertise comment on this issue?
@athinanthny @tugup @gkhanna79 @peterpogorski

Sorry for the delay, service fabric has never supported the multiple protocols for an endpoint.

@tugup, Are there any further plans to fix this? 袝his is a big problem for us.

We have a work item filed to support more docker args. We haven't planned the work item yet.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sxp-sme picture sxp-sme  路  9Comments

srivathsanvlb picture srivathsanvlb  路  3Comments

lukeholbertmsft picture lukeholbertmsft  路  5Comments

NArnott picture NArnott  路  10Comments

nikulk picture nikulk  路  7Comments