代码拉取完成,页面将自动刷新
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"]
这里需要你自己安装到其他有权限的目录即可
换到其他有权限的目录还是不行。
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
经排查应该是当前用户没有 /tmp/jpom/ 目录的权限
目前可以通知配置 JVM 参数:java.io.tmpdir 来临时解决。
后续 2.10.5 修复无权限无法正常启动的问题
登录 后才可以发表评论