Skip to content

Distributed brain simulation - Node log display guide

[!NOTE] For the latest implementation status, please refer to Functional Implementation Status (Remaining Functionality).

Date: February 17, 2026 Applies to: EvoSpikeNet users cannot view node logs


Problem: Node logs not visible on frontend

If you run a distributed brain simulation and don't see any node logs, follow the guide below to troubleshoot.


Identifying the cause

1. Frontend selection

EvoSpikeNet has two different front ends:

  • Location: frontend/pages/distributed_brain.py
  • Technology: Dash (Plotly + Flask)
  • Log display function: ✅ Implemented
  • Status: Fully supported

B. React-based frontend (for VR)

  • Location: frontend-react/src/components/VRScene.tsx
  • Technology: React + Three.js
  • Log display function: ❌ Not implemented
  • Application: VR/3D display only

Solution

Get full simulation control and real-time log viewing using a Python-based front end (Dash).

Step 1: Start the front end

cd /path/to/EvoSpikeNet

# Start frontend on port 8050
python -m evospikenet.frontend.app

or using Docker:

docker-compose up frontend

Step 2: Browser access

http://localhost:8050

Step 3: Node configuration

  1. Select simulation type
  2. Select the desired simulation in the "Select Simulation Type" dropdown on the top left
  3. Example: "🎯 Complete Brain (24-Node) - Feature 13"

  4. Check on node settings tab

  5. Check the status of each node, host assignment, and model selection

  6. Start Node

  7. Click on the "Start Nodes" button
  8. Each node is started in sequence

Step 4: View log

  1. Go to log view
  2. Click on the “🧠 Brain Simulation” tab

  3. Node selection

  4. Select the node you want to display from the "Node Logs" section in the dropdown
  5. Example: "Node 0 - PFC"

  6. Log display

  7. The log of the selected node is automatically updated and displayed in the text area
  8. the last 100 lines are displayed

How logs work

For localhost (localhost)

Process flow:

Rank 0 Node → /tmp/sim_rank_0.log
Rank 1 Node → /tmp/sim_rank_1.log
Rank 2 Node → /tmp/sim_rank_2.log
...

Log access: ↓ Front end reads files directly ↓ Display in text area

For remote hosts

Log acquisition flow:

Rank 0 Node (remote) → /tmp/sim_rank_0.log
↓(SSH/API経由)
Backend API(/api/distributed_brain/remote_log)
↓
フロントエンド
↓
テキストエリアに表示

Troubleshooting when logs are not displayed

Checklist

✓ Check 1: Check if the node is running

# For localhost
ps aux | grep "run_zenoh_distributed_brain.py"

# or
pgrep -f "run_zenoh_distributed_brain.py"

Expected output:``` /path/to/python examples/run_zenoh_distributed_brain.py --node-id pfc-0 --module-type pfc /path/to/python examples/run_zenoh_distributed_brain.py --node-id visual-1 --module-type visual

**Support:**
- If the process is not running → restart it with the "Start Nodes" button

#### ✓ Check 2: Verify existence of log file

```bash
# For localhost
ls -la /tmp/sim_rank_*.log

# or
tail -f /tmp/sim_rank_0.log

Expected output:``` -rw-r--r-- 1 user group 1234 Feb 17 10:30 /tmp/sim_rank_0.log -rw-r--r-- 1 user group 5678 Feb 17 10:30 /tmp/sim_rank_1.log

**Example log content:**```
[2026-02-17 10:30:01] INFO: Initializing distributed brain node...
[2026-02-17 10:30:01] INFO: Node type: PFC, Rank: 0
[2026-02-17 10:30:02] INFO: Model loaded successfully
[2026-02-17 10:30:02] INFO: Zenoh communication initialized
[2026-02-17 10:30:03] INFO: Node ready for simulation

Support: - File does not exist → There may be a delay in log generation, wait a few seconds and then check - File exists but content is empty → Script execution error, check console output

✓ Check 3: Check front-end API connection

Check for errors in the browser console (F12 key):

// コンソール実行
fetch('http://localhost:8000/api/distributed_brain/status')
  .then(r => r.json())
  .then(data => console.log(data))
  .catch(e => console.error('API Error:', e))

Expected response:```json { "nodes": [ { "id": "0", "rank": 0, "type": "PFC", "status": "Running" } ] }

**Support:**
- An error occurred → API server is not started, check with `docker-compose ps`

#### ✓ Check 4: Check log access permissions

```bash
# Check log file owner and permissions
ls -l /tmp/sim_rank_0.log

# Check if it is readable
head -5 /tmp/sim_rank_0.log

Support: - No permission → Fixed with chmod 644 /tmp/sim_rank_*.log


Troubleshooting: Common issues

Issue 1: Nodes are not displayed in the dropdown

Cause: Node configuration is not initialized

Solution: 1. Go to “⚙️ Node Configuration” tab 2. Select the configuration in “Select Simulation Type” 3. Click “Start Nodes”

Problem 2: Logs are old and not updated

Cause: Automatic updates are disabled

Solution: 1. Reload frontend (F5 key) 2. Make sure the “🧠 Brain Simulation” tab is selected 3. Reselect the node in the dropdown

Issue 3: Remote host log access error

Error display: "Error fetching log from {host} via API"

Cause: - SSH connection failure - key file path is incorrect - remote host is not responding

Solution: 1. Check host settings - "⚙️ Node Configuration" → "Remote Host Configuration" - Check if IP, username and SSH key pass are correct 2. SSH connection testbash ssh -i ~/.ssh/id_rsa user@remote_host "head -5 /tmp/sim_rank_0.log"

Issue 4: Log files are created slowly

Symptom: "Log file not yet created" message

Cause: Node initialization is taking a long time

Solution: - Wait a few seconds and try displaying again - See more detailed logs below:bash docker logs frontend # container log docker logs backend # backend log


Advanced troubleshooting

If logs are generated but not displayed

1. Check system user privileges

# current user
whoami

# Log file owner
ls -l /tmp/sim_rank_*.log

Support: - Change log owner if different user:bash sudo chown $(whoami) /tmp/sim_rank_*.log

2. Log access from Docker containers

# Check if logs are accessible within the frontend container
docker exec frontend cat /tmp/sim_rank_0.log

# Check inside the backend container
docker exec backend cat /tmp/sim_rank_0.log

3. Check free disk space

df -h /tmp

Support: - Delete old logs if /tmp is low on free space:bash rm /tmp/sim_rank_*.log


API Endpoint Reference

Local log acquisition (front end internal processing)

GET /tmp/sim_rank_{rank}.log

Remote log acquisition

POST /api/distributed_brain/remote_log
Content-Type: application/json

{
  "user": "username",
  "ip": "192.168.1.100",
  "key_path": "/home/user/.ssh/id_rsa",
  "log_file_path": "/tmp/sim_rank_0.log"
}

response:```json { "log_content": "... 最後の100行 ..." }

### Get node status
GET /api/distributed_brain/status
---

## Best practices

### 1. Regular backup of logs

```bash
# Back up logs after simulation ends
cp /tmp/sim_rank_*.log ~/simulation_logs_$(date +%Y%m%d_%H%M%S)/

2. Setting the log level

Control verbosity in node startup scripts:

# examples/run_zenoh_distributed_brain.py
import logging

# Check the log level
logging.basicConfig(level=logging.DEBUG)  # Detailed log
# logging.basicConfig(level=logging.INFO) # Standard logging

3. SSH configuration to remote host

# Preset connection in ~/.ssh/config
Host simulation_host
    HostName 192.168.1.100
    User username
    IdentityFile ~/.ssh/id_rsa
    StrictHostKeyChecking no

See documentation


Support information

If the above steps do not resolve the issue:

  1. Check frontend console outputbash docker logs frontend --tail 50

  2. Check backend logsbash docker logs backend --tail 50

  3. Check the console output of the node processbash cat /tmp/sim_rank_0.log

I hope you try the above and your issue is resolved.