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.<init>(FileOutputStream.java:213)
	at 	at ch.qos.logback.core.recovery.ResilientFileOutputStream.<init>(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.<init>(FileOutputStream.java:213)
	at 	at ch.qos.logback.core.recovery.ResilientFileOutputStream.<init>(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)	

菠罗君
浏览 3185回答 3
3回答

慕设计2395807

PEUNJGSYVLHPYRBQWMZVCOTORKGPFBHOEISBEJNPFVYFQWLUAUATQCPQQIIQZLVURNMXMWCFVRKNDTIZFRJZUKHHNSNXTWZVBHXVLTJYIXGPSCDSBWMPYODMWBXTPQGPMVRHBDFPKUWSVLAMCELOXTILIEHWLHQAPLOEADMPRTJSBYTJIKMVYUDGCYBFBQNPSBKGQMDGVJLIQGWYOOQFVRGDXADZTVRHCFVRHLBQGPEADFOEOXNIRNBYNJMWLNJFHKGPYVXGDZBKTWSHRMBIXRACFOKHKTZVKGILNJZJLTOQZBYHWFPSVXMPEBQFBYBEGBXZCEHXGOGCXHWSBKGWFWLUWYTCEBKNQTPRAWKTJFBPYNQYIRAJZCFUJEAQYVYNDSUDXTJFBKHQEACLUEZCKUQTWFNWMCYUKNMIXUJZIKNDLXZWRUQZVYBXJSNXSVEAQNQQMOEMUXTJSOUCYBQTCLBDNBRGWWMVYUWZIRADYVRGJGDIYHWSIRNQZVIYTJLUKGJSCEAJLUQNCSIXUDLUWTCETWZHQMBDNNDZCFDFNKYISBKGDMOEAWXAWMBYJYUCSVDZJFPCRGDFIKZCQGKMPRGJZUEOKZBKGPFHXAPSRAPSSPETWTICPVRXDJQJRNWSIYUWTIRCRXGPLGQKTQFBHJGQFVLADMCBCFOXTJYVENWSORUWTWRHECENWLVEGDSPCFOEFJROEUCVENBQNWSOENJWZOETWSBEHAVKNVLHQNWZRTWLUQFORUDYUWZOXAQSOLHOKNISHQZVSDZIXTCEUXADTIKAPMHVFHXGIFHJGVYOQGYUWMUEAQMQMWYHQYUJSVEGRTDXMCSHKAPNCYUJMIEUDZSUQGNQZOENWIKTPROJZIDT

Random17

1,你可以把异常百度翻译一下, 提示很明了了,日志文件没有权限创建读写,2,查看Jenkins启动的账号权限3,查看日志文件所在的目录权限,看Jenkins是否有权限管理这个目录
打开App,查看更多内容
随时随地看视频慕课网APP