Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Is it possible to run flume agent in multiple terminals with different linux users?

avatar
Contributor

Hello,

I tried to run flume agent in mulitple services. I am getting the error given below.

Info: Including Hadoop libraries found via (/usr/bin/hadoop) for HDFS access Info: Excluding /usr/hdp/2.4.0.0-169/hadoop/lib/slf4j-api-1.7.10.jar from classpath Info: Excluding /usr/hdp/2.4.0.0-169/hadoop/lib/slf4j-log4j12-1.7.10.jar from classpath Info: Excluding /usr/hdp/2.4.0.0-169/tez/lib/slf4j-api-1.7.5.jar from classpath Info: Including HBASE libraries found via (/usr/bin/hbase) for HBASE access Info: Excluding /usr/hdp/2.4.0.0-169/hbase/lib/slf4j-api-1.7.7.jar from classpath Info: Excluding /usr/hdp/2.4.0.0-169/hadoop/lib/slf4j-api-1.7.10.jar from classpath Info: Excluding /usr/hdp/2.4.0.0-169/hadoop/lib/slf4j-log4j12-1.7.10.jar from classpath Info: Excluding /usr/hdp/2.4.0.0-169/tez/lib/slf4j-api-1.7.5.jar from classpath Info: Excluding /usr/hdp/2.4.0.0-169/hadoop/lib/slf4j-api-1.7.10.jar from classpath Info: Excluding /usr/hdp/2.4.0.0-169/hadoop/lib/slf4j-log4j12-1.7.10.jar from classpath Info: Excluding /usr/hdp/2.4.0.0-169/zookeeper/lib/slf4j-api-1.6.1.jar from classpath Info: Excluding /usr/hdp/2.4.0.0-169/zookeeper/lib/slf4j-log4j12-1.6.1.jar from classpath Info: Including Hive libraries found via () for Hive access

+ exec /usr/bin/java -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=4159 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false

log4j:ERROR setFile(null,true) call failed. java.io.FileNotFoundException: /var/log/flume/flume.log (Permission denied) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(FileOutputStream.java:221) at java.io.FileOutputStream.<init>(FileOutputStream.java:142) at org.apache.log4j.FileAppender.setFile(FileAppender.java:294) at org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java:207) at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:165) at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:307) at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:172) at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:104) at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:809) at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:735) at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:615) at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:502) at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:547) at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:483) at org.apache.log4j.LogManager.<clinit>(LogManager.java:127) at org.slf4j.impl.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:73) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:242) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:254) at org.apache.flume.node.Application.<clinit>(Application.java:58)

1 ACCEPTED SOLUTION

avatar
Super Collaborator

Grant write permissions to /var/log/flume directory. Also you can specify alternative log file for specific agent:

-Dflume.log.file=my_path/my_file.log

View solution in original post

2 REPLIES 2

avatar
Super Collaborator

Grant write permissions to /var/log/flume directory. Also you can specify alternative log file for specific agent:

-Dflume.log.file=my_path/my_file.log

avatar
Contributor

Thank you, I try with this parameter