mirror of
https://github.com/hpd840321/starRiverProperty.git
synced 2026-06-16 11:50:30 +08:00
feat: add service config templates and extraction script
Former-commit-id: 1de24b7eb79676d1aba9d799a58c5a753290cf52
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
+15266
File diff suppressed because it is too large
Load Diff
+116266
File diff suppressed because one or more lines are too long
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
+14490
File diff suppressed because it is too large
Load Diff
+198064
File diff suppressed because it is too large
Load Diff
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
+5624
File diff suppressed because it is too large
Load Diff
+214899
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,117 @@
|
||||
# 星中心日志分析
|
||||
|
||||
**Generated:** 2026-04-30
|
||||
**Type:** Log collection workspace (not a code repo)
|
||||
|
||||
## OVERVIEW
|
||||
|
||||
Production log collection for Cloudwalk elevator access-control system (`elevator-app`) — a Java Spring Boot + Spring Cloud (Consul) microservice backed by MySQL (MyBatis + ShardingSphere), Redis, and Kafka. Logs captured from 3 servers on 2026-04-30.
|
||||
|
||||
## STRUCTURE
|
||||
|
||||
```
|
||||
日志分析/
|
||||
├── 10.0.22.207/ # Server 207, collected 17:11
|
||||
│ └── 202604301711/
|
||||
│ └── logs-207/
|
||||
│ ├── elevator-app.log (116K lines, 16MB)
|
||||
│ └── elevator-app-probe.log (15K lines, 3MB)
|
||||
├── 10.0.22.208/ # Server 208, collected 17:12
|
||||
│ └── 202604301712/
|
||||
│ └── logs/
|
||||
│ ├── elevator-app.log (198K lines, 31MB)
|
||||
│ └── elevator-app-probe.log (14K lines, 2.9MB)
|
||||
└── 10.0.22.209/ # Server 209, collected 17:13
|
||||
└── 202604301713/
|
||||
└── logs/
|
||||
├── elevator-app.log (215K lines, 31MB)
|
||||
└── elevator-app-probe.log (5.6K lines, 1.1MB)
|
||||
```
|
||||
|
||||
**Naming convention**: `{IP}/{YYYYMMDDHHMM}/logs[-N]/` — IP-based server identification with collection timestamp. Server 207 uses `logs-207` subdirectory (non-standard naming, probable manual renaming).
|
||||
|
||||
## WHERE TO LOOK
|
||||
|
||||
| Task | Location | Notes |
|
||||
|------|----------|-------|
|
||||
| Application startup / bootstrap | `elevator-app.log` lines ~1-100 | Spring Boot startup, profile activation, bean registration |
|
||||
| Face recognition events | `elevator-app.log` grep `PERSON_RECORD_UPLOAD` | Person entry/exit with face match scores |
|
||||
| Door open events | `elevator-app.log` grep `OPENDOOR_RECORD_UPLOAD` | Door access records with face/token type |
|
||||
| Database errors | `elevator-app.log` grep `ERROR` | ~4,200 total ERRORs across all servers |
|
||||
| PERSON_LABEL_IDS truncation | `elevator-app.log` grep `Data too long for column` | ~2,200 occurrences — primary blocker |
|
||||
| Service discovery / health | `elevator-app-probe.log` | Consul registration, config probes, ribbon status |
|
||||
| Elevator dispatch failures | `elevator-app.log` grep `派梯记录推送失败` | Elevator record send failures |
|
||||
|
||||
## TECH STACK (inferred from logs)
|
||||
|
||||
| Component | Evidence |
|
||||
|-----------|----------|
|
||||
| Java / Spring Boot | `ElevatorApplication`, `AnnotationConfigEmbeddedWebApplicationContext` |
|
||||
| Tomcat Embedded | `TomcatEmbeddedServletContainer: Tomcat started on port 16112` |
|
||||
| Spring Cloud Consul | `ConsulServiceRegistry`, `spring.cloud.consul.host` |
|
||||
| MySQL + MyBatis | `AcsRecogRecordMapper`, `it_acs_recog_record`, `SqlSessionTemplate` |
|
||||
| ShardingSphere | `ShardingJDBC` references in log |
|
||||
| Kafka | Kafka consumer/producer log entries |
|
||||
| Redis | Dependency references in bean wiring logs |
|
||||
| Spring Cloud Feign | `AcsFeignConfiguration`, Feign client beans |
|
||||
|
||||
## KEY ERROR PATTERNS
|
||||
|
||||
### PERSON_LABEL_IDS truncation (2,200+ occurrences)
|
||||
|
||||
```
|
||||
MySQL Data truncation: Data too long for column 'PERSON_LABEL_IDS' at row 1
|
||||
→ table: it_acs_recog_record
|
||||
→ source: AcsRecogRecordDaoImpl.add() → AcsRecogRecordMapper.add
|
||||
→ impact: recognition records with many label IDs fail to persist
|
||||
→ suggestion: increase column size (VARCHAR → TEXT) or normalize into junction table
|
||||
```
|
||||
|
||||
### Recognition record save failures
|
||||
|
||||
```
|
||||
c.c.elevator.record.impl.AcsRecogRecordDaoImpl:40 - 保存识别记录失败
|
||||
→ same root cause (PERSON_LABEL_IDS truncation)
|
||||
```
|
||||
|
||||
### Elevator dispatch failures
|
||||
|
||||
```
|
||||
cn.cloudwalk.elevator.task.ElevatorRecordSendTask:134 - 派梯记录推送失败
|
||||
→ ~468 occurrences across all servers
|
||||
→ "失败原因是:{}" — error message is empty, root cause masked
|
||||
```
|
||||
|
||||
## EVENT TYPES OBSERVED
|
||||
|
||||
| Event Type | Handler | Description |
|
||||
|------------|---------|-------------|
|
||||
| `PERSON_RECORD_UPLOAD` | `PersonRecordEventHandler` | Face capture → recognition → person record |
|
||||
| `OPENDOOR_RECORD_UPLOAD` | `OpenDoorRecordEventHandler` | Door access granted/denied record |
|
||||
|
||||
## SERVER-SPECIFIC NOTES
|
||||
|
||||
- **10.0.22.207** — appears to have restarted (2 Tomcat startups in log). Profile: `access-control`
|
||||
- **10.0.22.208** — device: `1F高区闸机-右出-134-新`, threshold: 60.0
|
||||
- **10.0.22.209** — device: `B1F监控中心`, threshold: 0.9 (much more permissive than 208)
|
||||
|
||||
## COMMANDS
|
||||
|
||||
```bash
|
||||
# Error count per server
|
||||
grep -c "ERROR" */20260430*/logs*/elevator-app.log
|
||||
|
||||
# Top error types across all servers
|
||||
grep -h "ERROR" */20260430*/logs*/elevator-app.log | \
|
||||
sed 's/\[.*\] \[.*\] ERROR //' | sort | uniq -c | sort -rn | head -20
|
||||
|
||||
# Extract all PERSON_LABEL_IDS failures
|
||||
grep "Data too long for column 'PERSON_LABEL_IDS'" */20260430*/logs*/elevator-app.log
|
||||
```
|
||||
|
||||
## NOTES
|
||||
|
||||
- All logs are from 2026-04-30, collected in ~1-hour windows per server
|
||||
- `.DS_Store` files present in every directory — macOS artifacts, safe to ignore
|
||||
- No code, configs, tests, or build scripts exist in this workspace — this is a data directory only
|
||||
- Server 207 subdirectory named `logs-207` instead of `logs` (deviation from 208/209 pattern)
|
||||
@@ -0,0 +1,238 @@
|
||||
# 访客调用楼层放开接口 日志分析
|
||||
|
||||
**分析日期:** 2026-04-30
|
||||
**数据来源:** 3 台服务器(10.0.22.207~209)elevator-app 生产日志
|
||||
**日志范围:** 2026-04-30 全天
|
||||
|
||||
---
|
||||
|
||||
## 一、接口识别
|
||||
|
||||
| 属性 | 值 |
|
||||
|------|-----|
|
||||
| **接口名称** | 访客派梯接口(Visitor Elevator Dispatch) |
|
||||
| **入口 Controller** | `cn.cloudwalk.elevator.person.controller.AcsPersonController` |
|
||||
| **核心 Service** | `cn.cloudwalk.elevator.person.impl.PersonRuleServiceImpl` |
|
||||
| **线程模型** | `http-nio-16112-exec-*`(Tomcat 嵌入式 HTTP) |
|
||||
| **协议** | HTTP REST(直接请求,非 Feign 内部调用) |
|
||||
| **端口** | 16112 |
|
||||
| **Spring Profile** | `access-control` |
|
||||
|
||||
---
|
||||
|
||||
## 二、接口调用完整流程
|
||||
|
||||
```
|
||||
Step 1 AcsPersonController:59 → INFO 访客派梯接口请求开始
|
||||
参数: businessId, personId, visitorId, requestFloorSize, beginTime, endTime
|
||||
Step 2 PersonRuleServiceImpl:176/196 → INFO 根据被访人添加访客派梯权限开始
|
||||
参数: AcsPersonAddVisitorParam (floorIds[], timeRange)
|
||||
Step 3 PersonRuleServiceImpl:180 → INFO 访客派梯楼层决策开始
|
||||
callerProvidedFloors=true/false
|
||||
Step 4 PersonRuleServiceImpl:279 → INFO 访客派梯权限写入准备
|
||||
imageStoreId, floorSize
|
||||
Step 5 PersonRuleServiceImpl:239/303 → INFO 访客添加派梯权限开始
|
||||
写入规则数据 (zoneId, zoneName, parentRule)
|
||||
Step 6 PersonRuleServiceImpl:321 → INFO 访客派梯权限绑定图库成功
|
||||
Step 7 PersonRuleServiceImpl:329 → INFO 访客派梯权限更新规则引用成功
|
||||
Step 8 PersonRuleServiceImpl:331 → INFO 访客派梯权限处理完成
|
||||
Step 9 AcsPersonController:65 → INFO 访客派梯接口请求结束
|
||||
success=true/false, code, message
|
||||
```
|
||||
|
||||
**总日志条目数:** 86 条(完整流程跟踪)
|
||||
|
||||
---
|
||||
|
||||
## 三、HTTP 接口调用清单(7 次)
|
||||
|
||||
> 来源:`AcsPersonController:59` → `AcsPersonController:65`(通过 HTTP nio 线程的完整调用链)
|
||||
|
||||
| # | 请求时间 | 响应时间 | 耗时 | 服务器 | 线程 | 被访人(personId) | 访客(visitorId) | 楼层 | 到访时段 | 调用方 | 结果 |
|
||||
|---|----------|----------|------|--------|------|------------------|----------------|------|----------|--------|------|
|
||||
| 1 | 13:23:19.846 | 13:23:20.229 | ~383ms | **208** | exec-8 | 1084108444947398656 | 1102223662662270976 | 38F | 13:23~14:23 | zhongjian | ✅ success |
|
||||
| 2 | 14:10:38.996 | 14:10:39.206 | ~210ms | **208** | exec-5 | 823973510593769472 | 1102235571215421440 | 20F | 00:00~23:59 | username | ✅ success |
|
||||
| 3 | 16:03:36.857 | 16:03:37.307 | ~450ms | **208** | exec-6 | 964454497399468032 | 1102263999044743168 | 1F | 16:03~20:03 | zhongjian | ✅ success |
|
||||
| 4 | 16:17:47.011 | 16:17:47.177 | ~166ms | **208** | exec-6 | 1087071519357636608 | 1102267565343846400 | 7F | 16:17~次日06:17 | zhongjian | ✅ success |
|
||||
| 5 | 16:18:31.111 | 16:18:31.259 | ~148ms | **209** | exec-1 | 1087071519357636608 | 1102267749385883648 | 7F | 16:18~次日09:18 | zhongjian | ✅ success |
|
||||
| 6 | 17:08:03.211 | 17:08:03.361 | ~150ms | **207** | exec-4 | 835608431162683392 | 1102280216649682944 | 7F | 00:00~23:59 | username | ✅ success |
|
||||
| 7 | 17:10:58.602 | 17:10:58.953 | ~351ms | **207** | exec-5 | 883307982669344768 | 1102280951930654720 | 37F | 00:00~23:59 | username | ✅ success |
|
||||
|
||||
### HTTP 调用汇总
|
||||
|
||||
| 维度 | 统计 |
|
||||
|------|------|
|
||||
| 总调用数 | 7 |
|
||||
| 成功 | 7(100%) |
|
||||
| 失败 | 0 |
|
||||
| 平均耗时 | ~265ms |
|
||||
| 最快 | ~148ms(#5) |
|
||||
| 最慢 | ~450ms(#3) |
|
||||
|
||||
| 服务器 | 调用数 |
|
||||
|--------|--------|
|
||||
| 10.0.22.207 | 2 |
|
||||
| 10.0.22.208 | 4 |
|
||||
| 10.0.22.209 | 1 |
|
||||
|
||||
| 楼层 | 次数 |
|
||||
|------|------|
|
||||
| 7F | 3 |
|
||||
| 38F | 1 |
|
||||
| 20F | 1 |
|
||||
| 1F | 1 |
|
||||
| 37F | 1 |
|
||||
|
||||
---
|
||||
|
||||
## 四、平台端直接授权清单(30 次)
|
||||
|
||||
> 来源:`PersonRuleServiceImpl:196`(不经过 HTTP 接口,通过平台/JWT 直接调用,可能为批量操作或定时任务触发)
|
||||
|
||||
| # | 时间 | 服务器 | 被访人 | 访客 | 楼层 | 调用方 | 鉴权方式 |
|
||||
|---|------|--------|--------|------|------|--------|----------|
|
||||
| 1 | 08:49:44.060 | 207 | 835608431162683392 | 1102154810462326784 | 17F | username | 无鉴权 |
|
||||
| 2 | 08:59:00.006 | 209 | 835608431162683392 | 1102157142243692544 | 7F | username | 无鉴权 |
|
||||
| 3 | 09:13:47.733 | 207 | 835608431162683392 | 1102160865632194560 | 7F | username | 无鉴权 |
|
||||
| 4 | 09:26:57.215 | 207 | 835608431162683392 | 1102164176997470208 | 7F | username | 无鉴权 |
|
||||
| 5 | 09:50:11.318 | 209 | 1058698682545074176 | 1102170024296157184 | 14F | username | 无鉴权 |
|
||||
| 6 | 09:53:41.314 | 209 | 835608431162683392 | 1102170905011916800 | 7F | username | 无鉴权 |
|
||||
| 7 | 10:42:11.685 | 207 | 835608431162683392 | 1102183111996837888 | 7F | username | 无鉴权 |
|
||||
| 8 | 10:55:14.487 | 209 | 835608431162683392 | 1102186395370803200 | 16F | username | 无鉴权 |
|
||||
| 9 | 11:19:35.648 | 209 | 1080078783668654080 | 1102192523495063552 | 16F | zhongjian | JWT |
|
||||
| 10 | 11:20:15.413 | 207 | 1080078783668654080 | 1102192690361233408 | 16F | zhongjian | JWT |
|
||||
| 11 | 11:51:49.813 | 209 | 835608431162683392 | 1102200636407123968 | 16F | username | 无鉴权 |
|
||||
| 12 | 13:32:35.431 | 209 | 1082635377371615232 | 1102225992925278208 | 17F | zhongjian | JWT |
|
||||
| 13 | 13:34:25.367 | 209 | 1082635377371615232 | 1102226454357291008 | 17F | zhongjian | JWT |
|
||||
| 14 | 13:36:46.368 | 209 | 1082635377371615232 | 1102227045766737920 | 17F | zhongjian | JWT |
|
||||
| 15 | 14:15:24.063 | 209 | 1053987768004349952 | 1102236766301306880 | 1F,28~38F(11层) | zhongjian | JWT |
|
||||
| 16 | 14:18:34.671 | 209 | 823973510593769472 | 1102237566549200896 | 20F | username | 无鉴权 |
|
||||
| 17 | 14:30:51.910 | 209 | 835608431162683392 | 1102240658717429760 | 7F | username | 无鉴权 |
|
||||
| 18 | 14:34:55.732 | 209 | 823973510593769472 | 1102241681473294336 | 20F | username | 无鉴权 |
|
||||
| 19 | 14:58:21.864 | 208 | 1084107118220513280 | 1102247578667565056 | 1F,28F,31F | zhongjian | JWT |
|
||||
| 20 | 14:59:05.419 | 209 | 1084107118220513280 | 1102247761727963136 | 1F,31F,28F | zhongjian | JWT |
|
||||
| 21 | 14:59:43.580 | 208 | 1084107118220513280 | 1102247921828720640 | 1F,31F,30F,28F | zhongjian | JWT |
|
||||
| 22 | 15:00:19.291 | 209 | 1084107118220513280 | 1102248071548596224 | 1F,28F,31F | zhongjian | JWT |
|
||||
| 23 | 15:00:51.443 | 209 | 1084107118220513280 | 1102248206227550208 | 1F,28F,30F,31F | zhongjian | JWT |
|
||||
| 24 | 15:01:22.837 | 209 | 1084107118220513280 | 1102248338054692864 | 1F,28F,30F,31F | zhongjian | JWT |
|
||||
| 25 | 15:02:28.670 | 209 | 1084107118220513280 | 1102248614014709760 | 1F,28F,30F,31F | zhongjian | JWT |
|
||||
| 26 | 15:06:33.007 | 208 | 835608431162683392 | 1102249639376605184 | 7F | username | 无鉴权 |
|
||||
| 27 | 15:20:23.153 | 208 | 835608431162683392 | 1102253117473837056 | 17F | username | 无鉴权 |
|
||||
| 28 | 15:36:54.278 | 208 | 823973510593769472 | 1102257278244376576 | 20F | username | 无鉴权 |
|
||||
| 29 | 16:16:54.653 | 209 | 1087071519357636608 | 1102267345675710464 | 7F | zhongjian | JWT |
|
||||
| 30 | 16:29:26.678 | 208 | 964454497399468032 | 1102270499947507712 | 1F | zhongjian | JWT |
|
||||
|
||||
---
|
||||
|
||||
## 五、全量统计分析
|
||||
|
||||
### 服务器分布(总计 37 次)
|
||||
|
||||
| 服务器 | HTTP 接口 | 平台直接 | 合计 |
|
||||
|--------|----------|----------|------|
|
||||
| 10.0.22.207 | 2 | 5 | 7 |
|
||||
| 10.0.22.208 | 4 | 8 | 12 |
|
||||
| 10.0.22.209 | 1 | 17 | 18 |
|
||||
|
||||
### 被访人 TOP 10(总计 37 次)
|
||||
|
||||
| 被访人(personId) | 次数 |
|
||||
|------------------|------|
|
||||
| 835608431162683392 | 12 |
|
||||
| 1084107118220513280 | 7 |
|
||||
| 823973510593769472 | 4 |
|
||||
| 1087071519357636608 | 3 |
|
||||
| 1082635377371615232 | 3 |
|
||||
| 964454497399468032 | 2 |
|
||||
| 1080078783668654080 | 2 |
|
||||
| 1084108444947398656 | 1 |
|
||||
| 883307982669344768 | 1 |
|
||||
| 1058698682545074176 | 1 |
|
||||
| 1053987768004349952 | 1 |
|
||||
|
||||
### 楼层分布(总计 37 次)
|
||||
|
||||
| 楼层 | 次数 | 占比 |
|
||||
|------|------|------|
|
||||
| 7F | 11 | 29.7% |
|
||||
| 1F | 10 | 27.0% |
|
||||
| 28F | 8 | 21.6% |
|
||||
| 31F | 8 | 21.6% |
|
||||
| 30F | 5 | 13.5% |
|
||||
| 16F | 4 | 10.8% |
|
||||
| 17F | 5 | 13.5% |
|
||||
| 20F | 4 | 10.8% |
|
||||
| 37F | 2 | 5.4% |
|
||||
| 38F | 2 | 5.4% |
|
||||
| 14F | 1 | 2.7% |
|
||||
| 32F | 1 | 2.7% |
|
||||
| 33F | 1 | 2.7% |
|
||||
| 34F | 1 | 2.7% |
|
||||
| 35F | 1 | 2.7% |
|
||||
| 36F | 1 | 2.7% |
|
||||
|
||||
> 注:一次请求可包含多楼层,故楼层计数 > 请求总数
|
||||
|
||||
### 调用方分布
|
||||
|
||||
| 调用方 | 次数 | 鉴权方式 |
|
||||
|--------|------|----------|
|
||||
| zhongjian(认证用户) | 19 | JWT Bearer Token |
|
||||
| username(平台匿名) | 18 | 无额外鉴权 |
|
||||
|
||||
### 成功率
|
||||
|
||||
| 类型 | 总数 | 成功 | 失败 | 成功率 |
|
||||
|------|------|------|------|--------|
|
||||
| HTTP 接口 | 7 | 7 | 0 | 100% |
|
||||
| 平台直接 | 30 | 30 | 0 | 100% |
|
||||
| **合计** | **37** | **37** | **0** | **100%** |
|
||||
|
||||
---
|
||||
|
||||
## 六、关键发现
|
||||
|
||||
1. **全部成功** — 该时段内 37 次访客楼层授权操作全部成功,无任何失败/异常
|
||||
|
||||
2. **两条路径并存** — 系统提供两种访客派梯方式:
|
||||
- HTTP API(`AcsPersonController`):响应式,单次处理,平均耗时 ~265ms
|
||||
- 平台端直接调用(`PersonRuleServiceImpl:196`):批量/间隔式触发,可能来自管理后台或定时任务
|
||||
|
||||
3. **高频被访人** — `835608431162683392` 和 `1084107118220513280` 合计被访问 19 次(占 51%),可能是公共区域/前台员工
|
||||
|
||||
4. **热门楼层** — 7F、1F、28F、31F 占据前四,1F 可能为大厅/入口层
|
||||
|
||||
5. **JWT 鉴权** — `zhongjian` 用户的操作均携带 JWT Bearer Token;`username` 的操作无 Authorization header,可能通过网关统一鉴权
|
||||
|
||||
6. **未观察到"放开"术语** — 日志中未出现"楼层放开"关键词,系统使用"派梯"(elevator dispatch)表示楼层权限
|
||||
|
||||
7. **阈值差异** — 服务器 208 设备阈值 60.0,209 设备阈值 0.9(差异显著,可能为不同安全等级场景)
|
||||
|
||||
---
|
||||
|
||||
## 七、附:日志搜索命令
|
||||
|
||||
```bash
|
||||
# HTTP 接口调用(请求开始 + 响应结束)
|
||||
grep -h "访客派梯接口请求" */20260430*/logs*/elevator-app.log
|
||||
|
||||
# 平台端直接授权
|
||||
grep -h "根据被访人添加访客派梯权限开始" */20260430*/logs*/elevator-app.log
|
||||
|
||||
# 楼层决策详情
|
||||
grep -h "访客派梯楼层决策" */20260430*/logs*/elevator-app.log
|
||||
|
||||
# 权限写入确认
|
||||
grep -h "访客派梯权限处理完成" */20260430*/logs*/elevator-app.log
|
||||
|
||||
# 统计每台服务器调用量
|
||||
grep -c "根据被访人添加访客派梯权限开始" */20260430*/logs*/elevator-app.log
|
||||
|
||||
# 统计楼层分布
|
||||
grep -h "根据被访人添加访客派梯权限开始" */20260430*/logs*/elevator-app.log | \
|
||||
grep -o '"zoneName":"[^"]*"' | sort | uniq -c | sort -rn
|
||||
|
||||
# 统计被访人分布
|
||||
grep -h "根据被访人添加访客派梯权限开始" */20260430*/logs*/elevator-app.log | \
|
||||
grep -o '"personId":"[^"]*"' | sort | uniq -c | sort -rn
|
||||
```
|
||||
Reference in New Issue
Block a user