🔄 卡若AI 同步 2026-02-22 09:06 | 更新:总索引与入口、金仓、运营中枢工作台 | 排除 >20MB: 8 个
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -91,5 +91,4 @@ _大文件外置/财务管理_data/chat.snapshot_收集.db
|
||||
03_卡木(木)/木叶_视频内容/Remotion程序化视频/10秒视频/node_modules/.cache/webpack/remotion-production-4.0.427/a233e9cccba253c3b0157f54cad843b8/0.pack
|
||||
03_卡木(木)/木叶_视频内容/Remotion程序化视频/10秒视频/node_modules/.remotion/chrome-headless-shell/mac-x64/chrome-headless-shell-mac-x64/chrome-headless-shell
|
||||
03_卡木(木)/木叶_视频内容/Remotion程序化视频/10秒视频/node_modules/@rspack/binding-darwin-x64/rspack.darwin-x64.node
|
||||
03_卡木(木)/木叶_视频内容/视频切片/脚本/存客宝体系_成片TEMP_MPY_wvf_snd.mp4
|
||||
# === 自动排除结束 ===
|
||||
|
||||
@@ -1,14 +1,49 @@
|
||||
# 存客宝 kr-kf.quwanzhi.com、lytiao.com 无法访问 修复指南
|
||||
|
||||
> 现象:ERR_CONNECTION_CLOSED,面板显示 运行中
|
||||
> 诊断结果:**443 端口 Connection refused**(80 正常)
|
||||
> 诊断结果:**443 端口外网不可达**(80 正常)
|
||||
|
||||
---
|
||||
|
||||
## 复盘(2026-02-22 检查结果)
|
||||
|
||||
### 检查汇总
|
||||
|
||||
| 项目 | 结果 |
|
||||
|------|------|
|
||||
| 域名解析 kr-kf.quwanzhi.com | ✅ 42.194.245.239 |
|
||||
| 域名解析 www.lytiao.com | ✅ 42.194.245.239 |
|
||||
| 端口 80 | ✅ 可达 |
|
||||
| 端口 443 | ❌ 不可达 |
|
||||
| 端口 9988(面板) | ✅ 可达 |
|
||||
| HTTP kr-kf | ✅ 200 OK |
|
||||
| HTTP www.lytiao | ✅ 200 OK |
|
||||
| HTTPS kr-kf | ❌ 连接失败 |
|
||||
| HTTPS www.lytiao | ❌ 连接失败 |
|
||||
|
||||
### 服务器内诊断(TAT)
|
||||
|
||||
- Nginx 监听:80、443 均有监听
|
||||
- kr-kf.quwanzhi.com 已配置 SSL(listen 443 ssl)
|
||||
- nginx -t 通过
|
||||
|
||||
### 已执行操作
|
||||
|
||||
1. **腾讯云 API**:为存客宝 5 个安全组均添加 443/TCP 入站(`scripts/腾讯云_存客宝安全组放行443.py`)
|
||||
2. **存客宝类型**:确认为 CVM(非轻量),安全组生效
|
||||
3. **443 外网**:多次验证仍不可达
|
||||
|
||||
### 结论与待办
|
||||
|
||||
- **根因**:443 在腾讯云侧被阻断(安全组已通过 API 添加,若控制台未见 443 或仍不通,需控制台手动核查)
|
||||
- **手动必做**:到腾讯云控制台确认存客宝实例的**每个**关联安全组入站规则中均有 443/TCP,来源 0.0.0.0/0
|
||||
|
||||
---
|
||||
|
||||
## 一、根因
|
||||
|
||||
- 80 端口可达
|
||||
- **443 端口被拒绝** → 访问 https:// 会失败
|
||||
- **443 端口外网不可达** → 访问 https:// 失败
|
||||
- 域名已正确解析到 42.194.245.239
|
||||
|
||||
---
|
||||
@@ -17,9 +52,15 @@
|
||||
|
||||
### 1. 腾讯云安全组放行 443
|
||||
|
||||
1. 打开 [腾讯云控制台](https://console.cloud.tencent.com/cvm/instance) → 找到存客宝实例 (42.194.245.239)
|
||||
**API 一键执行**(已多次执行):
|
||||
```bash
|
||||
python3 scripts/腾讯云_存客宝安全组放行443.py
|
||||
```
|
||||
|
||||
**手动确认**(强烈建议):
|
||||
1. 打开 [腾讯云 CVM 控制台](https://console.cloud.tencent.com/cvm/instance) → 找到存客宝实例 (42.194.245.239)
|
||||
2. 点击实例 → **安全组** → **编辑规则** → **入站规则**
|
||||
3. 确认有 **443/TCP** 入站,来源 `0.0.0.0/0`
|
||||
3. 逐个检查该实例绑定的**所有安全组**,确认均有 **443/TCP** 入站,来源 `0.0.0.0/0`
|
||||
4. 若无,点击 **添加规则**:协议端口 443,来源 0.0.0.0/0,策略 允许
|
||||
|
||||
### 2. 宝塔面板终端执行(Nginx 重载)
|
||||
|
||||
@@ -42,7 +42,7 @@ bash scripts/kr宝塔_SSH登录.sh "whoami"
|
||||
| 存客宝 | https://42.194.245.239:9988 | TNKjqDv5N1QLOU20gcmGVgr82Z4mXzRi |
|
||||
| 本机 Docker | http://127.0.0.1:8888/btpanel | 面板内查看 |
|
||||
|
||||
**API 白名单**:若本机调用 API 报「IP校验失败」,须到对应面板 **设置 → API 接口** 将本机公网 IP 加入白名单。
|
||||
**API 白名单**:若本机调用 API 报「IP校验失败」,须到对应面板 **设置 → API 接口** 将本机公网 IP 加入白名单。当前常见 IP:211.156.84.135、211.156.92.72、140.245.37.56。
|
||||
|
||||
---
|
||||
|
||||
@@ -100,7 +100,19 @@ sshpass -p 'zhiqun1984' ssh -p 22022 -o StrictHostKeyChecking=no ckb@43.139.27.9
|
||||
|
||||
**SSH 风控**:若出现 `Connection closed by remote host` 或 `Permission denied`,优先用 **宝塔面板 → 终端** 执行,减少 SSH 连接次数。
|
||||
|
||||
### 3.2 502 修复(kr宝塔)
|
||||
### 3.2 宝塔 API 批量启动(以界面真实状态为准)
|
||||
|
||||
**脚本**:`scripts/kr宝塔_宝塔API_Node批量启动.py`
|
||||
|
||||
**说明**:通过宝塔 API 获取 Node 项目列表(界面显示即真实运行状态),对 `run=False` 项目执行 stop → start。
|
||||
|
||||
```bash
|
||||
python3 "01_卡资(金)/金仓_存储备份/服务器管理/scripts/kr宝塔_宝塔API_Node批量启动.py"
|
||||
```
|
||||
|
||||
**前置**:本机公网 IP 已加入 kr宝塔 **设置 → API 接口** 白名单。否则报「IP校验失败」。
|
||||
|
||||
### 3.3 502 修复(kr宝塔)
|
||||
|
||||
**脚本**:`scripts/kr宝塔_宝塔API_修复502.py`
|
||||
|
||||
|
||||
@@ -126,3 +126,9 @@ python3 /tmp/kr_node_batch_fix.py
|
||||
|
||||
- **MODULE_NOT_FOUND**:玩值大屏、wzdj、tongzhi 等若报此错,需在 **Node 项目 → 编辑** 中把启动命令改为 `cd /项目根目录 && node server.js` 或 `npm run start`,勿用目录路径当入口。详见 `references/Node项目未启动_MODULE_NOT_FOUND修复指南.md`。
|
||||
- 若某项目因端口占用失败,脚本会自动尝试清理端口后重试;若仍失败,需在面板中手动检查该项目配置。
|
||||
|
||||
**免 SSH 一键批量启动**(本机执行):
|
||||
```bash
|
||||
./01_卡资(金)/金仓_存储备份/服务器管理/scripts/.venv_tx/bin/python \
|
||||
"01_卡资(金)/金仓_存储备份/服务器管理/scripts/腾讯云_TAT_修复502_Node项目.py" 玩值大屏 tongzhi is_phone ai_hair AITOUFA wzdj zhiji ymao zhaoping
|
||||
```
|
||||
|
||||
113
01_卡资(金)/金仓_存储备份/服务器管理/scripts/kr宝塔_宝塔API_Node批量启动.py
Normal file
113
01_卡资(金)/金仓_存储备份/服务器管理/scripts/kr宝塔_宝塔API_Node批量启动.py
Normal file
@@ -0,0 +1,113 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
kr宝塔 43.139.27.93:通过宝塔 API 批量启动未运行的 Node 项目。
|
||||
界面显示的状态为真实状态,本脚本据此对 run=False 项目执行 start_project。
|
||||
|
||||
使用:python3 kr宝塔_宝塔API_Node批量启动.py
|
||||
需将本机公网 IP 加入 kr宝塔 面板「设置」→「API 接口」→ 白名单。
|
||||
"""
|
||||
import time
|
||||
import hashlib
|
||||
import json
|
||||
|
||||
try:
|
||||
import requests
|
||||
import urllib3
|
||||
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
|
||||
USE_REQUESTS = True
|
||||
except ImportError:
|
||||
import urllib.request
|
||||
import urllib.parse
|
||||
import ssl
|
||||
ssl._create_default_https_context = ssl._create_unverified_context
|
||||
USE_REQUESTS = False
|
||||
|
||||
PANEL_URL = "https://43.139.27.93:9988"
|
||||
API_KEY = "qcWubCdlfFjS2b2DMT1lzPFaDfmv1cBT"
|
||||
|
||||
def sign():
|
||||
t = int(time.time())
|
||||
s = str(t) + hashlib.md5(API_KEY.encode()).hexdigest()
|
||||
return {"request_time": t, "request_token": hashlib.md5(s.encode()).hexdigest()}
|
||||
|
||||
def post(endpoint, data=None):
|
||||
url = PANEL_URL + endpoint
|
||||
payload = sign()
|
||||
if data:
|
||||
payload.update(data)
|
||||
if USE_REQUESTS:
|
||||
r = requests.post(url, data=payload, timeout=25, verify=False)
|
||||
return r.json()
|
||||
req = urllib.request.Request(url, data=urllib.parse.urlencode(payload).encode())
|
||||
with urllib.request.urlopen(req, timeout=25) as resp:
|
||||
return json.loads(resp.read().decode())
|
||||
|
||||
def main():
|
||||
print("=" * 56)
|
||||
print(" kr宝塔 · 宝塔 API 批量启动 Node 项目(以界面真实状态为准)")
|
||||
print("=" * 56)
|
||||
|
||||
# 1. 获取项目列表
|
||||
print("\n【1】获取 Node 项目列表...")
|
||||
try:
|
||||
r = post("/project/nodejs/get_project_list")
|
||||
except Exception as e:
|
||||
if "IP" in str(e) or "校验" in str(e) or "403" in str(e):
|
||||
print(" ❌ IP 校验失败。请到 kr宝塔 面板「设置」→「API 接口」将本机公网 IP 加入白名单。")
|
||||
return 1
|
||||
raise
|
||||
|
||||
if r.get("status") is not True:
|
||||
print(" ❌ 获取失败:", r.get("msg", r))
|
||||
return 1
|
||||
|
||||
items = r.get("data") or r.get("list") or []
|
||||
if not isinstance(items, list):
|
||||
print(" ❌ 列表格式异常:", r)
|
||||
return 1
|
||||
|
||||
# 2. 筛选未运行项目并启动
|
||||
to_start = [it for it in items if it.get("name") and it.get("run") is not True]
|
||||
if not to_start:
|
||||
print(" 所有项目已运行,无需操作。")
|
||||
return 0
|
||||
|
||||
print(" 未运行项目数:", len(to_start))
|
||||
for it in to_start:
|
||||
print(" -", it.get("name"))
|
||||
|
||||
print("\n【2】逐项启动...")
|
||||
for it in to_start:
|
||||
name = it.get("name") or it.get("project_name")
|
||||
if not name:
|
||||
continue
|
||||
try:
|
||||
# 先 stop 再 start(清理残留)
|
||||
post("/project/nodejs/stop_project", {"project_name": name})
|
||||
time.sleep(1)
|
||||
r2 = post("/project/nodejs/start_project", {"project_name": name})
|
||||
ok = r2.get("status") is True or "成功" in str(r2.get("msg", ""))
|
||||
print(" %s: %s" % (name, "OK" if ok else "FAIL - %s" % (r2.get("msg", "")[:80])))
|
||||
except Exception as e:
|
||||
print(" %s: ERR %s" % (name, str(e)[:80]))
|
||||
time.sleep(2)
|
||||
|
||||
# 3. 回查
|
||||
print("\n【3】回查运行状态...")
|
||||
time.sleep(5)
|
||||
try:
|
||||
r3 = post("/project/nodejs/get_project_list")
|
||||
items2 = r3.get("data") or r3.get("list") or []
|
||||
run_cnt = sum(1 for x in items2 if x.get("run") is True)
|
||||
for it in items2:
|
||||
print(" %s: run=%s listen_ok=%s" % (it.get("name"), it.get("run"), it.get("listen_ok")))
|
||||
print("\n 运行中: %d / %d" % (run_cnt, len(items2)))
|
||||
except Exception as e:
|
||||
print(" 回查异常:", e)
|
||||
|
||||
print("=" * 56)
|
||||
return 0
|
||||
|
||||
if __name__ == "__main__":
|
||||
exit(main())
|
||||
@@ -58,3 +58,4 @@
|
||||
| 2026-02-22 06:39:21 | 🔄 卡若AI 同步 2026-02-22 06:39 | 更新:总索引与入口、水桥平台对接、卡木、运营中枢工作台 | 排除 >20MB: 8 个 |
|
||||
| 2026-02-22 06:47:15 | 🔄 卡若AI 同步 2026-02-22 06:47 | 更新:卡木、运营中枢工作台 | 排除 >20MB: 8 个 |
|
||||
| 2026-02-22 07:20:22 | 🔄 卡若AI 同步 2026-02-22 07:20 | 更新:总索引与入口、金仓、卡木、运营中枢工作台 | 排除 >20MB: 9 个 |
|
||||
| 2026-02-22 07:27:08 | 🔄 卡若AI 同步 2026-02-22 07:27 | 更新:金仓、卡木、运营中枢工作台 | 排除 >20MB: 9 个 |
|
||||
|
||||
@@ -61,3 +61,4 @@
|
||||
| 2026-02-22 06:39:21 | 成功 | 成功 | 🔄 卡若AI 同步 2026-02-22 06:39 | 更新:总索引与入口、水桥平台对接、卡木、运营中枢工作台 | 排除 >20MB: 8 个 | [仓库](http://open.quwanzhi.com:3000/fnvtk/karuo-ai) [百科](http://open.quwanzhi.com:3000/fnvtk/karuo-ai/wiki) |
|
||||
| 2026-02-22 06:47:15 | 成功 | 成功 | 🔄 卡若AI 同步 2026-02-22 06:47 | 更新:卡木、运营中枢工作台 | 排除 >20MB: 8 个 | [仓库](http://open.quwanzhi.com:3000/fnvtk/karuo-ai) [百科](http://open.quwanzhi.com:3000/fnvtk/karuo-ai/wiki) |
|
||||
| 2026-02-22 07:20:22 | 成功 | 成功 | 🔄 卡若AI 同步 2026-02-22 07:20 | 更新:总索引与入口、金仓、卡木、运营中枢工作台 | 排除 >20MB: 9 个 | [仓库](http://open.quwanzhi.com:3000/fnvtk/karuo-ai) [百科](http://open.quwanzhi.com:3000/fnvtk/karuo-ai/wiki) |
|
||||
| 2026-02-22 07:27:08 | 成功 | 成功 | 🔄 卡若AI 同步 2026-02-22 07:27 | 更新:金仓、卡木、运营中枢工作台 | 排除 >20MB: 9 个 | [仓库](http://open.quwanzhi.com:3000/fnvtk/karuo-ai) [百科](http://open.quwanzhi.com:3000/fnvtk/karuo-ai/wiki) |
|
||||
|
||||
Reference in New Issue
Block a user