从JFrog Artifactory OSS 6.9.6升级至7.71及GCS迁移遇多问题求助
JFrog Artifactory 6.9.6 升级至7.71及GCS迁移问题解决方案
Issue1:pwdx命令无法识别工件目录
pwdx返回的是进程当前工作目录,并非Artifactory的工件存储目录,可通过以下方式查找:
- 查看6.x版本配置文件:
$ARTIFACTORY_HOME/etc/artifactory.system.properties,找到artifactory.data.dir参数值 - 执行
ps aux | grep artifactory,查看启动命令中-Dartifactory.data.dir的配置路径 - 从Artifactory UI进入
Admin > Configuration > Storage > Storage Summary,查看存储路径详情
Issue2:systemctl stop无法停止服务
- 先强制终止残留进程:
kill -9 $(ps aux | grep artifactory | grep -v grep | awk '{print $2}') - 检查systemd服务文件
/etc/systemd/system/artifactory.service,确认ExecStop指令正确指向停止脚本:6.x版本应为$ARTIFACTORY_HOME/bin/artifactory.sh stop - 重新加载systemd配置后重试:
systemctl daemon-reload systemctl stop artifactory.service
Issue3:升级7.71后仍无法停止服务+UI报错
- 检查7.x版本的systemd服务文件,确认
ExecStop指令指向正确脚本:默认路径为/opt/jfrog/artifactory/bin/artifactoryctl stop - 强制停止进程后,查看日志目录
/opt/artifactory-oss-7.71.10/var/log/artifactory,排查端口占用、数据库连接等报错原因 - 执行
curl http://localhost:8082/artifactory/api/system/ping确认服务实际状态,清空浏览器缓存后重新访问UI
Issue4:GCS挂载后工件不显示
- 验证挂载状态:
mount | grep gcsfuse,确认挂载点路径正确 - 检查GCS桶内文件:
gsutil ls gs://xxxbucket_Namexxx/backup-daily/current/repositories,确认目标路径存在工件 - 配置Artifactory指向挂载目录:
- 7.x版本进入UI的
Admin > Configuration > Storage > File Stores添加存储路径 - 或修改
$JFROG_HOME/artifactory/etc/system.yaml中的filestore配置项
- 7.x版本进入UI的
- 修复挂载目录权限:
chown -R jfrog:jfrog /opt/artifactory-oss-7.71.10/var/backup/artifactory/backup-daily/current/repositories - 重启Artifactory服务,让系统读取新存储路径
Issue5:迁移6.9.6用户信息至7.71
推荐方案:官方导出导入工具
- 在6.x版本执行导出:
$ARTIFACTORY_HOME/bin/artifactory.sh export --include-users --output-dir <导出目录路径> - 升级至7.x后执行导入:
$JFROG_HOME/artifactory/bin/artifactoryctl import --include-users --source-path <导出目录路径>
备选方案:复制配置文件(仅适用于文件存储的用户数据)
- 复制6.x版本
$ARTIFACTORY_HOME/etc/security下的users.xml、groups.xml到7.x版本的$JFROG_HOME/artifactory/etc/security目录 - 重启Artifactory服务,注意7.x版本可能对配置格式有调整,此方案需验证兼容性
内容的提问来源于stack exchange,提问作者Prakash
相关产品推荐
相关产品推荐

