检查license server状态,发现licscore状态为inactive,如何排查?
日志:
Redirecting to /bin/systemctl status licscore.service
● licscore.service - LICS Core
Loaded: loaded (/etc/systemd/system/licscore.service; enabled; vendor preset: disabled)
Active: inactive (dead) since Mon 2026-06-29 04:53:43 CST; 10h ago
Mon Jun 29 04:53:41 2026 INFO : init signal handler.
Jun 29 04:53:41 sna01 systemd[1]: Starting LICS Core...
Jun 29 04:53:41 sna01 startLicscore[3897]: net.core.somaxcOnn= 65535
Jun 29 04:53:41 sna01 startLicscore[3897]: Mon Jun 29 04:53:41 2026 INFO : init signal handler.
Jun 29 04:53:41 sna01 startLicscore[3897]: Mon Jun 29 04:53:41 2026 FATAL: Failed to init redis log.
Jun 29 04:53:41 sna01 startLicscore[3897]: Mon Jun 29 04:53:41 2026 FATAL: Initialize failed, main process exit.
Jun 29 04:53:43 sna01 systemd[1]: Started LICS Core.
暂无评论
ADCampus SNA 底座 licscore inactive 故障完整排查(根因日志:Failed to init redis log)
一、故障核心定位
日志致命报错:FATAL: Failed to init redis log
licscore(License 服务)启动第一步初始化 Redis 日志组件失败,进程直接退出,服务状态变为inactive (dead)。
故障分两大块:Redis 服务本身异常、licscore 配置 / 目录权限缺失,按顺序排查。
二、第一步:检查 SNA 内置 Redis 服务状态(最高概率根因)
SNA 底座内置 Redis,licscore 强依赖本地 Redis(默认 127.0.0.1:6379)
bash
运行
# 1. 查看redis服务状态
systemctl status redis-server
# 2. 手动连通Redis验证
redis-cli ping
场景 1:redis 未启动 / 启动失败
启动 Redis
bash
运行
systemctl start redis-server
systemctl enable redis-server
若 Redis 启动报错:
端口 6379 被占用:netstat -lntp | grep 6379,杀掉冲突进程;
日志目录缺失 / 权限不足:
bash
运行
mkdir -p /var/log/redis
chown redis:redis /var/log/redis
磁盘满导致 Redis 无法写日志:df -h清理磁盘空间;
验证连通:redis-cli ping 返回 PONG 才算正常。
场景 2:Redis 正常运行,licscore 读 Redis 日志权限不足
licscore 运行用户无 redis 日志目录读写权限:
bash
运行
# 授予全局日志目录权限
chmod -R 755 /var/log/redis
chown sna:sna /var/log/redis
三、第二步:检查 licscore 自身目录、日志权限
licscore 程序目录:/opt/h3c/sna/licscore/
检查日志目录是否存在
bash
运行
ls /opt/h3c/sna/licscore/logs
# 不存在则创建
mkdir -p /opt/h3c/sna/licscore/logs
修复目录属主(SNA 全部组件运行用户为 sna)
bash
运行
chown -R sna:sna /opt/h3c/sna/licscore/
chmod -R 750 /opt/h3c/sna/licscore/
四、第三步:校验 licscore 配置文件 Redis 连接参数
配置文件:/opt/h3c/sna/licscore/config/application.yml
打开查看 redis 连接段,必须是本地无密码默认配置:
yaml
spring:
redis:
host: 127.0.0.1
port: 6379
password:
timeout: 3000
错误场景:配置了远端 Redis、错误密码、错误端口,都会触发init redis log初始化失败。
修改后保存,重载 systemd:
bash
运行
systemctl daemon-reload
五、第四步:完整重启 licscore 并实时观察日志
bash
运行
# 停止旧进程
systemctl stop licscore
# 重载配置
systemctl daemon-reload
# 启动服务
systemctl start licscore
# 实时跟踪启动日志,确认无FATAL报错
journalctl -u licscore -f
正常启动会输出init success,状态变为active (running)。
六、延伸配套检查(licscore 启动后 License Server 连接失败补充)
licscore 正常运行后,若页面提示 License Server 连接失败,追加以下排查:
校验 License 服务地址端口配置(application.yml)
yaml
license:
server:
ip: 官方License服务器IP
port: 27000
网络连通测试
bash
运行
ping 官方LicenseIP
telnet 官方LicenseIP 27000
防火墙放行出站 27000 端口
检查本机 17070 端口(licscore 对外端口)无占用
bash
运行
netstat -lntp | grep 17070
七、兜底修复方案(以上操作无效时)
停止全部 SNA 组件
bash
运行
systemctl stop matrix
systemctl stop rabbitmq-server
systemctl stop postgresql
systemctl stop redis-server
清理 Redis 持久化残留文件
bash
运行
rm -rf /var/lib/redis/dump.rdb
按顺序启动依赖组件:redis → postgresql → rabbitmq → licscore → matrix
bash
运行
systemctl start redis-server
systemctl start postgresql
systemctl start rabbitmq-server
systemctl start licscore
systemctl start matrix
八、快速校验命令汇总
bash
运行
# 1. Redis连通验证
redis-cli ping
# 2. 查看licscore完整启动日志
journalctl -u licscore --no-pager
# 3. 查看licscore运行状态
systemctl status licscore
# 4. 目录权限检查
ls -ld /opt/h3c/sna/licscore/logs /var/log/redis
暂无评论
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论