Fully synced node gets stuck after a few hours
The node is perfectly in sync for hours, then it just stops at a random milestone for no apparent reason, without being touched at all. The latestMilestone keeps advancing with COO, the latestSolidMilestone is stuck. It doesn't move at all for hours, but after an IRI restart, it will get back to full sync within a few minutes. Then another few hours pass, and it gets stuck again.
IRI version 1.4.1.4. I have a couple manual neighbors, but also run Nelson (0.2.2).
At the moment it is 308589 / 308546, if this helps.
Same here, with or without Nelson. Node has good neighbors but has been stuck at 243000 for hours now after a reboot.
Can approve this. But is not stucking.. its hanging behind. I follow my node stats and after ~ 20 minutes the number increase from 308638 to 308639... I will look tomorrow if its increasing
@fijter was your node already in sync?
My node was fine and always in sync up until the moment the COO got paused, after that I had issues. After a couple of restarts my node is in sync again but it didn't move by itself.
I seem to have some issue as well. My node was in sync always with my neighbors, until the upgrade it seems. I had it staying updating the solidSubtangleMilestoneIndex like clockwork for a while yesterday (maybe a couple hours), and then it just stopped, and only the latestMilestoneIndex would continue, but my SolidSubtangleMilestone does not want to move.
I've tried with a fresh db from iota.partners and it will get in sync momentarily, then just will not continue.
I do not use nelson, only manual tethered neighbors which have been stable for a month+.
OK. Now I can confirm that subtangle stopped completely.
Adding some additional info found. Still need time to review further, however unsure if approach listed at end would make sense or cause other issues.
3 nodes
1 - consistently synced with latest milestone
2 - Not synced:
1 - Public node and is connected to fully synced node
1 - Private node connected to not synced public node
Notes on non-synced nodes:
- Upon clearing of db (on both nodes) and starting up process for non-synced public/private nodes. Public node requested transactions at a rate of about 1-2MB/sec from synced public node. The duration lasted
for about 2 hours then dropped down to roughly 20kB/sec.
- Both non-synced nodes stayed in synced with respect to maintaining the same solid milestone index.
- Private node was restarted and solid milestone index jumped and is currently static at 308588. Its public peer is still updating solid milestone index at around the 269000 range.
Nodes are being left in this state until public node reaches 308588.
- Although private node milestone is static, disk usage tends to approach same disk usage as its peered node
Public node: 3819940 mainnetdb (Milestone advancing; currently at around 269900)
Private node: 3633920 mainnetdb (Milestone static @ 308588)
After reviewing some of the code and adding line statements. I see something is causing the conditional statements in updateLatestSolidSubtangleMilestone method to return true and
setting latestSolidSubtangleMilestoneIndex.
Output of logs:
12/21 11:46:19.528 [Solid Milestone Tracker] INFO com.iota.iri.Milestone - Checking milestone => 308589: LastSolidSubtangleMilestoneIndex: 308588
12/21 11:46:19.776 [Solid Milestone Tracker] INFO com.iota.iri.Milestone - Previous milestone => : 308587 solid: false
However looking at all milestones prior, I see gaps in milestone solidity:
12/21 11:57:18.980 [Solid Milestone Tracker] INFO com.iota.iri.Milestone - Validating solidity of milestone: 258996 solid: true
12/21 11:57:18.983 [Solid Milestone Tracker] INFO com.iota.iri.Milestone - Validating solidity of milestone: 258997 solid: false
-- Jumped to next section of non-solid milestones --
12/21 11:57:20.747 [Solid Milestone Tracker] INFO com.iota.iri.Milestone - Validating solidity of milestone: 259060 solid: false
12/21 11:57:21.068 [Solid Milestone Tracker] INFO com.iota.iri.Milestone - Validating solidity of milestone: 259061 solid: true
The initial value of 'latestSolidSubtangleMilestoneIndex' is equal to the value ofand should be assigned to previousSolidSubtangleLatestMilestoneIndex. Given latestSolidSubtangleMilestoneIndex
is less than latestMilestoneIndex, it should execute the updateLatestSolidSubtangleMilestone() method. This method should stop at milestone 258997
(all milestones prior to this was true) but fails to.
https://github.com/iotaledger/iri/blob/501e9493bc0cbd1ef1b3e0df6da39efb8ef4083d/src/main/java/com/iota/iri/LedgerValidator.java#L200
However looking further, I see ledgerValidator::init actually updates milestone.latestSolidSubtangleMilestoneIndex = latestConsistentnMilestone.index(). After following the code
for ledgerValidator::buildSnapot method, it appears things are coming out of order. (Unsure this is expected)
12/21 13:28:28.682 [Solid Milestone Tracker] INFO com.iota.iri.LedgerValidator - Checking milestone snapshot: 243001
12/21 13:28:28.730 [Solid Milestone Tracker] INFO com.iota.iri.LedgerValidator - Milestone 243001 :snapshot consistent: true
12/21 13:28:28.747 [Solid Milestone Tracker] INFO com.iota.iri.LedgerValidator - Checking milestone snapshot: 243032
12/21 13:28:28.774 [Solid Milestone Tracker] INFO com.iota.iri.LedgerValidator - Milestone 243032 :snapshot consistent: true
12/21 13:28:28.780 [Solid Milestone Tracker] INFO com.iota.iri.LedgerValidator - Checking milestone snapshot: 243042
12/21 13:28:28.815 [Solid Milestone Tracker] INFO com.iota.iri.LedgerValidator - Milestone 243042 :snapshot consistent: true
12/21 13:28:28.842 [Solid Milestone Tracker] INFO com.iota.iri.LedgerValidator - Checking milestone snapshot: 243288
12/21 13:28:28.874 [Solid Milestone Tracker] INFO com.iota.iri.LedgerValidator - Milestone 243288 :snapshot consistent: true
The buildsnapshot is ran initially and updates Milestone.latestSolidSubtangleMilestoneIndex with the most recent up to date consistent milestone snapshot index. Following the trail
it appears the following method may be leading up to our inconsistency:
public MilestoneViewModel nextWithSnapshot(Tangle tangle) throws Exception {
MilestoneViewModel milestoneViewModel = next(tangle);
while(milestoneViewModel !=null && !StateDiffViewModel.exists(tangle, milestoneViewModel.getHash())) {
milestoneViewModel = milestoneViewModel.next(tangle);
}
return milestoneViewModel;
}
12/21 13:52:18.054 [Solid Milestone Tracker] INFO c.i.i.controllers.MilestoneViewModel - Current milestone => com.iota.iri.model.IntegerIndex@6d00d621 next => 243002
12/21 13:52:18.054 [Solid Milestone Tracker] INFO c.i.i.controllers.MilestoneViewModel - Current milestone => com.iota.iri.model.IntegerIndex@11e32dd0 next => 243003
12/21 13:52:18.054 [Solid Milestone Tracker] INFO c.i.i.controllers.MilestoneViewModel - Current milestone => com.iota.iri.model.IntegerIndex@7b14323f next => 243004
12/21 13:52:18.054 [Solid Milestone Tracker] INFO c.i.i.controllers.MilestoneViewModel - Current milestone => com.iota.iri.model.IntegerIndex@5cc9e0d1 next => 243005
12/21 13:52:18.054 [Solid Milestone Tracker] INFO c.i.i.controllers.MilestoneViewModel - Current milestone => com.iota.iri.model.IntegerIndex@379394b7 next => 243006
12/21 13:52:18.054 [Solid Milestone Tracker] INFO c.i.i.controllers.MilestoneViewModel - Current milestone => com.iota.iri.model.IntegerIndex@3f16b238 next => 243007
12/21 13:52:18.054 [Solid Milestone Tracker] INFO c.i.i.controllers.MilestoneViewModel - Current milestone => com.iota.iri.model.IntegerIndex@6549fa2f next => 243008
12/21 13:52:18.054 [Solid Milestone Tracker] INFO c.i.i.controllers.MilestoneViewModel - Current milestone => com.iota.iri.model.IntegerIndex@7615413f next => 243009
12/21 13:52:18.055 [Solid Milestone Tracker] INFO c.i.i.controllers.MilestoneViewModel - Current milestone => com.iota.iri.model.IntegerIndex@5d885566 next => 243010
Verified the returned milestones are in sequential order which implys the StateDiffViewModel.exists call is the issue. Looking at this class, I see:
public static boolean exists(Tangle tangle, Hash hash) throws Exception {
return tangle.maybeHas(StateDiff.class, hash);
}
Can the logic pertaining to MilestoneViewModel::*Snapshot be refactored out to leverage TransactionValidator solidity check? Clearing db on private node to see if issue resurfaces with shutdown.
Reviewing this further, it appears the 'updateSnapshot' method only store differences when found. So this would explain the jump, since code only takes into account, milestones with differences.
Stuck again. :)
now 24 hours full in sync...
Same problem here and I tried both OpenJDK 8 and Oracle JRE 8. My full node on CentOS 7 stays in sync for a few hours but then the last solid milestone is not updated any more, although I've got a few good neighbors. I can provide more details for debugging if requested.
same here, i have to restart IRI periodically to remain fully synchronized.
Same issue. My node is connected to a second node that I own that is in sync, but this doesn't allow it to recover. Running IRI 1.4.1.4 on both nodes. 5 neighbors total (one is mine), with 2GB memory and 2 cores. It's running Oracle Java 1.8.0_151.
I'm not paying for the VPS hosting my node anymore, until this is sorted out. Let me know when it happens.
I have two nodes, both running 1.4.1.4. The one node is more powerful and is in sync. The other node is connected to it but does not stay in sync. They both have <= 5 neighbors. I am downgrading the slower node to 1.4.1.2 for it to stay in sync.
Is there a way that the IRI full node can request the transactions it needs to complete the subtangle it is currently working on?
Same here. When I start IRI it sync completely. However, after a few hours it gets behind and then never catches up. When I restart IRI it catches up quickly and then after a few hours falls behind and does not catch up. It actually never sycns from the point where it got behind. Using IRI 1.4.1.4. Plenty of CPU, RAM and Network. This would also occur with IRI v 1.4.1.2.
stuck again, have pulled changes 432 and 435 { "appName": "IRI", "appVersion": "1.4.1.4", "jreAvailableProcessors": 4, "jreFreeMemory": 1245916728, "jreVersion": "1.8.0_151", "jreMaxMemory": 9544663040, "jreTotalMemory": 2448949248, "latestMilestone": "YJ9WRGHKDOLUVKYOGEFXUMIIEXOQI9NNZRGKKUFURKYZIMPMQYWHBDEJVKKIYNVUIEKFOXSHRPUAZ9999", "latestMilestoneIndex": 311550, "latestSolidSubtangleMilestone": "EUVXVFCLBVJQSNSCWJEUQYWPJJSIPSZXGIEQFHDMQJNOQZKMVJVAODWVAEPPDSJLYKURM9RYHEP999999", "latestSolidSubtangleMilestoneIndex": 311540, "neighbors": 8, "packetsQueueSize": 0, "time": 1514212083245, "tips": 5000, "transactionsToRequest": 4, "duration": 0 }
Same here, stuck at 243006. Not sure what I should do. Slack users had mentioned one bad neighbor can cause this. I'm using only Nelson so...I was hoping for hands-free.
This isn't an issue with nelson or a neighbor.
When you start the node, the starting milestone will be 243000 because that is where the last snapshot was taken. The DB you downloaded, if you did, should contain the data since that milestone. My understanding is that the DB tarballs are created hourly, so it should be almost up to date.
After starting the node, the code ingests all of that data (currently over 9GB) and does some work on it, possibly indexing, I haven't dug into it much. You'll see possibly high CPU usage or high storage usage until this step is complete. CPU, RAM, or storage can bottleneck your node during this point. Once the DB processing is complete, if you are connected to functional neighbors, you should start to see milestone updates in the console output.
Typically, a powerful node will take about 30 minutes to get to the point where it starts synchronizing. Most reports from slack tend to indicate 50 minutes to just over an hour. If you don't see milestone updates after 2 hours, I would take a good look at resource utilization on your node and see what is choking it. Worst case scenario, blow out mainnetdb contents and download a fresh DB in the case that it is corrupted.
I have the same problem, node is never in sync mode anyway. I can see the Milestone changes in log, but I do not see a "Latest Solid Milestone Index" entry for hours. Even with re-installing using the pre-downloaded database.
I stuck know on solid milestone 312840. If I would restart the node, this value would increase too but stuck then again.
12/27 10:10:01.462 [pool-2-thread-5] INFO c.i.iri.network.TransactionRequester - Removed existing tx from request list: KBWWBSXPNOSEIOQ9TDF9QYLKJNQPFABJ9DKDZKHTYVWBXBXCNUPANYFJGWAMRTUYDEMBLBDKAJMQZ9999 12/27 10:10:01.485 [pool-2-thread-2] INFO com.iota.iri.network.Node - toProcess = 0 , toBroadcast = 0 , toRequest = 1 , toReply = 0 / totalTransactions = 4284410 12/27 10:10:11.486 [pool-2-thread-2] INFO com.iota.iri.network.Node - toProcess = 0 , toBroadcast = 0 , toRequest = 0 , toReply = 0 / totalTransactions = 4284422 12/27 10:10:21.487 [pool-2-thread-2] INFO com.iota.iri.network.Node - toProcess = 0 , toBroadcast = 0 , toRequest = 0 , toReply = 0 / totalTransactions = 4284444 12/27 10:10:36.488 [pool-2-thread-2] INFO com.iota.iri.network.Node - toProcess = 0 , toBroadcast = 0 , toRequest = 0 , toReply = 0 / totalTransactions = 4284469 12/27 10:10:46.510 [Latest Milestone Tracker] INFO com.iota.iri.Milestone - Latest milestone has changed from #312877 to #312878 12/27 10:10:51.489 [pool-2-thread-2] INFO com.iota.iri.network.Node - toProcess = 0 , toBroadcast = 0 , toRequest = 0 , toReply = 0 / totalTransactions = 4284497