Closed a641545621 closed 6 years ago
client var siloAddress = "192.168.1.250";
Client access address Fill in intranet address can not access normally
对不起,我不明白,但是我觉得你应该用listenOnAnyHostAddress: true
:
builder.ConfigureEndpoints(
advertisedIP: siloAddress,
siloPort: siloPort,
gatewayPort: gatewayPort,
listenOnAnyHostAddress: true)
If you use UseDevelopmentClustering
then advertisedIP
is not important for clients, only other silos. You can use string hostname
override of ConfigureEndpoints
and set it to "localhost"
. If you do that, it will try to pick an intranet IP for you (must also set listenOnAnyHostAddress: true
!):
builder.ConfigureEndpoints(
hostname: "localhost",
siloPort: siloPort,
gatewayPort: gatewayPort,
listenOnAnyHostAddress: true)
normal circumstances
The first kind of abnormal situation
The second abnormal situation
There are two problems, 1.IPAddress.Parse("192.168.1.250") Connection failed 2.port:30020 Connection failed
I want to find out why and how to solve it
Could you upload your broken code, @a641545621? I'll test locally
Why is it connecting to 30020 when the silo is configured to listen on 30000?
https://github.com/a641545621/orleans-test2/blob/master/host.rar the silo is configured to listen on 30020
@a641545621 I see you're targeting CoreRT. CoreRT is not supported yet
After removing the <RuntimeIdentifier>
element from your project and removing unused packages, your code works for me
@a641545621 please reopen this issue if you are still seeing this error.
server var siloPort = 20028; int gatewayPort = 30020; var siloAddress = IPAddress.Parse("0.0.0.0");// IPAddress.Loopback; var builder = new SiloHostBuilder() .UseEnvironment("Development") .Configure(options =>
{
options.ClusterId = "test1";
options.ServiceId = "test1";
})
.UseDevelopmentClustering(options => options.PrimarySiloEndpoint = new IPEndPoint(siloAddress, siloPort))
.ConfigureEndpoints(siloAddress, siloPort, gatewayPort)
.ConfigureApplicationParts(parts => parts.AddApplicationPart(typeof(Test).Assembly).WithReferences());
client var siloAddress = "127.0.0.1"; //IPAddress.Loopback; var gatewayPort = 30020; var uri = (new IPEndPoint(IPAddress.Parse(siloAddress), gatewayPort)).ToGatewayUri(); client = new ClientBuilder() .ConfigureDefaults() // .UseLocalhostClustering(gatewayPort) .Configure(opt =>
{
opt.ClusterId = "test1";
opt.ServiceId = "test1";
})
////集群
.UseStaticClustering(options => options.Gateways.Add(uri))//集群
.ConfigureApplicationParts(parts => parts.AddApplicationPart(typeof(ITest).Assembly).WithReferences())
server var siloAddress = IPAddress.Parse("0.0.0.0"); Can connect but cannot get information var siloAddress=IPAddress.Loopback; Cannot connect service Should be server port listening failed
can you tell me the reason? I want to test the deployment of the production environment,A silo A client silo is deployed on the server,Local test is normal access