douyinWEB/scripts/inspect_s3_dns.py
eric 47d17aee3c Document YouTube groups and Shorts side-path; sync dual-platform pipeline.
Add isolated Shorts OAuth/clip/upload worker (default off), youtube-svc + group poller, Beijing time UX, and SHORTS.md.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-10 00:04:06 -05:00

36 lines
1.5 KiB
Python

# -*- coding: utf-8 -*-
import paramiko
HOST = "107.173.30.245"
USER = "root"
PASSWORD = "Xiao4669805"
CMDS = [
"systemctl is-active douyinweb-api douyinweb-web seaweed-s3 2>/dev/null; ss -lntp | grep -E '4015|8014|8333|8092' || true",
"ls -la /etc/caddy 2>/dev/null; ls /etc/caddy/Caddyfile* 2>/dev/null; find /etc/caddy -maxdepth 2 -type f 2>/dev/null | head -40",
"grep -RIn 'feiniu\\|s3.nomadro\\|dylive\\|8333' /etc/caddy 2>/dev/null | head -100",
"systemctl cat douyinweb-api 2>/dev/null | head -80",
"grep -E 'DY_S3|S3_' /etc/systemd/system/douyinweb-api.service /opt/douyinWEB/backend/.env /opt/douyinWEB/.env /etc/default/douyinweb* 2>/dev/null | head -50",
"dig +short s3.nomadro.com A; dig +short feiniu.nomadro.com A; dig +short dylive.nomadro.com A",
"curl -sI https://feiniu.nomadro.com/ | head -15; echo ----; curl -sI https://s3.nomadro.com/ | head -15",
]
def main():
c = paramiko.SSHClient()
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
c.connect(HOST, 22, USER, PASSWORD, timeout=30, allow_agent=False, look_for_keys=False)
for cmd in CMDS:
print("====", cmd[:120], "====", flush=True)
stdin, stdout, stderr = c.exec_command(cmd, timeout=45)
out = stdout.read().decode("utf-8", "replace")
err = stderr.read().decode("utf-8", "replace")
print(out[-5000:] if out else "(empty)", flush=True)
if err.strip():
print("ERR:", err[-800:], flush=True)
c.close()
if __name__ == "__main__":
main()