Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Trying to start a new node via CLI without specifying metastorage raft group may lead to the following exception:
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)
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:
Exception in thread "main" java.lang.NullPointerException
at org.apache.ignite.app.IgniteCliRunner.main(IgniteCliRunner.java:59)
The reason for this exception is the following code:
public static void main(String[] args) throws IOException { ... ignition.start(parsedArgs.nodeName, parsedArgs.config.toAbsolutePath(), Path.of("work")); }
where parsedArgs.config can be null just because the configuration file is optional. so, the fix is trivial.
Attachments
Issue Links
- is duplicated by
-
IGNITE-15683 CLI tool says 'Can't start the node' even though the node is successfully started
- Resolved
-
IGNITE-15408 CLI: 'ignite node start' command produces NPE when optional config path is not passed
- Resolved
- links to