当同时使用两个调试器时,应用程序挂起

时间:2017-04-18 00:37:15

标签: c# ignite

我有两个相同的控制台应用程序同时运行。 以下是C#代码

的执行情况
IIgnite ignite = Ignition.Start(config);

ICache<int, string> cache = ignite.GetOrCreateCache<int, string>("CC");

如果我在GetOrCreateCache行放置断点并为两个应用程序启动dubuggering模式,则第一个正在运行的应用程序将触及断点,但不会触及第二个断点。第二个就是挂在那里。

我查了一下日志。它不断重复以下内容

Next node remains the same [nextId=d0bb3ac1-03ae-4833-b739-465c4e3db0d1, nextOrder=1]
Message has been sent to next node [msg=TcpDiscoveryHeartbeatMessage [super=TcpDiscoveryAbstractMessage [sndNodeId=26a833d1-7ca1-4482-9bf4-99fa837681ce, id=333395e7b51-d0bb3ac1-03ae-4833-b739-465c4e3db0d1, verifierNodeId=d0bb3ac1-03ae-4833-b739-465c4e3db0d1, topVer=0, pendingIdx=0, failedNodes=null, isClient=false]], next=d0bb3ac1-03ae-4833-b739-465c4e3db0d1, res=1]
Message has been received: TcpDiscoveryHeartbeatMessage [super=TcpDiscoveryAbstractMessage [sndNodeId=26a833d1-7ca1-4482-9bf4-99fa837681ce, id=333395e7b51-d0bb3ac1-03ae-4833-b739-465c4e3db0d1, verifierNodeId=d0bb3ac1-03ae-4833-b739-465c4e3db0d1, topVer=0, pendingIdx=0, failedNodes=null, isClient=false]]
Processing message [cls=TcpDiscoveryHeartbeatMessage, id=333395e7b51-d0bb3ac1-03ae-4833-b739-465c4e3db0d1]
Message has been added to queue: TcpDiscoveryHeartbeatMessage [super=TcpDiscoveryAbstractMessage [sndNodeId=26a833d1-7ca1-4482-9bf4-99fa837681ce, id=333395e7b51-d0bb3ac1-03ae-4833-b739-465c4e3db0d1, verifierNodeId=d0bb3ac1-03ae-4833-b739-465c4e3db0d1, topVer=0, pendingIdx=0, failedNodes=null, isClient=false]]
Discovery notification [node=TcpDiscoveryNode [id=4cd6f0f5-2f75-4375-97fa-b7f6e4e2c0cd, addrs=[0:0:0:0:0:0:0:1, 127.0.0.1, 172.30.29.142], sockAddrs=[EDISONCWRK2.meridianlink.com/172.30.29.142:47501, /0:0:0:0:0:0:0:1:47501, /127.0.0.1:47501], discPort=47501, order=4, intOrder=4, lastExchangeTime=1492473879345, loc=true, ver=1.9.0#20170302-sha1:0be92732, isClient=false], spiState=CONNECTED, type=NODE_METRICS_UPDATED, topVer=4]

有谁知道原因或如何解决问题? 我问这个问题是因为我正在一个团队中开展一个项目。 如果多个团队成员同时调试,可能会导致问题。

环境:Ignite.NET 1.9,Visual Studio 2015

1 个答案:

答案 0 :(得分:1)

您的两个应用程序加入了同一个Ignite群集。当一个节点在断点处停止时,所有线程都将被挂起。此节点不再响应网络通信。这是导致其他节点挂起的原因 - 它等待响应。

您必须避免暂停一个应用并同时调试另一个应用。

至于团队合作,每个团队成员都应该在自己孤立的环境中工作,以避免干扰他人。这可以通过设置防火墙规则或通过这样调整IgniteConfiguration来实现:

        var c = new IgniteConfiguration
        {
            Localhost = "127.0.0.1",
            DiscoverySpi = new TcpDiscoverySpi
            {
                IpFinder = new TcpDiscoveryStaticIpFinder
                {
                    Endpoints = new[] {"127.0.0.1:47500"}
                },
            }
        };
相关问题