You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Kayak28 <ka...@gmail.com> on 2019/11/11 07:00:31 UTC

Printing NULL character in log files.

Hello, Solr Community:

I am using Solr7.4.0 which uses log4j (version 2.11 from Solr's Chanes.txt)
as its component.
Some of the log files that Solr generated contain <0x00> (null characters)
in log files (like below)

Because of this issue, it is difficult for me to trace what
actually happened to the Solr.

Does anyone have the same issue before?
If anyone knows a way to fix this issue or a cause of this issue, could you
please let me know?

Any clue will be very appreciated.


[Example Log 1]

2019-10-20 06:02:03.643 INFO  (coreCloseExecutor-140-thread-4) [
 x:corename1] o.a.s.m.SolrMetricManager Closing metric reporters for
registry=solr.core.corename,
tag=4c16<0x00><0x00><0x00><0x00>.......<0x00><0x00>00ff
2019-10-20 06:02:03.643 INFO  (coreCloseExecutor-140-thread-4) [
  x:corename1] o.a.s.m.r.SolrJmxReporter Closing reporter
[org.apache.solr.metrics.reporters.SolrJmxReporter@17281659: rootName =
null, domain = solr.core.corename, service url = null, agent id = null] for
registry solr.core.corename1/
com.codahale.metrics.MetricRegistry@6c9f45cc<0x00><0x00><0x00><0x00>......(continue
printing <0x00> untill the end of file.)

[Example Log 2]

2019-10-27 06:02:02.891 INFO  (coreCloseExecutor-140-thread-17) [
x:core2] o.a.s.m.r.SolrJmxReporter Closing reporter
[org.apache.solr.metrics.reporters.SolrJmxReporter@35e76d2e: rootName =
null, domain = solr.core.core2, service url = null, agent id = null] for
registry solr.core.core2 / com.codahale.metrics.MetricRegistry@76be90f4
2019-10-27 06:02:02.891 INFO  (coreCloseExecutor-140-thread-26) [
x:core3]<0x00><0x00><0x00><0x00><0x00><0x00><0x00><0x00>...<0x00><0x00>
o.a.s.m.SolrMetricManager Closing metric reporters for
registry=solr.core.TUN000, tag=34f04984
2019-10-27 06:02:02.891 INFO  (coreCloseExecutor-140-thread-26) [
x:TUN000] o.a.s.m.r.SolrJmxReporter Closing reporter
[org.apache.solr.metrics.reporters.SolrJmxReporter@378cecb: rootName =
null, domain = solr.core.TUN000, service url = null, agent id = null] for
registry solr.core.TUN000 / com.codahale.metrics.MetricRegistry@9c3410c
2019-10-27 06:02:05.063 INFO  (Thread-1) [   ] o.e.j.s.h.ContextHandler
Stopped o.e.j.w.WebAppContext@5fbe4146
{/solr,null,UNAVAILABLE}{file:///E:/apatchSolr/RCSS-basic-4.0.1/LUSOLR/solr/server//solr-webapp/webapp}
<0x00><0x00><0x00><0x00><0x00><0x00>...(printing <0x00> until the end of
the file)..<0x00><0x00>


Sincerely,
Kaya Ota

Re: Printing NULL character in log files.

Posted by Chris Hostetter <ho...@fucit.org>.
: Some of the log files that Solr generated contain <0x00> (null characters)
: in log files (like below)

I don't know of any reason why solr would write any null bytes to the 
logs, and certainly not in either of the places mentioned in your examples 
(where it would be at the end of an otherwise "complete" log message).  If 
those null bytes are in fact being written by the SOlr JVM they would have 
to have come from log4j.  (the Logger abstraction would ensure that if 
they came from Solr they would still have date/time/level prefix, etc...)

A cursory bit of googling doesn't suggest any reason why log4j would write 
null bytes spuriously to the log files -- but it does suggest that some 
log rotation tools can cause this behavior due.

Are you using the default solrlog4j log rotation, or some external tool?


: Does anyone have the same issue before?
: If anyone knows a way to fix this issue or a cause of this issue, could you
: please let me know?
: 
: Any clue will be very appreciated.
: 
: 
: [Example Log 1]
: 
: 2019-10-20 06:02:03.643 INFO  (coreCloseExecutor-140-thread-4) [
:  x:corename1] o.a.s.m.SolrMetricManager Closing metric reporters for
: registry=solr.core.corename,
: tag=4c16<0x00><0x00><0x00><0x00>.......<0x00><0x00>00ff
: 2019-10-20 06:02:03.643 INFO  (coreCloseExecutor-140-thread-4) [
:   x:corename1] o.a.s.m.r.SolrJmxReporter Closing reporter
: [org.apache.solr.metrics.reporters.SolrJmxReporter@17281659: rootName =
: null, domain = solr.core.corename, service url = null, agent id = null] for
: registry solr.core.corename1/
: com.codahale.metrics.MetricRegistry@6c9f45cc<0x00><0x00><0x00><0x00>......(continue
: printing <0x00> untill the end of file.)
: 
: [Example Log 2]
: 
: 2019-10-27 06:02:02.891 INFO  (coreCloseExecutor-140-thread-17) [
: x:core2] o.a.s.m.r.SolrJmxReporter Closing reporter
: [org.apache.solr.metrics.reporters.SolrJmxReporter@35e76d2e: rootName =
: null, domain = solr.core.core2, service url = null, agent id = null] for
: registry solr.core.core2 / com.codahale.metrics.MetricRegistry@76be90f4
: 2019-10-27 06:02:02.891 INFO  (coreCloseExecutor-140-thread-26) [
: x:core3]<0x00><0x00><0x00><0x00><0x00><0x00><0x00><0x00>...<0x00><0x00>
: o.a.s.m.SolrMetricManager Closing metric reporters for
: registry=solr.core.TUN000, tag=34f04984
: 2019-10-27 06:02:02.891 INFO  (coreCloseExecutor-140-thread-26) [
: x:TUN000] o.a.s.m.r.SolrJmxReporter Closing reporter
: [org.apache.solr.metrics.reporters.SolrJmxReporter@378cecb: rootName =
: null, domain = solr.core.TUN000, service url = null, agent id = null] for
: registry solr.core.TUN000 / com.codahale.metrics.MetricRegistry@9c3410c
: 2019-10-27 06:02:05.063 INFO  (Thread-1) [   ] o.e.j.s.h.ContextHandler
: Stopped o.e.j.w.WebAppContext@5fbe4146
: {/solr,null,UNAVAILABLE}{file:///E:/apatchSolr/RCSS-basic-4.0.1/LUSOLR/solr/server//solr-webapp/webapp}
: <0x00><0x00><0x00><0x00><0x00><0x00>...(printing <0x00> until the end of
: the file)..<0x00><0x00>
: 
: 
: Sincerely,
: Kaya Ota
: 

-Hoss
http://www.lucidworks.com/

Re: Printing NULL character in log files.

Posted by David Smiley <da...@gmail.com>.
Please don't email the dev list for this, just solr-user.  Thanks and good
luck.

~ David Smiley
Apache Lucene/Solr Search Developer
http://www.linkedin.com/in/davidwsmiley


On Mon, Nov 11, 2019 at 2:00 AM Kayak28 <ka...@gmail.com> wrote:

> Hello, Solr Community:
>
> I am using Solr7.4.0 which uses log4j (version 2.11 from Solr's Chanes.txt)
> as its component.
> Some of the log files that Solr generated contain <0x00> (null characters)
> in log files (like below)
>
> Because of this issue, it is difficult for me to trace what
> actually happened to the Solr.
>
> Does anyone have the same issue before?
> If anyone knows a way to fix this issue or a cause of this issue, could you
> please let me know?
>
> Any clue will be very appreciated.
>
>
> [Example Log 1]
>
> 2019-10-20 06:02:03.643 INFO  (coreCloseExecutor-140-thread-4) [
>  x:corename1] o.a.s.m.SolrMetricManager Closing metric reporters for
> registry=solr.core.corename,
> tag=4c16<0x00><0x00><0x00><0x00>.......<0x00><0x00>00ff
> 2019-10-20 06:02:03.643 INFO  (coreCloseExecutor-140-thread-4) [
>   x:corename1] o.a.s.m.r.SolrJmxReporter Closing reporter
> [org.apache.solr.metrics.reporters.SolrJmxReporter@17281659: rootName =
> null, domain = solr.core.corename, service url = null, agent id = null] for
> registry solr.core.corename1/
> com.codahale.metrics.MetricRegistry@6c9f45cc
> <0x00><0x00><0x00><0x00>......(continue
> printing <0x00> untill the end of file.)
>
> [Example Log 2]
>
> 2019-10-27 06:02:02.891 INFO  (coreCloseExecutor-140-thread-17) [
> x:core2] o.a.s.m.r.SolrJmxReporter Closing reporter
> [org.apache.solr.metrics.reporters.SolrJmxReporter@35e76d2e: rootName =
> null, domain = solr.core.core2, service url = null, agent id = null] for
> registry solr.core.core2 / com.codahale.metrics.MetricRegistry@76be90f4
> 2019-10-27 06:02:02.891 INFO  (coreCloseExecutor-140-thread-26) [
> x:core3]<0x00><0x00><0x00><0x00><0x00><0x00><0x00><0x00>...<0x00><0x00>
> o.a.s.m.SolrMetricManager Closing metric reporters for
> registry=solr.core.TUN000, tag=34f04984
> 2019-10-27 06:02:02.891 INFO  (coreCloseExecutor-140-thread-26) [
> x:TUN000] o.a.s.m.r.SolrJmxReporter Closing reporter
> [org.apache.solr.metrics.reporters.SolrJmxReporter@378cecb: rootName =
> null, domain = solr.core.TUN000, service url = null, agent id = null] for
> registry solr.core.TUN000 / com.codahale.metrics.MetricRegistry@9c3410c
> 2019-10-27 06:02:05.063 INFO  (Thread-1) [   ] o.e.j.s.h.ContextHandler
> Stopped o.e.j.w.WebAppContext@5fbe4146
>
> {/solr,null,UNAVAILABLE}{file:///E:/apatchSolr/RCSS-basic-4.0.1/LUSOLR/solr/server//solr-webapp/webapp}
> <0x00><0x00><0x00><0x00><0x00><0x00>...(printing <0x00> until the end of
> the file)..<0x00><0x00>
>
>
> Sincerely,
> Kaya Ota
>