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 try to deploy Silo client and silo server on Docker via docker-compose, but I get error that silo client cannot connect to other container on port 30000. I set upped containers for talking, and I can send simple http request from first project to second and get response. But I can't run project using Orleans. This is code for client:
In the future I have to use UseRedisClustering instead a UseLocalhostClustering. This project successfully run in local PC, but in Docker I get exception ''Connection attempt to endpoint S127.0.0.1:30000:0 failed". This is Dockerfile.silo for server project:
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
WORKDIR /app
EXPOSE 5034
EXPOSE 11111
EXPOSE 30000
# ...
ENTRYPOINT ["dotnet", "DockerSilo.Orleans.dll", "--urls", "http://*:5034" ]
And Dockerfile for client project:
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
WORKDIR /app
EXPOSE 5131
# ...
ENTRYPOINT ["dotnet", "DockerSilo.Api.dll", "--urls", "http://*:5131"]
As you are seen, all parts configured well, but I don't know why this doesn't work. Please, help me resolve this problem, because I did 250 container builds tries for last two days and can't solve this alone
The text was updated successfully, but these errors were encountered:
UseLocalhostClustering Is made to connect on same computer one silo and one client for dev purpose.
Orleans is not designed to pass in direct connection though part (client, silo, ...) except in specific local condition (For dev).
With the docker compose you create a virtual network where every container have a virtual IP in it like theire was on separate computer.
You can:
Orlean Way: Use a db image and the nuget package associate to provide a meeting point
You can change to gateway to redirect docker localhost to the computer one instead on the docker one. It will by pass the docker virtual network for localhost connection.
with extraHost host.docker.internal:host-gateway
Replace IPAddress.Loopback by "host.docker.internal"
Attention: Solution 2 will only work with One silo.
Orleans is designed to use a DB a meeting point for cluster nodes (Silo) and/or clients. Through docker it's easy to have one.
PS: Sometime the client close because it can connect to any silo. I advise you to delay the client start to prevent it
The host.docker.internal should be mentioned in the Orleans-Server? I am using UseDevelopmentClustering for the server? Should I mention host.docker.internal for the PrimarySiloEndpoint, insteand of IPAddress.Loopback or IPAddress.Any?
What about the AdvertisedIPAddress should be set?
This host.docker.internal:host-gateway should be mentioned in the docker-compose, for the server container?
I try to deploy Silo client and silo server on Docker via docker-compose, but I get error that silo client cannot connect to other container on port 30000. I set upped containers for talking, and I can send simple http request from first project to second and get response. But I can't run project using Orleans. This is code for client:
Server code:
In the future I have to use UseRedisClustering instead a UseLocalhostClustering. This project successfully run in local PC, but in Docker I get exception ''Connection attempt to endpoint S127.0.0.1:30000:0 failed". This is Dockerfile.silo for server project:
And Dockerfile for client project:
And docker-compose:
As you are seen, all parts configured well, but I don't know why this doesn't work. Please, help me resolve this problem, because I did 250 container builds tries for last two days and can't solve this alone
The text was updated successfully, but these errors were encountered: