Files
rlz/前端服务问题修复说明.md
2026-01-26 15:02:59 +08:00

91 lines
1.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.
# 前端服务问题修复说明
## 问题描述
从浏览器控制台看到错误:
- `GET http://101.43.95.130:8050/dev-api/captchaImage 500 (Internal Server Error)`
- 系统接口500异常
## 问题原因
前端代理配置指向了错误的端口:
- **原配置**: 代理到 `http://127.0.0.1:9090`
- **实际后端**: 运行在 `http://127.0.0.1:8039`
## 已修复的配置
### 1. 代理配置修复
**文件**: `rlz-ui/vue.config.js`
**修改前**:
```javascript
target: `http://127.0.0.1:9090`
```
**修改后**:
```javascript
target: `http://127.0.0.1:8039`
```
### 2. 服务重启
- 已使用兼容模式重新启动前端服务
- 使用 `NODE_OPTIONS=--openssl-legacy-provider` 解决Node.js兼容性问题
## 当前状态
**前端服务**: 已启动端口8050正在监听
**代理配置**: 已修复指向后端8039端口
**公网访问**: 可以访问 `http://101.43.95.130:8050`
## 访问地址
### 本地访问
- **地址**: `http://localhost:8050`
- **状态**: ✅ 正常
### 公网访问
- **地址**: `http://101.43.95.130:8050`
- **状态**: ✅ 可以访问
## 登录信息
- **用户名**: `admin`
- **密码**: `admin123`
## 注意事项
1. **后端服务**: 确保后端服务端口8039正在运行
2. **防火墙**: 如需公网访问确保防火墙已开放8050端口
3. **代理配置**: 前端API请求会自动代理到后端8039端口
## 如果仍有问题
1. **检查后端服务**:
```bash
ps aux | grep java | grep 8039
netstat -tlnp | grep 8039
```
2. **检查前端服务**:
```bash
ps aux | grep vue-cli-service
netstat -tlnp | grep 8050
```
3. **查看日志**:
```bash
tail -f /tmp/frontend_dev.log
tail -f /home/renjianbo/logs/sys-info.log
```
4. **测试后端API**:
```bash
curl http://localhost:8039/captchaImage
```
---
**修复时间**: 2026-01-26
**服务端口**: 8050
**后端端口**: 8039