564 Star 4.8K Fork 1.5K

GVPdromara / Jpom

 / 详情

Jpom-agent 启动失败

已完成
创建于  
2022-12-24 19:39

使用的JDK版本、Jpom版本、操作系统及系统版本

JDK:
java version "1.8.0_333"
Java(TM) SE Runtime Environment (build 1.8.0_333-b02)
Java HotSpot(TM) 64-Bit Server VM (build 25.333-b02, mixed mode)

Jpom:
2.10.4-release

操作系统:
CentOS Linux release 7.8.2003 (Core)

问题描述(包括截图)

我用非root账号按照操作文档启动Jpom-Agent程序失败,报错信息如下。本来我以为是配置文件权限问题,但是看了一下配置文件权限没有问题。
文件权限说明

报错信息

2022-12-24 19:26:01.284 [main] INFO  i.j.c.JpomApplicationEvent [JpomApplicationEvent.java:135] - Jpom[2.10.4] Current data path:/usr/local/jpom-agent External configuration file path:file:/usr/local/jpom-agent/bin/../conf/application.yml
2022-12-24 19:26:01.312 [main] ERROR o.s.b.SpringApplication [SpringApplication.java:821] - Application run failed
cn.hutool.core.io.IORuntimeException: IORuntimeException: IOException: 权限不够
        at cn.hutool.core.io.file.FileWriter.getWriter(FileWriter.java:379)
        at cn.hutool.core.io.file.FileWriter.write(FileWriter.java:126)
        at cn.hutool.core.io.file.FileWriter.write(FileWriter.java:145)
        at cn.hutool.core.io.FileUtil.writeString(FileUtil.java:2784)
        at io.jpom.common.JpomApplicationEvent.onApplicationEvent(JpomApplicationEvent.java:105)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143)
        at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:421)
        at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:378)
        at org.springframework.boot.context.event.EventPublishingRunListener.ready(EventPublishingRunListener.java:114)
        at org.springframework.boot.SpringApplicationRunListeners.lambda$ready$6(SpringApplicationRunListeners.java:82)
        at java.util.ArrayList.forEach(ArrayList.java:1259)
        at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:120)
        at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:114)
        at org.springframework.boot.SpringApplicationRunListeners.ready(SpringApplicationRunListeners.java:82)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:322)
        at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:164)
        at io.jpom.JpomAgentApplication.main(JpomAgentApplication.java:63)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:108)
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
        at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:65)
Caused by: cn.hutool.core.io.IORuntimeException: IOException: 权限不够
        at cn.hutool.core.io.FileUtil.touch(FileUtil.java:667)
        at cn.hutool.core.io.file.FileWriter.getWriter(FileWriter.java:377)
        ... 26 common frames omitted
Caused by: java.io.IOException: 权限不够
        at java.io.UnixFileSystem.createFileExclusively(Native Method)
        at java.io.File.createNewFile(File.java:1023)
        at cn.hutool.core.io.FileUtil.touch(FileUtil.java:665)
        ... 27 common frames omitted
2022-12-24 19:26:01.320 [main] INFO  o.a.c.h.Http11NioProtocol [DirectJDKLog.java:173] - Pausing ProtocolHandler ["http-nio-2123"]

评论 (5)

LeonChen21 创建了任务

这里需要你自己安装到其他有权限的目录即可

换到其他有权限的目录还是不行。
输入图片说明

经排查应该是当前用户没有 /tmp/jpom/ 目录的权限

目前可以通知配置 JVM 参数:java.io.tmpdir 来临时解决。

后续 2.10.5 修复无权限无法正常启动的问题

蒋小小 任务状态待办的 修改为已完成

登录 后才可以发表评论

状态
负责人
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
参与者(2)
804942 bwcx jzy 1706672302 2656765 leonchen21 1688708978
Java
1
https://gitee.com/dromara/Jpom.git
git@gitee.com:dromara/Jpom.git
dromara
Jpom
Jpom

搜索帮助