admin/AMT_TROUBLESHOOTING.md
lvfengfree 8b07d8f52a feat: 实现 AMT 设备自动添加功能(仅 Digest 认证)
- 添加 AMT Digest 认证服务 (AmtDigestService)
- 添加 AMT 模拟服务用于测试 (AmtMockService)
- 更新设备控制器支持 AMT 连接测试和设备信息获取
- 前端添加 AMT 自动添加方式,支持手动输入和凭证选择
- 移除 Basic 认证,仅使用 Digest 认证
- 添加 Apache HttpClient 依赖支持 Digest 认证
- 创建相关文档和测试脚本
2026-03-01 14:51:35 +08:00

270 lines
5.9 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.

# AMT 连接故障排除指南
## 常见错误及解决方案
### 错误 1: HTTP 401 - 认证失败
**错误信息**`AMT 连接测试失败: HTTP 错误: 401`
**可能原因**
1. 用户名或密码错误
2. AMT 未正确配置
3. 需要使用 Digest 认证而不是 Basic 认证
4. 需要使用 HTTPS 而不是 HTTP
**解决方案**
#### 方案 1检查 AMT 凭证
1. 确认 AMT 管理员用户名(通常是 `admin`
2. 确认 AMT 管理员密码
3. 尝试使用 AMT 配置工具重置密码
#### 方案 2检查 AMT 配置状态
在 AMT 设备上:
1. 重启进入 BIOS/UEFI
2. 按 Ctrl+P 进入 Intel ME 配置
3. 检查 AMT 是否已启用
4. 检查网络配置是否正确
#### 方案 3使用测试工具诊断
运行 `test_amt_connection.bat` 进行详细诊断:
```batch
test_amt_connection.bat
```
输入 IP 地址和用户名,查看详细的连接测试结果。
#### 方案 4手动测试 AMT 连接
使用 PowerShell 测试:
```powershell
# 测试端口
Test-NetConnection -ComputerName 192.168.1.100 -Port 16992
# 测试 HTTP 连接
$username = "admin"
$password = "your_password"
$base64 = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes("${username}:${password}"))
$headers = @{
"Authorization" = "Basic $base64"
"Content-Type" = "application/soap+xml;charset=UTF-8"
}
$body = @"
<?xml version="1.0" encoding="UTF-8"?>
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope"
xmlns:wsmid="http://schemas.dmtf.org/wbem/wsman/identity/1/wsmanidentity.xsd">
<s:Header/>
<s:Body>
<wsmid:Identify/>
</s:Body>
</s:Envelope>
"@
Invoke-WebRequest -Uri "http://192.168.1.100:16992/wsman" -Method POST -Headers $headers -Body $body
```
#### 方案 5尝试 HTTPS 连接
某些 AMT 配置要求使用 HTTPS
- HTTP 端口16992
- HTTPS 端口16993
修改代码已支持自动尝试 HTTPS重新编译后端即可。
### 错误 2: 连接超时
**错误信息**`AMT 连接超时`
**可能原因**
1. IP 地址错误
2. 网络不可达
3. 防火墙阻止
4. AMT 未启用
**解决方案**
1. **检查网络连接**
```batch
ping 192.168.1.100
```
2. **检查端口是否开放**
```batch
telnet 192.168.1.100 16992
```
或使用 PowerShell
```powershell
Test-NetConnection -ComputerName 192.168.1.100 -Port 16992
```
3. **检查防火墙规则**
- Windows 防火墙
- 网络防火墙
- AMT 设备防火墙
4. **确认 AMT 已启用**
- 进入 BIOS/UEFI
- 检查 Intel ME 配置
- 确认 AMT 服务正在运行
### 错误 3: 连接被拒绝
**错误信息**`Connection refused`
**可能原因**
1. AMT 服务未运行
2. 端口被占用
3. AMT 未正确配置
**解决方案**
1. **检查 AMT 服务状态**
在 AMT 设备上运行:
```batch
sc query LMS
```
2. **重启 AMT 服务**
```batch
net stop LMS
net start LMS
```
3. **检查端口占用**
```batch
netstat -ano | findstr 16992
```
## AMT 配置检查清单
### 基本配置
- [ ] AMT 已在 BIOS/UEFI 中启用
- [ ] 设置了 AMT 管理员密码
- [ ] 配置了网络设置IP、子网掩码、网关
- [ ] AMT 服务正在运行
### 网络配置
- [ ] AMT 设备网络可达
- [ ] 防火墙允许端口 16992 (HTTP) 和 16993 (HTTPS)
- [ ] 没有网络隔离或 VLAN 限制
### 认证配置
- [ ] 知道正确的管理员用户名
- [ ] 知道正确的管理员密码
- [ ] 密码符合复杂度要求
## 使用 Intel AMT 配置工具
### Intel ME Configuration Tool (MEBx)
1. **进入 MEBx**
- 开机时按 Ctrl+P
- 默认密码admin
2. **启用 AMT**
- Intel(R) ME Configuration
- Intel(R) AMT Configuration
- Manageability Feature Selection
- 选择 "Intel AMT"
3. **配置网络**
- Network Setup
- TCP/IP Settings
- 配置 IP 地址DHCP 或静态)
4. **设置密码**
- MEBx Password
- 设置强密码(至少 8 位,包含大小写字母和数字)
5. **激活 AMT**
- Activate Network Access
- 选择激活方式
### Intel Setup and Configuration Service (SCS)
使用 Intel SCS 进行批量配置:
1. 下载 Intel SCS
2. 创建配置文件
3. 批量部署到设备
## 常用 AMT 命令
### 使用 PowerShell 模块
```powershell
# 安装 Intel vPro 模块
Install-Module -Name IntelVPro
# 连接到 AMT 设备
$cred = Get-Credential
Connect-AMT -ComputerName 192.168.1.100 -Credential $cred
# 获取设备信息
Get-AMTSystemInfo
# 获取电源状态
Get-AMTPowerState
# 远程开机
Invoke-AMTPowerAction -Action PowerOn
```
### 使用 WSMAN 命令行
```batch
# 测试连接
wsman identify -r:http://192.168.1.100:16992/wsman -auth:basic -u:admin -p:password
# 获取系统信息
wsman get http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem -r:http://192.168.1.100:16992/wsman -auth:basic -u:admin -p:password
```
## 推荐的 AMT 设置
### 安全设置
- 使用强密码(至少 12 位)
- 启用 TLS/SSL
- 限制访问 IP 范围
- 定期更新固件
### 网络设置
- 使用静态 IP便于管理
- 配置正确的 DNS
- 确保网络稳定
### 功能设置
- 启用远程控制
- 启用 KVM键盘视频鼠标
- 启用 IDE-RIDE 重定向)
- 启用 SOL串行控制台
## 参考资料
- [Intel AMT 官方文档](https://software.intel.com/sites/manageability/)
- [Intel vPro 技术指南](https://www.intel.com/content/www/us/en/architecture-and-technology/vpro/vpro-technology-general.html)
- [WS-Management 协议规范](https://www.dmtf.org/standards/ws-man)
## 获取帮助
如果以上方法都无法解决问题:
1. 检查 AMT 设备日志
2. 查看系统事件日志
3. 联系设备制造商支持
4. 查阅 Intel AMT 社区论坛
## 调试模式
在开发环境中启用详细日志:
1. 修改 `application.properties`
```properties
logging.level.com.soybean.admin.service.AmtService=DEBUG
```
2. 查看详细的请求和响应日志
3. 使用网络抓包工具(如 Wireshark分析流量