新しいIgniteConfigurationインスタンスを作成しようとすると、null参照例外が引き続き発生します。これは私が設定を作成する方法である:.NETアプリケーション内でApache Ignite.NETが正常に起動できない
var cfg = new IgniteConfiguration
{
// Explicitly configure TCP discovery SPI to provide list of initial nodes
// from the first cluster.
DiscoverySpi = new TcpDiscoverySpi
{
// Initial local port to listen to.
LocalPort = 49500,
// Changing local port range. This is an optional action.
LocalPortRange = 2,
IpFinder = new TcpDiscoveryStaticIpFinder
{
// Addresses and port range of the nodes from the first cluster.
// 127.0.0.1 can be replaced with actual IP addresses or host names.
// The port range is optional.
Endpoints = { "127.0.0.1:49500..49520" }
}
},
// Explicitly configure TCP communication SPI changing
// local port number for the nodes from the first cluster.
CommunicationSpi = new TcpCommunicationSpi
{
LocalPort = 49100
}
};
例外の詳細は、内部例外とメッセージを持っていないことは、単に「オブジェクト参照がオブジェクトのインスタンスに設定されていません。」と言います
web.config設定を使用してIgniteを起動しようとすると、明示的にポートを設定しようとしない限り動作します。たとえば、これが働いて設定されています。しかし、私はmutlicastブロードキャストを使用しないようにする必要があり
<igniteConfiguration xmlns="http://ignite.apache.org/schema/dotnet/IgniteConfigurationSection" localhost="127.0.0.1" peerAssemblyLoadingMode="CurrentAppDomain">
<atomicConfiguration atomicSequenceReserveSize="10" />
<AutoGenerateIgniteInstanceName>true</AutoGenerateIgniteInstanceName>
<discoverySpi type="TcpDiscoverySpi" localPort="49500" localPortRange="2">
<ipFinder type="TcpDiscoveryStaticIpFinder">
<endpoints>
<string>127.0.0.1</string>
<string>127.0.0.1:49500..49502</string>
</endpoints>
</ipFinder>
</discoverySpi>
と私は明示的にポートを設定する必要があります。この設定は、デフォルトのポートを使用して終了します。だから、ドキュメントによると、私はこれを行うことができます。
<igniteConfiguration xmlns="http://ignite.apache.org/schema/dotnet/IgniteConfigurationSection" localhost="127.0.0.1" peerAssemblyLoadingMode="CurrentAppDomain">
<atomicConfiguration atomicSequenceReserveSize="10" />
<AutoGenerateIgniteInstanceName>true</AutoGenerateIgniteInstanceName>
<discoverySpi type="TcpDiscoverySpi" localPort="49500" localPortRange="2">
<ipFinder type="TcpDiscoveryStaticIpFinder">
<endpoints>
<string>127.0.0.1</string>
<string>127.0.0.1:49500..49502</string>
</endpoints>
</ipFinder>
</discoverySpi>
<communicationSpi type="TcpCommunicationSpi" localPort="49500" localPortRange="2" />
は、しかし、アプリケーションが起動しないこの設定を使用して、49500に明示的にポートを設定するだけでIgnite.startFromConfiguration()ステップでハングアップします。
私はインスタンスを作成するためにweb.configを使用することはできませんし、null参照例外のためにプログラムで起動することもできません。
誰もが考えている?
少し深く見ると、例外はTcpDiscoveryStaticIpFinderクラスの構築によって実際にスローされます。私はそれを逆コンパイルして、コンストラクタが何をしているかを調べるので、何もしないように思えるので、私には意味をなさない。基本クラスのコンストラクタでさえも空です。私は何か間違ったことをする必要があります。 – DKhanaf
アップデート、私はプログラム的な設定をしています。 Apparatlyこのエンドポイント= {"127.0.0.1:49500..49520"}が好きではありませんでしたが、エンドポイント=新しいリストでうまくいきます。 {"127.0.0.1:49500..49520"} –
DKhanaf