Files
starRiverProperty/docs/superpowers/specs/2026-05-01-org-policy-verify-manual.md
T
反编译工作区 c5febc9905 docs: fix stale references post v2.0.17 alignment
- Update deploy/README.md: remove NincaCrkStdRibbonConfiguration ref,
  update JAR naming, add v2.0.17 config instructions
- Update elevator-v1-v2-init-timing-config-audit.md: add baseline note
- Update org-policy-verify-manual.md: JAR path + AppApplication class
- Update release script comment with current baseline version
- docs/AGENTS.md and service-discovery spec already updated in v2.0.17
2026-05-05 19:08:33 +08:00

114 lines
3.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# org_id 策略修复 — 人工验证操作手册
## 前置条件
- V2 JAR 已构建:`deploy/v2-maven/cw-elevator-application-V1.0.0.20211103.jar`v2.0.17
- 配置文件:`/tmp/v2-redis-fix.properties`
- Redis Docker`v2-test-redis`(端口 6380,密码 `1qaz!QAZ`
- 桩服务脚本:`stub_org_service.py`
---
## 步骤 1:启动 V2 电梯应用
打开**终端 1**,执行:
```bash
/usr/lib/jvm/java-8-openjdk-amd64/bin/java \
-jar /media/zebra/9e8fa357-7db6-4d70-88ed-d5de5a059a663/星河湾星中星/源码/maven-cw-elevator-application/deploy/v2-maven/cw-elevator-application-V1.0.0.20211103.jar \
--spring.config.location=file:/tmp/v2-redis-fix.properties
```
等待约 **35 秒**,看到 `Started AppApplication` 后验证:
```bash
curl http://127.0.0.1:18081/health
```
期望输出:`{"status":"UP"}`
---
## 步骤 2:启动组织服务桩
打开**终端 2**,执行:
```bash
python3 /media/zebra/9e8fa357-7db6-4d70-88ed-d5de5a059a663/星河湾星中星/源码/maven-cw-elevator-application/tools/stub_org_service.py
```
验证:
```bash
curl http://127.0.0.1:18082/health
```
期望输出:`{"status":"UP"}`
---
## 步骤 3:运行验证脚本
打开**终端 3**,执行:
```bash
cd /media/zebra/9e8fa357-7db6-4d70-88ed-d5de5a059a663/星河湾星中星/源码/maven-cw-elevator-application/tools/visitor_floor_verification
python3 scripts/verify_org_policy_fix.py --elevator-base-url http://127.0.0.1:18081
```
期望输出:
```
=== Phase 2: run 7 cases ===
[T1] 有策略→allow替换floorList → ✅
[T2] 无策略→floorList → ✅
[T3] allow含无效zone→拒绝 (76260533) → ✅
[T4] 多组织命中第一个策略 → ✅
[T5] enabled=0等同无策略 → ✅
[T6] UC-02策略优先 → ✅
[T7] 广发基金迁移验证 → ✅
Passed: 7/7
```
报告文件:`report/org-policy-fix-verify-YYYYMMDD-HHMMSS.json`
---
## 步骤 4:停止服务
```bash
# 终端1 按 Ctrl+C
# 终端2 按 Ctrl+C
```
---
## 故障排查
| 症状 | 原因 | 解决 |
|------|------|------|
| V2 启动报 `RedisConnectionException` | Redis 密码未配置或端口错误 | 确认 `v2-test-redis` 运行中:`docker ps \| grep v2-test-redis` |
| V2 报 `UnknownHostException: mysql_01` | ShardingSphere 数据源未覆盖 | 确认使用了 `--spring.config.location=file:/tmp/v2-redis-fix.properties` |
| 桩服务端口被占用 | 上次未正常退出 | `pkill -f stub_org_service` |
| 验证脚本 `Connection refused` | V2 或桩未启动 | 检查终端 1/2 的服务日志 |
| DB 连接失败 | MySQL 密码错误 | 确认 `192.168.3.12:3307 root/123456` 可达 |
---
## 本地 Docker 基础设施
| 服务 | 容器名 | 端口 | 说明 |
|------|--------|------|------|
| Redis | `v2-test-redis` | 6380 | 密码 `1qaz!QAZ` |
| Kafka | `ybs-kafka` | 9092 | 无认证 |
| Consul | — | 192.168.3.12:8500 | 远程 |
| MySQL | — | 192.168.3.12:3307 | root/123456 |
如需重建 Redis
```bash
docker rm -f v2-test-redis
docker run -d --name v2-test-redis -p 6380:6379 redis:7-alpine --requirepass "1qaz!QAZ"
```