You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by "Ray Yang (JIRA)" <ji...@apache.org> on 2017/11/28 23:00:00 UTC
[jira] [Created] (GOBBLIN-322) Cluster mode failed to start. Failed
to find a log4j config file
Ray Yang created GOBBLIN-322:
--------------------------------
Summary: Cluster mode failed to start. Failed to find a log4j config file
Key: GOBBLIN-322
URL: https://issues.apache.org/jira/browse/GOBBLIN-322
Project: Apache Gobblin
Issue Type: Bug
Components: gobblin-cluster
Reporter: Ray Yang
Assignee: Hung Tran
Issue:
When running the bin/gobblin-cluster-master.sh
I got an exception below:
Exception in thread "main" java.io.FileNotFoundException: log4j-cluster.properties (No such file or directory)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at java.io.FileInputStream.<init>(FileInputStream.java:93)
at org.apache.gobblin.util.logs.Log4jConfigurationHelper.updateLog4jConfiguration(Log4jConfigurationHelper.java:51)
at org.apache.gobblin.cluster.GobblinClusterManager.main(GobblinClusterManager.java:724)
bin/gobblin-cluster-worker.sh has a similar issue.
Analysis:
public static void updateLog4jConfiguration(Class<?> targetClass, String log4jPath, String log4jFileName)
throws IOException {
Closer closer = Closer.create();
try {
InputStream fileInputStream = closer.register(new FileInputStream(log4jPath));
The caller passes a simple file name
Log4jConfigurationHelper.updateLog4jConfiguration(GobblinClusterManager.class,
GobblinClusterConfigurationKeys.GOBBLIN_CLUSTER_LOG4J_CONFIGURATION_FILE,
GobblinClusterConfigurationKeys.GOBBLIN_CLUSTER_LOG4J_CONFIGURATION_FILE);
Solution:
This logic can be removed.
Users can simply pass in a custom log4j configuration directly if needed.
e.g.
-Dlog4j.configuration=file:/Users/foo/oss/gobblin/temp/my-log4j.properties
Or
add a custom log4j.properties file in the class path.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)