Unable to create tempDir. java.io.tmpdir is set to /tmp
磁盘挂载后,启动报错 Unable to create tempDir. java.io.tmpdir is set to /tmp
[2022-03-30 17:12:06.596] WARN [main] AbstractApplicationContext.java:558 - Exception encountered during context initialization - cancelling refresh attempt: 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
[2022-03-30 17:12:06.615] INFO [main] ConditionEvaluationReportLoggingListener.java:136 - Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
[2022-03-30 17:12:06.619] ERROR [main] SpringApplication.java:837 - Application run failed
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:161)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:544)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:143)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:758)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:750)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226)
at com.vipsoft.boot.admin.VipSoftAdminApplication.main(VipSoftAdminApplication.java:19)
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:109)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88)
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:196)
at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.prepareContext(TomcatServletWebServerFactory.java:210)
at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:190)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:176)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:158)
... 17 common frames omitted
Caused by: java.io.IOException: Read-only file system
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.createTempFile(File.java:2061)
at java.io.File.createTempFile(File.java:2107)
at org.springframework.boot.web.server.AbstractConfigurableWebServerFactory.createTempDir(AbstractConfigurableWebServerFactory.java:188)
... 21 common frames omitted
更改 /tmp目录 的权限以授予您的用户访问权限
[root@iZuf66gcq71y5hlfv02w6aZ 50002_push]# chmod -R 777 /tmp
chmod: changing permissions of ‘/tmp’: Read-only file system
[root@iZuf66gcq71y5hlfv02w6aZ ~]# mount -o remount,rw /
1系统文件
mount -rw -o remount /
2移动硬盘或者U盘
sudo mount -o remount,rw /dev/sdc1
此时,进入文件系统,发现文件加锁,这是加权限即可
sudo chmod +777 *
1.mount 命令 [-t 文件系统] [-L 卷标名] [-o 特殊选项] 设备文件名 挂载点
-l 查询系统中已经挂载的设备,-l 会显示卷标
-a 依据配置文件/etc/fstab的内容,自动挂载
-t 系统文件,加入系统类型指定挂载类型,可以ext3,ext4, iso9660等系统文件
-L 卷标名:挂载指定分区,而不是设备文件名挂载
-o 特殊选择:可以指定挂载额外选项
atime/noatime 更新访问时间/不更新访问时间。访问分区时,是否更新文件的访问时间,默认更新
async/sync 异步/同步 默认异步
auto/noauto 自动/手动 mount -a命令执行时,是否会自动安装/etc/fstab 文件内容挂载,默认自动
defaults 定义默认值,相当于rw、suid、dev、exec、auto、nouser、async这七个选择
exec/noexec 执行/不执行,设定师傅允许文件系统中执行可执行文件,默认是exec允许
remount 重新挂载已经挂载的文件系统,一般用于修改特殊权限
rw/ro 读写/只读,文件系统挂载时,是否有读写的权限,默认rw
suid/nosuid 具有/不具有SUID权限,设定文件系统是否具有SUID权限,默认具有
user/nouser 允许/不允许普通用户挂载,设定文件系统是否允许普通用户挂载,默认不允许,只有root可以挂载分区
usrquata 写入代表文件系统支持用户磁盘配额,默认不支持
grpquata 写入代表文件系统支持组磁盘配额,默认不允许
eg: mount -o remount,noexec /home 让 /home目录下不能执行可执行文件
Unable to create tempDir. java.io.tmpdir is set to /tmp的更多相关文章
- org.springframework.boot.web.server.WebServerException: Unable to create tempDir. java.io.tmpdir is set to C:\Users\ADMINI~1\AppData\Local\Temp\2\
问题原因:springboot创建临时文件找不到对应的目录 解决办法:1. 重新指定临时文件位置 java -Djava.io.tempdir=D:/tmpdir -jar -my_project. ...
- hive-相关报错处理${system:java.io.tmpdir}
在使用hive的时候启动成功 [root@localhost bin]# ./hive which: no hbase in (/usr/local/hive/apache-hive-2.1.1-bi ...
- 关于System.getProperty("java.io.tmpdir");的输出,及System.getProperty();参数
1,首先来介绍下System.getProperty("java.io.tmpdir")输出因为这个输出有点特殊. 理论介绍:他是获取系统临时目录.可以是window的temp,l ...
- Java System.getProperty("java.io.tmpdir") 获取系统临时目录
System.getProperty("java.io.tmpdir") 是获取操作系统的缓存临时目录 在windows7中的目录是: C:\Users\登录用户~1\AppDat ...
- java.io.tmpdir指定的路径在哪?
Java.io.tmpdir介绍 System.getproperty(“java.io.tmpdir”)是获取操作系统缓存的临时目录,不同操作系统的缓存临时目录不一样, 在Windows的缓存目录为 ...
- hive启动报错:system:java.io.tmpdir等
解决方法:在hive-site.xml中添加 <property> <name>system:java.io.tmpdir</name> <val ...
- hive启动时报错 java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: ${system:java.io.tmpdir%7D/$%7Bsystem:user.name%7D at org.apache.hadoop.fs.Path.initialize
错误提示信息如下 错误信息如下 [root@node1 bin]# ./hive Logging initialized -bin/lib/hive-common-.jar!/hive-log4j.p ...
- Relative path in absolute URI: ${system:java.io.tmpdir%7D/$%7Bhive.session.id%7D_resources
原因:环境变量设置问题 <property> <name>Hive.exec.local.scratchdir</name> <value> ...
- Java.io.tmpdir介绍
System.getproperty(“java.io.tmpdir”)是获取操作系统缓存的临时目录,不同操作系统的缓存临时目录不一样, 在Windows的缓存目录为:C:\Users\登录用户~1\ ...
- java.io.tmpdir在哪里?
查找所在目录的方式如下: System.out.println(System.getProperty(“java.io.tmpdir”)); System.getProperty(),还可以获取更多其 ...
随机推荐
- Java之引用传递
引用传递分析 类本身就属于引用数据类型,既然是引用数据类型,就会牵扯到内存的引用传递. 引用传递的本质:同一块堆内存空间可以被不同的栈内存所指向,也可以变更指向. 引用传递案例 先看一个应用传递的例子 ...
- vue 中如何使用axios调用接口
首先后端采用的是restful形式,分为了 1.post(添加)请求, 2.delect(删除)请求, 3.put(修改)请求, 4.get(查询)请求, 在vue里项目里,npm i axios - ...
- Service Mesh:微服务架构的救世主还是多余的花招?
Service Mesh的前世今生 在前面,我们提出了一个问题:随着模块和节点的增多,微服务之间难免会遇到各种网络问题.为了解决这些问题,目前有一个解决方案,即使用Spring Cloud中的各个组件 ...
- shell 语法介绍
大家好,我是蓝胖子,在日常开发中或多或少都会接触到shell脚本,可以说会shell脚本是一位后端开发的基本功,今天我将会花上一篇文章总结下常见的shell的语法,学完本篇,相信简单的shell脚本就 ...
- 2022.7.12 thecold 讲课纪要
前言 上午刚学完平衡树,听学长说下午讲 \(LCT\) ,想了想就我这种蒟蒻平衡树还写不明白就搞 \(LCT\) ,绝对会挂,就打算下午去初中集训班摸摸鱼. 一进去就看见了 thecold 学长,真的 ...
- 基于DotNetty实现一个接口自动发布工具 - 通信实现
基于 DotNetty 实现通信 DotNetty : 是微软的 Azure 团队,使用 C#实现的 Netty 的版本发布.是.NET 平台的优秀网络库. 项目介绍 OpenDeploy.Commu ...
- [编程] AI助力软件项目正向生成,注释编写的革命
引言 软件项目质量直接影响着用户体验和企业效益.随着软件的应用范围不断扩大,提高软件质量的重要性也日益凸显.传统上,软件工程师通常采用自下而上的开发模式,自行设计实现代码并进行测试,这给质量把控带来一 ...
- 解决Spring Boot Mail无法发送HTML格式的邮件
Spring Boot版本:2.6.2 查阅spring-boot-starter-mail源码的MimeMessageHelper.setText方法,发现有个Boolean类型参数控制是否是HTM ...
- 决策树(ID3、C4.5、CART算法numpy实现)
什么是决策树? 决策树(decision tree)是一个树结构(可以是二叉树或非二叉树). 其每个非叶节点表示一个特征属性上的测试,每个分支代表这个特征属性在某个值域上的输出,而每个叶节点存放一个类 ...
- hdu4365 Palindrome graph
Palindrome graph Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) ...