[
https://issues.apache.org/jira/browse/IGNITE-15538?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Vyacheslav Koptilin updated IGNITE-15538:
-----------------------------------------
Description:
Trying to start a new node via CLI without specifying metastorage raft group
may lead to the following exception:
{code:java}
Exception in thread "main" class org.apache.ignite.lang.IgniteException: Unable
to start node=[new1].
at org.apache.ignite.internal.app.IgniteImpl.start(IgniteImpl.java:293)
at
org.apache.ignite.internal.app.IgnitionImpl.doStart(IgnitionImpl.java:141)
at
org.apache.ignite.internal.app.IgnitionImpl.start(IgnitionImpl.java:72)
at org.apache.ignite.app.IgniteCliRunner.main(IgniteCliRunner.java:59)
Caused by: java.lang.NullPointerException
at
org.apache.ignite.raft.jraft.rpc.impl.RaftGroupServiceImpl.sendWithRetry(RaftGroupServiceImpl.java:456)
at
org.apache.ignite.raft.jraft.rpc.impl.RaftGroupServiceImpl.refreshLeader(RaftGroupServiceImpl.java:202)
at
org.apache.ignite.raft.jraft.rpc.impl.RaftGroupServiceImpl.start(RaftGroupServiceImpl.java:158)
at org.apache.ignite.internal.raft.Loza.prepareRaftGroup(Loza.java:99)
at
org.apache.ignite.internal.metastorage.MetaStorageManager.start(MetaStorageManager.java:167)
at
org.apache.ignite.internal.app.IgniteImpl.doStartComponent(IgniteImpl.java:384)
at org.apache.ignite.internal.app.IgniteImpl.start(IgniteImpl.java:278)
{code}
The root cause is the fact we a trying to start RaftGroupServiceImpl with an
empty list of peers, which leads to this NullPointerException when
refsreshLeader request is issued. This behavior is fixed by IGNITE-15027 (well,
it is a work-around until IGNITE-14414 is implemented).
Also, trying to start a new node without a configuration file (which is
optional) results in NullPointerException:
{code:java}
Exception in thread "main" java.lang.NullPointerException
at org.apache.ignite.app.IgniteCliRunner.main(IgniteCliRunner.java:59)
{code}
The reason for this exception is the following code:
{code:java|title=IgniteCliRunner}
public static void main(String[] args) throws IOException {
...
ignition.start(parsedArgs.nodeName, parsedArgs.config.toAbsolutePath(),
Path.of("work"));
}
{code}
where _parsedArgs.config_ can be _null_ just because the configuration file is
optional. so, the fix is trivial.
was:
Trying to start a new node via CLI without specifying metastorage raft group
may lead to the following exception:
{code:java}
Exception in thread "main" class org.apache.ignite.lang.IgniteException: Unable
to start node=[new1].
at org.apache.ignite.internal.app.IgniteImpl.start(IgniteImpl.java:293)
at
org.apache.ignite.internal.app.IgnitionImpl.doStart(IgnitionImpl.java:141)
at
org.apache.ignite.internal.app.IgnitionImpl.start(IgnitionImpl.java:72)
at org.apache.ignite.app.IgniteCliRunner.main(IgniteCliRunner.java:59)
Caused by: java.lang.NullPointerException
at
org.apache.ignite.raft.jraft.rpc.impl.RaftGroupServiceImpl.sendWithRetry(RaftGroupServiceImpl.java:456)
at
org.apache.ignite.raft.jraft.rpc.impl.RaftGroupServiceImpl.refreshLeader(RaftGroupServiceImpl.java:202)
at
org.apache.ignite.raft.jraft.rpc.impl.RaftGroupServiceImpl.start(RaftGroupServiceImpl.java:158)
at org.apache.ignite.internal.raft.Loza.prepareRaftGroup(Loza.java:99)
at
org.apache.ignite.internal.metastorage.MetaStorageManager.start(MetaStorageManager.java:167)
at
org.apache.ignite.internal.app.IgniteImpl.doStartComponent(IgniteImpl.java:384)
at org.apache.ignite.internal.app.IgniteImpl.start(IgniteImpl.java:278)
{code}
The root cause is the fact we a trying to start RaftGroupServiceImpl with an
empty list of peers, which leads to this NullPointerException when
refsreshLeader request is issued. This behavior is fixed by IGNITE-15027 (well,
it is a work-around until IGNITE-14414 is implemented).
Also, trying to start a new node without a configuration file (which is
optional) results in NullPointerException:
{code:java}
Exception in thread "main" java.lang.NullPointerException
at org.apache.ignite.app.IgniteCliRunner.main(IgniteCliRunner.java:59)
{code}
The reason for this exception is the following code:
{code:java|title=IgniteCliRunner}
public static void main(String[] args) throws IOException {
...
ignition.start(parsedArgs.nodeName, parsedArgs.config.toAbsolutePath(),
Path.of("work"));
}
{code}
where _parsedArgs.config_ can be _null _just because the configuration file is
optional. so, the fix is trivial.
> Starting node via CLI can lead to NullPointerException
> ------------------------------------------------------
>
> Key: IGNITE-15538
> URL: https://issues.apache.org/jira/browse/IGNITE-15538
> Project: Ignite
> Issue Type: Bug
> Reporter: Kirill Gusakov
> Assignee: Vyacheslav Koptilin
> Priority: Major
> Labels: ignite-3
> Fix For: 3.0.0-alpha3
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Trying to start a new node via CLI without specifying metastorage raft group
> may lead to the following exception:
> {code:java}
> Exception in thread "main" class org.apache.ignite.lang.IgniteException:
> Unable to start node=[new1].
> at org.apache.ignite.internal.app.IgniteImpl.start(IgniteImpl.java:293)
> at
> org.apache.ignite.internal.app.IgnitionImpl.doStart(IgnitionImpl.java:141)
> at
> org.apache.ignite.internal.app.IgnitionImpl.start(IgnitionImpl.java:72)
> at org.apache.ignite.app.IgniteCliRunner.main(IgniteCliRunner.java:59)
> Caused by: java.lang.NullPointerException
> at
> org.apache.ignite.raft.jraft.rpc.impl.RaftGroupServiceImpl.sendWithRetry(RaftGroupServiceImpl.java:456)
> at
> org.apache.ignite.raft.jraft.rpc.impl.RaftGroupServiceImpl.refreshLeader(RaftGroupServiceImpl.java:202)
> at
> org.apache.ignite.raft.jraft.rpc.impl.RaftGroupServiceImpl.start(RaftGroupServiceImpl.java:158)
> at org.apache.ignite.internal.raft.Loza.prepareRaftGroup(Loza.java:99)
> at
> org.apache.ignite.internal.metastorage.MetaStorageManager.start(MetaStorageManager.java:167)
> at
> org.apache.ignite.internal.app.IgniteImpl.doStartComponent(IgniteImpl.java:384)
> at org.apache.ignite.internal.app.IgniteImpl.start(IgniteImpl.java:278)
> {code}
> The root cause is the fact we a trying to start RaftGroupServiceImpl with an
> empty list of peers, which leads to this NullPointerException when
> refsreshLeader request is issued. This behavior is fixed by IGNITE-15027
> (well, it is a work-around until IGNITE-14414 is implemented).
>
> Also, trying to start a new node without a configuration file (which is
> optional) results in NullPointerException:
> {code:java}
> Exception in thread "main" java.lang.NullPointerException
> at org.apache.ignite.app.IgniteCliRunner.main(IgniteCliRunner.java:59)
> {code}
> The reason for this exception is the following code:
> {code:java|title=IgniteCliRunner}
> public static void main(String[] args) throws IOException {
> ...
> ignition.start(parsedArgs.nodeName,
> parsedArgs.config.toAbsolutePath(), Path.of("work"));
> }
> {code}
> where _parsedArgs.config_ can be _null_ just because the configuration file
> is optional. so, the fix is trivial.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)