Error message for port conflicts of dependencies is logged at a to low level
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 991
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 196
Description
### Is there an existing issue for this?
- [x] 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:
```shell
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.
```c#
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_
Contributor guide
Assessment
This issue has not been assessed yet.