Score:1

ERROR RollingFileAppender

kw flag

When I check the service unifi status I see this error and would like to clear it up. I am noob+ in Ubuntu so I can figure things out if given clear instructions on where to start looking and how to look. If anyone can help I would greatly appreciate it.

ERROR Unable to invoke factory method in class org.apache.logging.log4j.core.appender.
RollingFileAppender for element RollingFile: java.lang.
IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.
RollingFileAppender java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.
RollingFileAppender
Score:1
in flag

This is usually a write permissions issue, where the service is not permitted to write to the logging location.

In your log4j.xml file you'll see sections that look like this:

<RollingFile
    name="RollingFile"
    fileName="${log.dir}/le-${app}.log"
    filePattern="${log.dir}/le-${app}-%d{yyyy-MM-dd}-%i.log.gz"
    ignoreExceptions="false"
    ...
</RollingFile>

Note the {log.dir} location and confirm that the service running Unifi is able to write to that directory. If it cannot, consider creating a specific directory for the service to use like this:

sudo mkdir /var/log/unifi
sudo chown -R {unifi}:{unifi} /var/log/unifi 

Note: Be sure to change {unifi} to whatever username is running the service.

The location does not need to be within /var/log if you would rather the logs be written somewhere else.

E. R. avatar
kw flag
**UPDATE** I upgraded the service from 6.5.55 to 7.0.22 and the error was cleared up. I am saving these commands to look more into them as I stated I learn commands through example and this should help me in the future and hopefully help somebody else. It is unifi. I will follow the commands shown as I am not good at Ubuntu so commands get the best of me unless I know what they are.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.