I can't get Apache Ignite.NET to start up properly inside my .NET application -
i keep getting null reference exception when try create new igniteconfiguration instance. how create configuration:
var cfg = new igniteconfiguration { // explicitly configure tcp discovery spi provide list of initial nodes // first cluster. discoveryspi = new tcpdiscoveryspi { // initial local port listen to. localport = 49500, // changing local port range. optional action. localportrange = 2, ipfinder = new tcpdiscoverystaticipfinder { // addresses , port range of nodes first cluster. // 127.0.0.1 can replaced actual ip addresses or host names. // port range optional. endpoints = { "127.0.0.1:49500..49520" } } }, // explicitly configure tcp communication spi changing // local port number nodes first cluster. communicationspi = new tcpcommunicationspi { localport = 49100 } };
the exception details don't have inner exception , message says "object reference not set instance of object."
when try start ignite using web.config configuration works unless try explicitly set port. example, working configuration:
<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>
however, have need not use mutlicast broadcast , need set explicit port. configuration ends using default port. according documentation can this:
<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" />
setting port explicitly 49500, using configuration application not start, hangs @ ignite.startfromconfiguration() step.
so can't use web.config create instance nor can programmatically start because of null reference exception.
anyone have ideas?
endpoints
list of addresses, should initialized new[] {...}
. see example here: https://apacheignite-net.readme.io/v2.1/docs/configuration#section-c-code
as second issue, you're trying set same port discovery , communication, doesn't make sense. different protocols , should use different, non intersecting ranges of ports.
Comments
Post a Comment