Skip to content

Troubleshooting Guide

Common issues and solutions for the Keshless Accounting System.

Quick Reference

IssueLikely CauseSolution
Balance discrepancyMissing journal entryRun reconciliation
Trial balance not balancedIncomplete journalFind unbalanced entries
Duplicate journal entriesRace conditionReverse duplicate
Entry stuck PENDINGJob not runningCheck scheduler
Cannot modify entryEntry is postedCreate reversal
Account not foundWrong codeVerify account code
Session timeoutLong transactionIncrease timeout
Hash chain brokenTamperingAlert security team

Balance Discrepancies

Problem

Wallet balance doesn't match ledger balance.

Diagnosis

Run balance verification for the affected user/vendor to compare wallet vs ledger balances.

Solutions

DiscrepancyAction
< E1.00Auto-correct small discrepancies (rounding)
E1.00 - E10.00Manual correction with admin approval
≥ E10.00Full investigation required

Investigation Steps

  1. Check audit log for tampering
  2. Verify all wallet transactions have journal entries
  3. Check for orphaned ledger entries
  4. Review recent manual adjustments
  5. Contact development team if unresolved

Trial Balance Not Balanced

Problem

Total debits ≠ Total credits in trial balance.

Common Causes

CauseDescription
Incomplete journalCreated journal but transaction failed
Manual database editDirect data modification
Race conditionConcurrent updates without locking
Rounding errorsAccumulated floating-point issues

Solution

Find and reverse unbalanced journal entries, then recreate correctly.


Duplicate Journal Entries

Problem

Same transaction has multiple journal entries.

Prevention

Always check for existing journal entry before creating a new one using the wallet transaction ID.

Solution

  1. Identify the duplicate
  2. Reverse the duplicate entry
  3. Update code to prevent duplicates
  4. Review concurrent request handling

Entry Stuck in PENDING

Problem

Journal entry not auto-posted after 30 minutes.

Common Causes

CauseSolution
Reconciliation job not runningCheck job schedule
Entry flagged for manual reviewComplete review
AML flag preventing auto-postClear AML review

Solutions

  1. Check if daily reconciliation job is scheduled
  2. Run job manually if needed
  3. Manually post entry if appropriate
  4. Check for AML flags requiring review

Cannot Modify Posted Entry

Problem

Attempting to edit an immutable posted entry.

Explanation

Posted entries are immutable by design for audit compliance.

Solution

Create a reversing entry:

  1. Reverse the incorrect entry
  2. Create a new correct entry
  3. Both entries remain in audit trail

Account Not Found

Problem

Template references non-existent account code.

Diagnosis

Verify the account exists in Chart of Accounts.

Solutions

IssueAction
Wrong codeUse correct account code
Account doesn't existCreate account if it should exist
Wrong templateUse correct template

Database Session Timeout

Problem

Long-running transaction times out.

Solutions

SolutionDescription
Increase timeoutExtend session timeout
Split operationsBreak into smaller transactions
Optimize queriesAdd indexes, reduce lookups

Hash Chain Broken

Problem

Audit log tampering detected.

CRITICAL: This indicates someone modified audit data.

Immediate Actions

  1. Freeze system immediately
  2. Alert security team
  3. Investigate: Who has database access? When did it occur?
  4. Restore from backup if tampering confirmed
  5. Implement stricter access controls

Performance Issues

Problem

Slow reconciliation or queries.

Solutions

SolutionDescription
Verify indexesEnsure proper indexes exist
Use balance cacheQuery AccountBalance, not LedgerEntry
Limit date rangesDon't query all-time data
Batch operationsProcess in smaller chunks

Required Indexes

CollectionIndex Fields
LedgerEntryjournalId, accountCode + status, entityId + entityType
JournalEntrywalletTransactionId
AccountBalanceaccountCode + currency

Health Check

Run the accounting system health check to diagnose issues:

CheckDescription
Chart of AccountsVerify accounts initialized
Trial BalanceVerify debits = credits
Recent JournalsCheck for errors
Reconciliation StatusCheck last run

Prevention Best Practices

PracticeBenefit
Always use database sessionsACID compliance
Always use templatesConsistent entries
Run daily reconciliationCatch discrepancies early
Monitor discrepanciesSet up alerts
Never modify database directlyUse services only
Test in developmentCatch issues early
Review audit logsDetect anomalies
Keep backupsRecovery capability

Getting Help

If you can't resolve an issue:

  1. Run health check and note results
  2. Export diagnostic data (trial balance, recent journals, reconciliation status)
  3. Check audit logs for clues
  4. Contact development team with diagnostic data

Internal use only - Keshless Payment Platform