linux 执行jar包 不生成日志文件,jar包在linux本地运行成功, 但是jenkins构建失败...

一个springboot服务的jar包在linux本地运行成功, 但是jenkins构建失败,报错,求解决

我的jenkins shell脚本

BUILD_ID=dontKillMe

java -jar Chapter13-1.0-SNAPSHOT.jar &ERROR in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - openFile(/tmp/LOG_FILE_IS_UNDEFINED,true) call failed. java.io.FileNotFoundException: /tmp/LOG_FILE_IS_UNDEFINED (Permission denied)

at java.io.FileNotFoundException: /tmp/LOG_FILE_IS_UNDEFINED (Permission denied)

at at java.io.FileOutputStream.open0(Native Method)

at at java.io.FileOutputStream.open(FileOutputStream.java:270)

at at java.io.FileOutputStream.(FileOutputStream.java:213)

at at ch.qos.logback.core.recovery.ResilientFileOutputStream.(ResilientFileOutputStream.java:26)

at at ch.qos.logback.core.FileAppender.openFile(FileAppender.java:204)

at at ch.qos.logback.core.FileAppender.start(FileAppender.java:127)

at at ch.qos.logback.core.rolling.RollingFileAppender.start(RollingFileAppender.java:100)

at at ch.qos.logback.core.joran.action.AppenderAction.end(AppenderAction.java:90)

at at ch.qos.logback.core.joran.spi.Interpreter.callEndAction(Interpreter.java:309)

at at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:193)

at at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:179)

at at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:62)

ERROR in ch.qos.logback.core.rolling.RollingFileAppender[CRAWLER_LOG] - openFile(/tmp/event.log,true) call failed. java.io.FileNotFoundException: /tmp/event.log (Permission denied)

at java.io.FileNotFoundException: /tmp/event.log (Permission denied)

at at java.io.FileOutputStream.open0(Native Method)

at at java.io.FileOutputStream.open(FileOutputStream.java:270)

at at java.io.FileOutputStream.(FileOutputStream.java:213)

at at ch.qos.logback.core.recovery.ResilientFileOutputStream.(ResilientFileOutputStream.java:26)

at at ch.qos.logback.core.FileAppender.openFile(FileAppender.java:204)

ERROR org.springframework.boot.SpringApplication - Application startup failed

java.lang.IllegalStateException: Logback configuration error detected:

ERROR in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - openFile(/tmp/LOG_FILE_IS_UNDEFINED,true) call failed. java.io.FileNotFoundException: /tmp/LOG_FILE_IS_UNDEFINED (Permission denied)

ERROR in ch.qos.logback.core.rolling.RollingFileAppender[CRAWLER_LOG] - openFile(/tmp/event.log,true) call failed. java.io.FileNotFoundException: /tmp/event.log (Permission denied)

at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:162)

at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithConventions(AbstractLoggingSystem.java:81)

at org.springframework.boot.logging.AbstractLoggingSystem.initialize(AbstractLoggingSystem.java:59)

at org.springframework.boot.logging.logback.LogbackLoggingSystem.initialize(LogbackLoggingSystem.java:115)

at org.springframework.boot.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:303)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值