You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Mahesh Sankaran <sa...@gmail.com> on 2016/05/25 07:26:32 UTC

How to enable log4j properties in hbase

Hi All,

I have configured hbase authorization in my hbase cluster. Now i want to
enable audit logs for hbase authorization to monitor users. For that i did
following changes.

1.vim /etc/hbase/conf/log4j.properties

log4j.rootLogger=${hbase.root.logger}
hbase.root.logger=INFO,console
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.target=System.err
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p
%c{2}: %m%n

log4j.logger.SecurityLogger=TRACE, RFAS
log4j.additivity.SecurityLogger=false
log4j.appender.RFAS=org.apache.log4j.RollingFileAppender
log4j.appender.RFAS.File=${log.dir}/audit/SecurityAuth-hbase.audit
log4j.appender.RFAS.layout=org.apache.log4j.PatternLayout
log4j.appender.RFAS.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n
log4j.appender.RFAS.MaxFileSize=${max.log.file.size}
log4j.appender.RFAS.MaxBackupIndex=${max.log.file.backup.index}


2.Restarted my hbase cluster. SecurityAuth-hbase.audit file is created but
there is no content inside that file.

Kindly help me to enable audit logs for hbase authorization.

Note: I am using cloudera

Thanks,

Mahesh

RE: How to enable log4j properties in hbase

Posted by ashish singhi <as...@huawei.com>.
Ideally with that much changes it should work.

If you are running any master operation then please check in active master audit log file for the logs. Also check whether you have enough permission on that log file.
If still it's not logging then only thing I can think of is to debug and find out why it's not logging.

Regards,
Ashish

-----Original Message-----
From: Mahesh Sankaran [mailto:sankarmahesh37@gmail.com] 
Sent: 27 May 2016 12:53
To: user@hbase.apache.org
Subject: Re: How to enable log4j properties in hbase

Hi,

Can you share steps. I think am missing something

Regards,
Mahesh

On Thu, May 26, 2016 at 2:36 PM, Mahesh Sankaran <sa...@gmail.com>
wrote:

> yes i have added above properties.
>
> On Thu, May 26, 2016 at 1:10 PM, ashish singhi 
> <as...@huawei.com>
> wrote:
>
>> Forgot to say before, I hope you have added 
>> "org.apache.hadoop.hbase.security.access.AccessController" class in 
>> the master, rs and region coprocessor configuration in hbase-site.xml.
>>
>> Regards,
>> Ashish
>>
>> -----Original Message-----
>> From: Mahesh Sankaran [mailto:sankarmahesh37@gmail.com]
>> Sent: 26 May 2016 12:33
>> To: user@hbase.apache.org
>> Subject: Re: How to enable log4j properties in hbase
>>
>> Hi Ashish,
>>
>> Yes i have restarted and tried hbase authorization operation. Still 
>> facing same issue.
>>
>> Thanks,
>>
>> Mahesh
>>
>> On Wed, May 25, 2016 at 2:04 PM, ashish singhi 
>> <as...@huawei.com>
>> wrote:
>>
>> > Hi,
>> > Did you restart the HBase service ?
>> > Did you try any HBase operation ?
>> >
>> > Regards,
>> > Ashish
>> >
>> > -----Original Message-----
>> > From: Mahesh Sankaran [mailto:sankarmahesh37@gmail.com]
>> > Sent: 25 May 2016 13:32
>> > To: user@hbase.apache.org
>> > Subject: Re: How to enable log4j properties in hbase
>> >
>> > Hi Ashish,
>> >
>> > Thanks for your quick reply.
>> > I uncommented mentioned property. But it is not working.
>> >
>> > Thanks,
>> > Mahesh
>> >
>> > On Wed, May 25, 2016 at 1:10 PM, ashish singhi 
>> > <as...@huawei.com>
>> > wrote:
>> >
>> > > Uncomment
>> > >
>> >
>> "log4j.logger.SecurityLogger.org.apache.hadoop.hbase.security.access.AccessController=TRACE"
>> > > this line in log4j.properties file.
>> > >
>> > > Regards,
>> > > Ashish
>> > >
>> > > -----Original Message-----
>> > > From: Mahesh Sankaran [mailto:sankarmahesh37@gmail.com]
>> > > Sent: 25 May 2016 13:01
>> > > To: user@hbase.apache.org
>> > > Subject: Re: How to enable log4j properties in hbase
>> > >
>> > > Hi,
>> > >
>> > > And also am using hbase-1.2.0 from cdh 5.7
>> > >
>> > > Thanks,
>> > > Mahesh
>> > >
>> > > On Wed, May 25, 2016 at 12:56 PM, Mahesh Sankaran < 
>> > > sankarmahesh37@gmail.com>
>> > > wrote:
>> > >
>> > > > Hi All,
>> > > >
>> > > > I have configured hbase authorization in my hbase cluster. Now 
>> > > > i want to enable audit logs for hbase authorization to monitor users.
>> > > > For that i did following changes.
>> > > >
>> > > > 1.vim /etc/hbase/conf/log4j.properties
>> > > >
>> > > > log4j.rootLogger=${hbase.root.logger}
>> > > > hbase.root.logger=INFO,console
>> > > > log4j.appender.console=org.apache.log4j.ConsoleAppender
>> > > > log4j.appender.console.target=System.err
>> > > > log4j.appender.console.layout=org.apache.log4j.PatternLayout
>> > > > log4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd
>> > > > HH:mm:ss} %p
>> > > > %c{2}: %m%n
>> > > >
>> > > > log4j.logger.SecurityLogger=TRACE, RFAS 
>> > > > log4j.additivity.SecurityLogger=false
>> > > > log4j.appender.RFAS=org.apache.log4j.RollingFileAppender
>> > > > log4j.appender.RFAS.File=${log.dir}/audit/SecurityAuth-hbase.au
>> > > > dit log4j.appender.RFAS.layout=org.apache.log4j.PatternLayout
>> > > > log4j.appender.RFAS.layout.ConversionPattern=%d{ISO8601} %p %c:
>> > > > %m%n log4j.appender.RFAS.MaxFileSize=${max.log.file.size}
>> > > > log4j.appender.RFAS.MaxBackupIndex=${max.log.file.backup.index}
>> > > >
>> > > >
>> > > > 2.Restarted my hbase cluster. SecurityAuth-hbase.audit file is 
>> > > > created but there is no content inside that file.
>> > > >
>> > > > Kindly help me to enable audit logs for hbase authorization.
>> > > >
>> > > > Note: I am using cloudera
>> > > >
>> > > > Thanks,
>> > > >
>> > > > Mahesh
>> > > >
>> > >
>> >
>>
>
>

Re: How to enable log4j properties in hbase

Posted by Mahesh Sankaran <sa...@gmail.com>.
Hi,

Can you share steps. I think am missing something

Regards,
Mahesh

On Thu, May 26, 2016 at 2:36 PM, Mahesh Sankaran <sa...@gmail.com>
wrote:

> yes i have added above properties.
>
> On Thu, May 26, 2016 at 1:10 PM, ashish singhi <as...@huawei.com>
> wrote:
>
>> Forgot to say before, I hope you have added
>> "org.apache.hadoop.hbase.security.access.AccessController" class in the
>> master, rs and region coprocessor configuration in hbase-site.xml.
>>
>> Regards,
>> Ashish
>>
>> -----Original Message-----
>> From: Mahesh Sankaran [mailto:sankarmahesh37@gmail.com]
>> Sent: 26 May 2016 12:33
>> To: user@hbase.apache.org
>> Subject: Re: How to enable log4j properties in hbase
>>
>> Hi Ashish,
>>
>> Yes i have restarted and tried hbase authorization operation. Still
>> facing same issue.
>>
>> Thanks,
>>
>> Mahesh
>>
>> On Wed, May 25, 2016 at 2:04 PM, ashish singhi <as...@huawei.com>
>> wrote:
>>
>> > Hi,
>> > Did you restart the HBase service ?
>> > Did you try any HBase operation ?
>> >
>> > Regards,
>> > Ashish
>> >
>> > -----Original Message-----
>> > From: Mahesh Sankaran [mailto:sankarmahesh37@gmail.com]
>> > Sent: 25 May 2016 13:32
>> > To: user@hbase.apache.org
>> > Subject: Re: How to enable log4j properties in hbase
>> >
>> > Hi Ashish,
>> >
>> > Thanks for your quick reply.
>> > I uncommented mentioned property. But it is not working.
>> >
>> > Thanks,
>> > Mahesh
>> >
>> > On Wed, May 25, 2016 at 1:10 PM, ashish singhi
>> > <as...@huawei.com>
>> > wrote:
>> >
>> > > Uncomment
>> > >
>> >
>> "log4j.logger.SecurityLogger.org.apache.hadoop.hbase.security.access.AccessController=TRACE"
>> > > this line in log4j.properties file.
>> > >
>> > > Regards,
>> > > Ashish
>> > >
>> > > -----Original Message-----
>> > > From: Mahesh Sankaran [mailto:sankarmahesh37@gmail.com]
>> > > Sent: 25 May 2016 13:01
>> > > To: user@hbase.apache.org
>> > > Subject: Re: How to enable log4j properties in hbase
>> > >
>> > > Hi,
>> > >
>> > > And also am using hbase-1.2.0 from cdh 5.7
>> > >
>> > > Thanks,
>> > > Mahesh
>> > >
>> > > On Wed, May 25, 2016 at 12:56 PM, Mahesh Sankaran <
>> > > sankarmahesh37@gmail.com>
>> > > wrote:
>> > >
>> > > > Hi All,
>> > > >
>> > > > I have configured hbase authorization in my hbase cluster. Now i
>> > > > want to enable audit logs for hbase authorization to monitor users.
>> > > > For that i did following changes.
>> > > >
>> > > > 1.vim /etc/hbase/conf/log4j.properties
>> > > >
>> > > > log4j.rootLogger=${hbase.root.logger}
>> > > > hbase.root.logger=INFO,console
>> > > > log4j.appender.console=org.apache.log4j.ConsoleAppender
>> > > > log4j.appender.console.target=System.err
>> > > > log4j.appender.console.layout=org.apache.log4j.PatternLayout
>> > > > log4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd
>> > > > HH:mm:ss} %p
>> > > > %c{2}: %m%n
>> > > >
>> > > > log4j.logger.SecurityLogger=TRACE, RFAS
>> > > > log4j.additivity.SecurityLogger=false
>> > > > log4j.appender.RFAS=org.apache.log4j.RollingFileAppender
>> > > > log4j.appender.RFAS.File=${log.dir}/audit/SecurityAuth-hbase.audit
>> > > > log4j.appender.RFAS.layout=org.apache.log4j.PatternLayout
>> > > > log4j.appender.RFAS.layout.ConversionPattern=%d{ISO8601} %p %c:
>> > > > %m%n log4j.appender.RFAS.MaxFileSize=${max.log.file.size}
>> > > > log4j.appender.RFAS.MaxBackupIndex=${max.log.file.backup.index}
>> > > >
>> > > >
>> > > > 2.Restarted my hbase cluster. SecurityAuth-hbase.audit file is
>> > > > created but there is no content inside that file.
>> > > >
>> > > > Kindly help me to enable audit logs for hbase authorization.
>> > > >
>> > > > Note: I am using cloudera
>> > > >
>> > > > Thanks,
>> > > >
>> > > > Mahesh
>> > > >
>> > >
>> >
>>
>
>

Re: How to enable log4j properties in hbase

Posted by Mahesh Sankaran <sa...@gmail.com>.
yes i have added above properties.

On Thu, May 26, 2016 at 1:10 PM, ashish singhi <as...@huawei.com>
wrote:

> Forgot to say before, I hope you have added
> "org.apache.hadoop.hbase.security.access.AccessController" class in the
> master, rs and region coprocessor configuration in hbase-site.xml.
>
> Regards,
> Ashish
>
> -----Original Message-----
> From: Mahesh Sankaran [mailto:sankarmahesh37@gmail.com]
> Sent: 26 May 2016 12:33
> To: user@hbase.apache.org
> Subject: Re: How to enable log4j properties in hbase
>
> Hi Ashish,
>
> Yes i have restarted and tried hbase authorization operation. Still facing
> same issue.
>
> Thanks,
>
> Mahesh
>
> On Wed, May 25, 2016 at 2:04 PM, ashish singhi <as...@huawei.com>
> wrote:
>
> > Hi,
> > Did you restart the HBase service ?
> > Did you try any HBase operation ?
> >
> > Regards,
> > Ashish
> >
> > -----Original Message-----
> > From: Mahesh Sankaran [mailto:sankarmahesh37@gmail.com]
> > Sent: 25 May 2016 13:32
> > To: user@hbase.apache.org
> > Subject: Re: How to enable log4j properties in hbase
> >
> > Hi Ashish,
> >
> > Thanks for your quick reply.
> > I uncommented mentioned property. But it is not working.
> >
> > Thanks,
> > Mahesh
> >
> > On Wed, May 25, 2016 at 1:10 PM, ashish singhi
> > <as...@huawei.com>
> > wrote:
> >
> > > Uncomment
> > >
> >
> "log4j.logger.SecurityLogger.org.apache.hadoop.hbase.security.access.AccessController=TRACE"
> > > this line in log4j.properties file.
> > >
> > > Regards,
> > > Ashish
> > >
> > > -----Original Message-----
> > > From: Mahesh Sankaran [mailto:sankarmahesh37@gmail.com]
> > > Sent: 25 May 2016 13:01
> > > To: user@hbase.apache.org
> > > Subject: Re: How to enable log4j properties in hbase
> > >
> > > Hi,
> > >
> > > And also am using hbase-1.2.0 from cdh 5.7
> > >
> > > Thanks,
> > > Mahesh
> > >
> > > On Wed, May 25, 2016 at 12:56 PM, Mahesh Sankaran <
> > > sankarmahesh37@gmail.com>
> > > wrote:
> > >
> > > > Hi All,
> > > >
> > > > I have configured hbase authorization in my hbase cluster. Now i
> > > > want to enable audit logs for hbase authorization to monitor users.
> > > > For that i did following changes.
> > > >
> > > > 1.vim /etc/hbase/conf/log4j.properties
> > > >
> > > > log4j.rootLogger=${hbase.root.logger}
> > > > hbase.root.logger=INFO,console
> > > > log4j.appender.console=org.apache.log4j.ConsoleAppender
> > > > log4j.appender.console.target=System.err
> > > > log4j.appender.console.layout=org.apache.log4j.PatternLayout
> > > > log4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd
> > > > HH:mm:ss} %p
> > > > %c{2}: %m%n
> > > >
> > > > log4j.logger.SecurityLogger=TRACE, RFAS
> > > > log4j.additivity.SecurityLogger=false
> > > > log4j.appender.RFAS=org.apache.log4j.RollingFileAppender
> > > > log4j.appender.RFAS.File=${log.dir}/audit/SecurityAuth-hbase.audit
> > > > log4j.appender.RFAS.layout=org.apache.log4j.PatternLayout
> > > > log4j.appender.RFAS.layout.ConversionPattern=%d{ISO8601} %p %c:
> > > > %m%n log4j.appender.RFAS.MaxFileSize=${max.log.file.size}
> > > > log4j.appender.RFAS.MaxBackupIndex=${max.log.file.backup.index}
> > > >
> > > >
> > > > 2.Restarted my hbase cluster. SecurityAuth-hbase.audit file is
> > > > created but there is no content inside that file.
> > > >
> > > > Kindly help me to enable audit logs for hbase authorization.
> > > >
> > > > Note: I am using cloudera
> > > >
> > > > Thanks,
> > > >
> > > > Mahesh
> > > >
> > >
> >
>

RE: How to enable log4j properties in hbase

Posted by ashish singhi <as...@huawei.com>.
Forgot to say before, I hope you have added "org.apache.hadoop.hbase.security.access.AccessController" class in the master, rs and region coprocessor configuration in hbase-site.xml.

Regards,
Ashish

-----Original Message-----
From: Mahesh Sankaran [mailto:sankarmahesh37@gmail.com] 
Sent: 26 May 2016 12:33
To: user@hbase.apache.org
Subject: Re: How to enable log4j properties in hbase

Hi Ashish,

Yes i have restarted and tried hbase authorization operation. Still facing same issue.

Thanks,

Mahesh

On Wed, May 25, 2016 at 2:04 PM, ashish singhi <as...@huawei.com>
wrote:

> Hi,
> Did you restart the HBase service ?
> Did you try any HBase operation ?
>
> Regards,
> Ashish
>
> -----Original Message-----
> From: Mahesh Sankaran [mailto:sankarmahesh37@gmail.com]
> Sent: 25 May 2016 13:32
> To: user@hbase.apache.org
> Subject: Re: How to enable log4j properties in hbase
>
> Hi Ashish,
>
> Thanks for your quick reply.
> I uncommented mentioned property. But it is not working.
>
> Thanks,
> Mahesh
>
> On Wed, May 25, 2016 at 1:10 PM, ashish singhi 
> <as...@huawei.com>
> wrote:
>
> > Uncomment
> >
> "log4j.logger.SecurityLogger.org.apache.hadoop.hbase.security.access.AccessController=TRACE"
> > this line in log4j.properties file.
> >
> > Regards,
> > Ashish
> >
> > -----Original Message-----
> > From: Mahesh Sankaran [mailto:sankarmahesh37@gmail.com]
> > Sent: 25 May 2016 13:01
> > To: user@hbase.apache.org
> > Subject: Re: How to enable log4j properties in hbase
> >
> > Hi,
> >
> > And also am using hbase-1.2.0 from cdh 5.7
> >
> > Thanks,
> > Mahesh
> >
> > On Wed, May 25, 2016 at 12:56 PM, Mahesh Sankaran < 
> > sankarmahesh37@gmail.com>
> > wrote:
> >
> > > Hi All,
> > >
> > > I have configured hbase authorization in my hbase cluster. Now i 
> > > want to enable audit logs for hbase authorization to monitor users.
> > > For that i did following changes.
> > >
> > > 1.vim /etc/hbase/conf/log4j.properties
> > >
> > > log4j.rootLogger=${hbase.root.logger}
> > > hbase.root.logger=INFO,console
> > > log4j.appender.console=org.apache.log4j.ConsoleAppender
> > > log4j.appender.console.target=System.err
> > > log4j.appender.console.layout=org.apache.log4j.PatternLayout
> > > log4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd
> > > HH:mm:ss} %p
> > > %c{2}: %m%n
> > >
> > > log4j.logger.SecurityLogger=TRACE, RFAS 
> > > log4j.additivity.SecurityLogger=false
> > > log4j.appender.RFAS=org.apache.log4j.RollingFileAppender
> > > log4j.appender.RFAS.File=${log.dir}/audit/SecurityAuth-hbase.audit
> > > log4j.appender.RFAS.layout=org.apache.log4j.PatternLayout
> > > log4j.appender.RFAS.layout.ConversionPattern=%d{ISO8601} %p %c: 
> > > %m%n log4j.appender.RFAS.MaxFileSize=${max.log.file.size}
> > > log4j.appender.RFAS.MaxBackupIndex=${max.log.file.backup.index}
> > >
> > >
> > > 2.Restarted my hbase cluster. SecurityAuth-hbase.audit file is 
> > > created but there is no content inside that file.
> > >
> > > Kindly help me to enable audit logs for hbase authorization.
> > >
> > > Note: I am using cloudera
> > >
> > > Thanks,
> > >
> > > Mahesh
> > >
> >
>

Re: How to enable log4j properties in hbase

Posted by Mahesh Sankaran <sa...@gmail.com>.
Hi Ashish,

Yes i have restarted and tried hbase authorization operation. Still facing
same issue.

Thanks,

Mahesh

On Wed, May 25, 2016 at 2:04 PM, ashish singhi <as...@huawei.com>
wrote:

> Hi,
> Did you restart the HBase service ?
> Did you try any HBase operation ?
>
> Regards,
> Ashish
>
> -----Original Message-----
> From: Mahesh Sankaran [mailto:sankarmahesh37@gmail.com]
> Sent: 25 May 2016 13:32
> To: user@hbase.apache.org
> Subject: Re: How to enable log4j properties in hbase
>
> Hi Ashish,
>
> Thanks for your quick reply.
> I uncommented mentioned property. But it is not working.
>
> Thanks,
> Mahesh
>
> On Wed, May 25, 2016 at 1:10 PM, ashish singhi <as...@huawei.com>
> wrote:
>
> > Uncomment
> >
> "log4j.logger.SecurityLogger.org.apache.hadoop.hbase.security.access.AccessController=TRACE"
> > this line in log4j.properties file.
> >
> > Regards,
> > Ashish
> >
> > -----Original Message-----
> > From: Mahesh Sankaran [mailto:sankarmahesh37@gmail.com]
> > Sent: 25 May 2016 13:01
> > To: user@hbase.apache.org
> > Subject: Re: How to enable log4j properties in hbase
> >
> > Hi,
> >
> > And also am using hbase-1.2.0 from cdh 5.7
> >
> > Thanks,
> > Mahesh
> >
> > On Wed, May 25, 2016 at 12:56 PM, Mahesh Sankaran <
> > sankarmahesh37@gmail.com>
> > wrote:
> >
> > > Hi All,
> > >
> > > I have configured hbase authorization in my hbase cluster. Now i
> > > want to enable audit logs for hbase authorization to monitor users.
> > > For that i did following changes.
> > >
> > > 1.vim /etc/hbase/conf/log4j.properties
> > >
> > > log4j.rootLogger=${hbase.root.logger}
> > > hbase.root.logger=INFO,console
> > > log4j.appender.console=org.apache.log4j.ConsoleAppender
> > > log4j.appender.console.target=System.err
> > > log4j.appender.console.layout=org.apache.log4j.PatternLayout
> > > log4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd
> > > HH:mm:ss} %p
> > > %c{2}: %m%n
> > >
> > > log4j.logger.SecurityLogger=TRACE, RFAS
> > > log4j.additivity.SecurityLogger=false
> > > log4j.appender.RFAS=org.apache.log4j.RollingFileAppender
> > > log4j.appender.RFAS.File=${log.dir}/audit/SecurityAuth-hbase.audit
> > > log4j.appender.RFAS.layout=org.apache.log4j.PatternLayout
> > > log4j.appender.RFAS.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n
> > > log4j.appender.RFAS.MaxFileSize=${max.log.file.size}
> > > log4j.appender.RFAS.MaxBackupIndex=${max.log.file.backup.index}
> > >
> > >
> > > 2.Restarted my hbase cluster. SecurityAuth-hbase.audit file is
> > > created but there is no content inside that file.
> > >
> > > Kindly help me to enable audit logs for hbase authorization.
> > >
> > > Note: I am using cloudera
> > >
> > > Thanks,
> > >
> > > Mahesh
> > >
> >
>

RE: How to enable log4j properties in hbase

Posted by ashish singhi <as...@huawei.com>.
Hi,
Did you restart the HBase service ?
Did you try any HBase operation ?

Regards,
Ashish

-----Original Message-----
From: Mahesh Sankaran [mailto:sankarmahesh37@gmail.com] 
Sent: 25 May 2016 13:32
To: user@hbase.apache.org
Subject: Re: How to enable log4j properties in hbase

Hi Ashish,

Thanks for your quick reply.
I uncommented mentioned property. But it is not working.

Thanks,
Mahesh

On Wed, May 25, 2016 at 1:10 PM, ashish singhi <as...@huawei.com>
wrote:

> Uncomment
> "log4j.logger.SecurityLogger.org.apache.hadoop.hbase.security.access.AccessController=TRACE"
> this line in log4j.properties file.
>
> Regards,
> Ashish
>
> -----Original Message-----
> From: Mahesh Sankaran [mailto:sankarmahesh37@gmail.com]
> Sent: 25 May 2016 13:01
> To: user@hbase.apache.org
> Subject: Re: How to enable log4j properties in hbase
>
> Hi,
>
> And also am using hbase-1.2.0 from cdh 5.7
>
> Thanks,
> Mahesh
>
> On Wed, May 25, 2016 at 12:56 PM, Mahesh Sankaran < 
> sankarmahesh37@gmail.com>
> wrote:
>
> > Hi All,
> >
> > I have configured hbase authorization in my hbase cluster. Now i 
> > want to enable audit logs for hbase authorization to monitor users. 
> > For that i did following changes.
> >
> > 1.vim /etc/hbase/conf/log4j.properties
> >
> > log4j.rootLogger=${hbase.root.logger}
> > hbase.root.logger=INFO,console
> > log4j.appender.console=org.apache.log4j.ConsoleAppender
> > log4j.appender.console.target=System.err
> > log4j.appender.console.layout=org.apache.log4j.PatternLayout
> > log4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd 
> > HH:mm:ss} %p
> > %c{2}: %m%n
> >
> > log4j.logger.SecurityLogger=TRACE, RFAS 
> > log4j.additivity.SecurityLogger=false
> > log4j.appender.RFAS=org.apache.log4j.RollingFileAppender
> > log4j.appender.RFAS.File=${log.dir}/audit/SecurityAuth-hbase.audit
> > log4j.appender.RFAS.layout=org.apache.log4j.PatternLayout
> > log4j.appender.RFAS.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n 
> > log4j.appender.RFAS.MaxFileSize=${max.log.file.size}
> > log4j.appender.RFAS.MaxBackupIndex=${max.log.file.backup.index}
> >
> >
> > 2.Restarted my hbase cluster. SecurityAuth-hbase.audit file is 
> > created but there is no content inside that file.
> >
> > Kindly help me to enable audit logs for hbase authorization.
> >
> > Note: I am using cloudera
> >
> > Thanks,
> >
> > Mahesh
> >
>

Re: How to enable log4j properties in hbase

Posted by Mahesh Sankaran <sa...@gmail.com>.
Hi Ashish,

Thanks for your quick reply.
I uncommented mentioned property. But it is not working.

Thanks,
Mahesh

On Wed, May 25, 2016 at 1:10 PM, ashish singhi <as...@huawei.com>
wrote:

> Uncomment
> "log4j.logger.SecurityLogger.org.apache.hadoop.hbase.security.access.AccessController=TRACE"
> this line in log4j.properties file.
>
> Regards,
> Ashish
>
> -----Original Message-----
> From: Mahesh Sankaran [mailto:sankarmahesh37@gmail.com]
> Sent: 25 May 2016 13:01
> To: user@hbase.apache.org
> Subject: Re: How to enable log4j properties in hbase
>
> Hi,
>
> And also am using hbase-1.2.0 from cdh 5.7
>
> Thanks,
> Mahesh
>
> On Wed, May 25, 2016 at 12:56 PM, Mahesh Sankaran <
> sankarmahesh37@gmail.com>
> wrote:
>
> > Hi All,
> >
> > I have configured hbase authorization in my hbase cluster. Now i want
> > to enable audit logs for hbase authorization to monitor users. For
> > that i did following changes.
> >
> > 1.vim /etc/hbase/conf/log4j.properties
> >
> > log4j.rootLogger=${hbase.root.logger}
> > hbase.root.logger=INFO,console
> > log4j.appender.console=org.apache.log4j.ConsoleAppender
> > log4j.appender.console.target=System.err
> > log4j.appender.console.layout=org.apache.log4j.PatternLayout
> > log4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss}
> > %p
> > %c{2}: %m%n
> >
> > log4j.logger.SecurityLogger=TRACE, RFAS
> > log4j.additivity.SecurityLogger=false
> > log4j.appender.RFAS=org.apache.log4j.RollingFileAppender
> > log4j.appender.RFAS.File=${log.dir}/audit/SecurityAuth-hbase.audit
> > log4j.appender.RFAS.layout=org.apache.log4j.PatternLayout
> > log4j.appender.RFAS.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n
> > log4j.appender.RFAS.MaxFileSize=${max.log.file.size}
> > log4j.appender.RFAS.MaxBackupIndex=${max.log.file.backup.index}
> >
> >
> > 2.Restarted my hbase cluster. SecurityAuth-hbase.audit file is created
> > but there is no content inside that file.
> >
> > Kindly help me to enable audit logs for hbase authorization.
> >
> > Note: I am using cloudera
> >
> > Thanks,
> >
> > Mahesh
> >
>

RE: How to enable log4j properties in hbase

Posted by ashish singhi <as...@huawei.com>.
Uncomment "log4j.logger.SecurityLogger.org.apache.hadoop.hbase.security.access.AccessController=TRACE" this line in log4j.properties file.

Regards,
Ashish

-----Original Message-----
From: Mahesh Sankaran [mailto:sankarmahesh37@gmail.com] 
Sent: 25 May 2016 13:01
To: user@hbase.apache.org
Subject: Re: How to enable log4j properties in hbase

Hi,

And also am using hbase-1.2.0 from cdh 5.7

Thanks,
Mahesh

On Wed, May 25, 2016 at 12:56 PM, Mahesh Sankaran <sa...@gmail.com>
wrote:

> Hi All,
>
> I have configured hbase authorization in my hbase cluster. Now i want 
> to enable audit logs for hbase authorization to monitor users. For 
> that i did following changes.
>
> 1.vim /etc/hbase/conf/log4j.properties
>
> log4j.rootLogger=${hbase.root.logger}
> hbase.root.logger=INFO,console
> log4j.appender.console=org.apache.log4j.ConsoleAppender
> log4j.appender.console.target=System.err
> log4j.appender.console.layout=org.apache.log4j.PatternLayout
> log4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} 
> %p
> %c{2}: %m%n
>
> log4j.logger.SecurityLogger=TRACE, RFAS 
> log4j.additivity.SecurityLogger=false
> log4j.appender.RFAS=org.apache.log4j.RollingFileAppender
> log4j.appender.RFAS.File=${log.dir}/audit/SecurityAuth-hbase.audit
> log4j.appender.RFAS.layout=org.apache.log4j.PatternLayout
> log4j.appender.RFAS.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n 
> log4j.appender.RFAS.MaxFileSize=${max.log.file.size}
> log4j.appender.RFAS.MaxBackupIndex=${max.log.file.backup.index}
>
>
> 2.Restarted my hbase cluster. SecurityAuth-hbase.audit file is created 
> but there is no content inside that file.
>
> Kindly help me to enable audit logs for hbase authorization.
>
> Note: I am using cloudera
>
> Thanks,
>
> Mahesh
>

Re: How to enable log4j properties in hbase

Posted by Mahesh Sankaran <sa...@gmail.com>.
Hi,

And also am using hbase-1.2.0 from cdh 5.7

Thanks,
Mahesh

On Wed, May 25, 2016 at 12:56 PM, Mahesh Sankaran <sa...@gmail.com>
wrote:

> Hi All,
>
> I have configured hbase authorization in my hbase cluster. Now i want to
> enable audit logs for hbase authorization to monitor users. For that i did
> following changes.
>
> 1.vim /etc/hbase/conf/log4j.properties
>
> log4j.rootLogger=${hbase.root.logger}
> hbase.root.logger=INFO,console
> log4j.appender.console=org.apache.log4j.ConsoleAppender
> log4j.appender.console.target=System.err
> log4j.appender.console.layout=org.apache.log4j.PatternLayout
> log4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p
> %c{2}: %m%n
>
> log4j.logger.SecurityLogger=TRACE, RFAS
> log4j.additivity.SecurityLogger=false
> log4j.appender.RFAS=org.apache.log4j.RollingFileAppender
> log4j.appender.RFAS.File=${log.dir}/audit/SecurityAuth-hbase.audit
> log4j.appender.RFAS.layout=org.apache.log4j.PatternLayout
> log4j.appender.RFAS.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n
> log4j.appender.RFAS.MaxFileSize=${max.log.file.size}
> log4j.appender.RFAS.MaxBackupIndex=${max.log.file.backup.index}
>
>
> 2.Restarted my hbase cluster. SecurityAuth-hbase.audit file is created but
> there is no content inside that file.
>
> Kindly help me to enable audit logs for hbase authorization.
>
> Note: I am using cloudera
>
> Thanks,
>
> Mahesh
>