#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Probe neko8 tabs/logs on dy; strengthen auto-heal detection.""" from __future__ import annotations import json import sys import time from pathlib import Path import paramiko sys.stdout.reconfigure(encoding="utf-8", errors="replace") ROOT = Path(__file__).resolve().parents[1] HOST, PASS = "108.174.50.68", "Xiao4669805" def connect(): c = paramiko.SSHClient() c.set_missing_host_key_policy(paramiko.AutoAddPolicy()) c.connect(HOST, 22, "root", PASS, timeout=40, allow_agent=False, look_for_keys=False) return c def run(c, cmd, t=90): _, o, e = c.exec_command(cmd, timeout=t) return (o.read() + e.read()).decode("utf-8", "replace") c = connect() print( run( c, r""" cd /opt/douyinWEB/backend .venv/bin/python <<'PY' from app import youtube_neko import json tabs = youtube_neko._cdp_fetch_tabs(8) print("tabs_n", len(tabs)) for t in tabs[:12]: print("TAB", json.dumps({k:t.get(k) for k in ("title","url","type","id") if k in t}, ensure_ascii=False)[:220]) print("crash", youtube_neko._chrome_tab_crash_reason(8)) print("cdp", youtube_neko._devtools_version_ok(8)) PY echo "=== chrome logs ===" docker exec douyinweb-neko-8 bash -lc 'tail -n 120 /var/log/neko/google-chrome.log 2>/dev/null | grep -iE "SIGILL|Aw, Snap|Illegal|FATAL|crash" | tail -30' docker exec douyinweb-neko-8 bash -lc 'ls -la /var/log/neko/ 2>/dev/null | head' """, 60, ), flush=True, ) c.close()