java.io.tmpdir tmp_java - 无法创建tempDir。 java.io.tmpdir设置为/ tmp - 堆栈内存溢出

在ubuntu服务器上运行我的springboot Web服务Java jar应用程序会导致出现以下错误,我已经对该错误进行了一些研究,但是无法获得解决方案。 我用来运行jar文件的命令是

java -jar mySpringBootApp.jar

org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to create tempDir. java.io.tmpdir is set to /tmp

at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:157) ~[spring-boot-2.1.1.RELEASE.jar!/:2.1.1.RELEASE]

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:540) ~[spring-context-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]

at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142) ~[spring-boot-2.1.1.RELEASE.jar!/:2.1.1.RELEASE]

at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775) [spring-boot-2.1.1.RELEASE.jar!/:2.1.1.RELEASE]

at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.1.1.RELEASE.jar!/:2.1.1.RELEASE]

at org.springframework.boot.SpringApplication.run(SpringApplication.java:316) [spring-boot-2.1.1.RELEASE.jar!/:2.1.1.RELEASE]

at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260) [spring-boot-2.1.1.RELEASE.jar!/:2.1.1.RELEASE]

at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248) [spring-boot-2.1.1.RELEASE.jar!/:2.1.1.RELEASE]

at aacctt.payments.org.Application.main(Application.java:18) [classes!/:0.0.1-SNAPSHOT]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_191]

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_191]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_191]

at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_191]

at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [ mySpringBootApp-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]

at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [ mySpringBootApp-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]

at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) [ mySpringBootApp-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]

at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51) [ mySpringBootApp-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]

Caused by: org.springframework.boot.web.server.WebServerException: Unable to create tempDir. java.io.tmpdir is set to /tmp

at org.springframework.boot.web.server.AbstractConfigurableWebServerFactory.createTempDir(AbstractConfigurableWebServerFactory.java:182) ~[spring-boot-2.1.1.RELEASE.jar!/:2.1.1.RELEASE]

at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:162) ~[spring-boot-2.1.1.RELEASE.jar!/:2.1.1.RELEASE]

at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:181) ~[spring-boot-2.1.1.RELEASE.jar!/:2.1.1.RELEASE]

at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:154) ~[spring-boot-2.1.1.RELEASE.jar!/:2.1.1.RELEASE]

... 16 common frames omitted

Caused by: java.io.IOException: Read-only file system

at java.io.UnixFileSystem.createFileExclusively(Native Method) ~[na:1.8.0_191]

at java.io.File.createTempFile(File.java:2024) ~[na:1.8.0_191]

at java.io.File.createTempFile(File.java:2070) ~[na:1.8.0_191]

at org.springframework.boot.web.server.AbstractConfigurableWebServerFactory.createTempDir(AbstractConfigurableWebServerFactory.java:173) ~[spring-boot-2.1.1.RELEASE.jar!/:2.1.1.RELEASE]

... 19 common frames omitted

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值