Files
rlz/完整配置检查清单.txt
2026-01-26 15:02:59 +08:00

84 lines
2.1 KiB
Plaintext
Raw Permalink 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.
========================================
Postman连接问题 - 完整配置检查清单
========================================
根据您的截图,云服务器防火墙已配置 ✓
现在需要检查以下项目:
一、已完成的配置 ✓
------------------
✓ 云服务器控制台防火墙规则已配置
- 协议: TCP
- 端口: 8039
- 来源: 全部IPv4地址 (0.0.0.0/0)
- 策略: 允许
二、需要检查的配置
------------------
【1. 服务器本地防火墙】
检查命令:
sudo firewall-cmd --list-ports | grep 8039
如果未开放,执行:
sudo firewall-cmd --permanent --add-port=8039/tcp
sudo firewall-cmd --reload
【2. 服务器是否运行】
检查命令:
ps aux | grep java | grep 8039
netstat -tlnp | grep 8039
【3. 测试连接】
从外部测试:
curl http://101.43.95.130:8039/appLogin -X POST \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "username=admin&password=admin123"
三、完整测试步骤
---------------
1. 检查服务器本地防火墙:
sudo firewall-cmd --list-ports
2. 如果未开放,执行修复:
sudo firewall-cmd --permanent --add-port=8039/tcp
sudo firewall-cmd --reload
3. 运行测试脚本:
bash 测试公网连接.sh
4. 在Postman中测试:
- Method: POST
- URL: http://101.43.95.130:8039/appLogin
- Headers: Content-Type: application/x-www-form-urlencoded
- Body: username=admin&password=admin123
四、如果仍然无法连接
------------------
1. 检查云服务器防火墙规则是否生效
- 等待几分钟让规则生效
- 检查规则是否正确保存
2. 检查服务器网络配置
- 确认服务器有公网IP
- 检查网络是否正常
3. 临时关闭本地防火墙测试 (仅测试):
sudo systemctl stop firewalld
# 测试后记得开启
4. 检查服务器日志:
tail -f /home/renjianbo/logs/sys-info.log
五、成功标志
-----------
如果配置正确Postman应该能够:
1. 成功连接到 http://101.43.95.130:8039/appLogin
2. 收到HTTP 200响应
3. 响应中包含token字段
========================================