Skip to content

Error message for port conflicts of dependencies is logged at a to low level #15700

@Lyra2108

Description

@Lyra2108

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

If you launch a custom container and you pin it to a port via aspire and that port is used you get a message like this:

 Aspire.Hosting.Dcp.dcpctrl.dcpctrl.ServiceReconciler[0]
      Service Camunda-elasticsearch-http is configured to use a port in the ephemeral range on your machine, which may cause conflicts; ports in the ephemeral range are used by the system for dynamic allocation and outgoing connections.  {"Service": "/Camunda-elasticsearch-http", "Reconciliation": 68, "Port": 50201, "Ephemeral Range": "49152-65535", "error": "could not start the proxy for the service: listen tcp [::1]:50201: bind: An attempt was made to access a socket in a way forbidden by its access permissions."}

On fortunately this is only logged at log level debug or trace, which mad it really hard to debug. We spend quite some time debugging it because it worked on some systems but not on others.

Expected Behavior

This should at least be a warning if not an error, so that you can see the message by default and fix it.

Steps To Reproduce

I added a custom container resource and used WithHttpEndpoint the endpoints port was blocked by an other program e.g.

  return builder.AddResource(new CamundaOperateResource(name))
            .WithImage(CamundaOperateResource.DefaultImage)
            .WithImageTag(CamundaOperateResource.DefaultTag)
            .WithHttpEndpoint(name: CamundaOperateResource.HttpEndpointName, targetPort: CamundaOperateResource.HttpEndpointPort, port: port)

Exceptions (if any)

No response

.NET Version info

No response

Anything else?

No response

Metadata

Metadata

Assignees

Labels

area-app-modelIssues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplicationarea-orchestrator

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions