ERROR in ch.qos.logback.core.rolling.RollingFileAppender[file_info] - openFile(/home/ruoyi/logs/sys-info.log,true) call failed. java.io.FileNotFoundException: /home/ruoyi/logs/sys-info.log (No such file or directory) ERROR in ch.qos.logback.core.rolling.RollingFileAppender[file_error] - Failed to create parent directories for [/home/ruoyi/logs/sys-error.log] ERROR in ch.qos.logback.core.rolling.RollingFileAppender[file_error] - openFile(/home/ruoyi/logs/sys-error.log,true) call failed. java.io.FileNotFoundException: /home/ruoyi/logs/sys-error.log (No such file or directory) ERROR in ch.qos.logback.core.rolling.RollingFileAppender[sys-user] - Failed to create parent directories for [/home/ruoyi/logs/sys-user.log] ERROR in ch.qos.logback.core.rolling.RollingFileAppender[sys-user] - openFile(/home/ruoyi/logs/sys-user.log,true) call failed. java.io.FileNotFoundException: /home/ruoyi/logs/sys-user.log (No such file or directory) at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:179) at org.springframework.boot.logging.logback.LogbackLoggingSystem.reinitialize(LogbackLoggingSystem.java:232) at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithConventions(AbstractLoggingSystem.java:73) at org.springframework.boot.logging.AbstractLoggingSystem.initialize(AbstractLoggingSystem.java:60) at org.springframework.boot.logging.logback.LogbackLoggingSystem.initialize(LogbackLoggingSystem.java:132) at org.springframework.boot.context.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:313) ... 26 more
时间: 2023-12-17 09:04:33 浏览: 608
com.springsource.ch.qos.logback.core_0.9.9.jar
这段错误信息显示了在运行ruoyi项目时,Logback日志系统无法创建文件或目录。具体来说,它无法创建/sys-info.log、/sys-error.log和/sys-user.log这三个文件。这可能是因为这些文件的父目录不存在或不可写。
解决这个问题的方法是手动创建这些目录和文件,并确保它们的父目录可写。您可以使用以下命令在Linux系统中创建这些目录和文件:
```
sudo mkdir -p /home/ruoyi/logs/
sudo touch /home/ruoyi/logs/sys-info.log
sudo touch /home/ruoyi/logs/sys-error.log
sudo touch /home/ruoyi/logs/sys-user.log
```
然后,您需要确保这些文件的权限设置正确,以便ruoyi应用程序可以写入它们。您可以使用以下命令更改这些文件和目录的所有者和权限:
```
sudo chown -R ruoyi:ruoyi /home/ruoyi/logs/
sudo chmod -R 755 /home/ruoyi/logs/
```
这应该解决Logback无法创建文件或目录的问题。
阅读全文