MAC-XXL_ Job learning pit stepping record
Source download address startup error
Source download address
①. GitHub: https://github.com/xuxueli/xxl-job
②. code cloud: https://gitee.com/xuxueli0323/xxl-job
Startup error
The error information is as follows:
10:39:42,324 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[file] - Failed to create parent directories for [/data/applogs/xxl-job/xxl-job-admin.log]
10:39:42,324 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[file] - openFile(/data/applogs/xxl-job/xxl-job-admin.log,true) call failed. java.io.FileNotFoundException: /data/applogs/xxl-job/xxl-job-admin.log (No such file or directory)
at java.io.FileNotFoundException: /data/applogs/xxl-job/xxl-job-admin.log (No such file or directory)
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)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:165)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:152)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:110)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:53)
at at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:75)
at at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:150)
at at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84)
at at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)
at at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
at at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
at at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:417)
at at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:362)
at at org.apache.commons.logging.LogAdapter$Slf4jAdapter.createLocationAwareLog(LogAdapter.java:130)
at at org.apache.commons.logging.LogAdapter.createLog(LogAdapter.java:91)
at at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:67)
at at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:59)
at at org.springframework.boot.SpringApplication.<clinit>(SpringApplication.java:206)
at at com.xxl.job.admin.XxlJobAdminApplication.main(XxlJobAdminApplication.java:13)
10:39:42,324 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO
10:39:42,324 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [console] to Logger[ROOT]
10:39:42,324 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [file] to Logger[ROOT]
10:39:42,325 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
10:39:42,325 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@6e06451e - Registering current configuration as safe fallback point
Logging system failed to initialize using configuration from 'null'
java.lang.IllegalStateException: Logback configuration error detected:
ERROR in ch.qos.logback.core.rolling.RollingFileAppender[file] - Failed to create parent directories for [/data/applogs/xxl-job/xxl-job-admin.log]
ERROR in ch.qos.logback.core.rolling.RollingFileAppender[file] - openFile(/data/applogs/xxl-job/xxl-job-admin.log,true) call failed. java.io.FileNotFoundException: /data/applogs/xxl-job/xxl-job-admin.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:312)
at org.springframework.boot.context.logging.LoggingApplicationListener.initialize(LoggingApplicationListener.java:281)
at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEnvironmentPreparedEvent(LoggingApplicationListener.java:239)
at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:216)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:131)
at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:82)
at org.springframework.boot.SpringApplicationRunListeners.lambda$environmentPrepared$2(SpringApplicationRunListeners.java:63)
at java.util.ArrayList.forEach(ArrayList.java:1259)
at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:117)
at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:111)
at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:62)
at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:375)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:333)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1340)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1329)
at com.xxl.job.admin.XxlJobAdminApplication.main(XxlJobAdminApplication.java:13)
This means that the initialization log file is not created due to insufficient permissions! Then the online solution is the same as
but when I operate, I suddenly prompt that the parent directory has only read-only permission. What the hell
zhaoxiaofeng@zhaoxiaofengdeMacBook-Pro ~ % cd /
zhaoxiaofeng@zhaoxiaofengdeMacBook-Pro/% pwd
/
zhaoxiaofeng@zhaoxiaofengdeMacBook-Pro/% sudo mkdir data
Password:
mkdir: data: Read-only file system
zhaoxiaofeng@zhaoxiaofengdeMacBook-Pro/%
Then there is another search. Sure enough, it is the same to start SPI, etc., but the system restart will fail, so this can not essentially solve the problem. Later, in the comments of netizens, it was found that only adding “.” before recording log path can solve the problem. As follows:
will make complaints about /data/applogs/xxl-job/xxl-job-admin.log
when ./data/applogs/xxl-job/xxl-job-admin.log
is replaced by ./data/applogs/xxl-job/xxl-job-admin.log
. Only copy and carry
I can’t help but sigh that I have commented on Daniel since ancient times