[ 
https://issues.apache.org/jira/browse/HDDS-2098?focusedWorklogId=313496&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-313496
 ]

ASF GitHub Bot logged work on HDDS-2098:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 17/Sep/19 05:14
            Start Date: 17/Sep/19 05:14
    Worklog Time Spent: 10m 
      Work Description: avijayanhwx commented on issue #1411: HDDS-2098 : Ozone 
shell command prints out ERROR when the log4j file …
URL: https://github.com/apache/hadoop/pull/1411#issuecomment-529639718
 
 
   > I have a question
   > During ozone tarball build, we do copy ozone-shell-log4j.properties to 
etc/hadoop (like we copy log4.properties then why do we see this error or 
something need to be fixed in copying this script?
   > 
   > 
https://github.com/apache/hadoop/blob/trunk/hadoop-ozone/dist/dev-support/bin/dist-layout-stitching#L95
   
   Yes, while starting ozone from snapshot tar ball, it works perfectly. 
However, when Ozone is deployed through a cluster management tool like Cloudera 
Manager, the log4j properties may not be individually configurable. We may have 
to rely on a default log4.properties. In that case, printing a 
FileNotFoundException for ozone shell commands is something we can avoid. 
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 313496)
    Time Spent: 2h 20m  (was: 2h 10m)

> Ozone shell command prints out ERROR when the log4j file is not present.
> ------------------------------------------------------------------------
>
>                 Key: HDDS-2098
>                 URL: https://issues.apache.org/jira/browse/HDDS-2098
>             Project: Hadoop Distributed Data Store
>          Issue Type: Bug
>          Components: Ozone CLI
>    Affects Versions: 0.5.0
>            Reporter: Aravindan Vijayan
>            Assignee: Aravindan Vijayan
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 0.5.0
>
>          Time Spent: 2h 20m
>  Remaining Estimate: 0h
>
> *Exception Trace*
> {code}
> log4j:ERROR Could not read configuration file from URL 
> [file:/etc/ozone/conf/ozone-shell-log4j.properties].
> java.io.FileNotFoundException: /etc/ozone/conf/ozone-shell-log4j.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 
> sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
>       at 
> sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
>       at 
> org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:557)
>       at 
> org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:526)
>       at org.apache.log4j.LogManager.<clinit>(LogManager.java:127)
>       at org.slf4j.impl.Log4jLoggerFactory.<init>(Log4jLoggerFactory.java:66)
>       at org.slf4j.impl.StaticLoggerBinder.<init>(StaticLoggerBinder.java:72)
>       at 
> org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:45)
>       at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
>       at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
>       at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:412)
>       at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:357)
>       at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:383)
>       at org.apache.hadoop.ozone.web.ozShell.Shell.<clinit>(Shell.java:35)
> log4j:ERROR Ignoring configuration file 
> [file:/etc/ozone/conf/ozone-shell-log4j.properties].
> log4j:WARN No appenders could be found for logger 
> (io.jaegertracing.thrift.internal.senders.ThriftSenderFactory).
> log4j:WARN Please initialize the log4j system properly.
> log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more 
> info.
> {
>   "metadata" : { },
>   "name" : "vol-test-putfile-1567740142",
>   "admin" : "root",
>   "owner" : "root",
>   "creationTime" : 1567740146501,
>   "acls" : [ {
>     "type" : "USER",
>     "name" : "root",
>     "aclScope" : "ACCESS",
>     "aclList" : [ "ALL" ]
>   }, {
>     "type" : "GROUP",
>     "name" : "root",
>     "aclScope" : "ACCESS",
>     "aclList" : [ "ALL" ]
>   } ],
>   "quota" : 1152921504606846976
> }
> {code}
> *Fix*
> When a log4j file is not present, the default should be console.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to