lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <p.bod...@centrum.cz>
Subject Setting of TMP in solr.cmd (for Windows) causes invisibility of the Solr to JDK monitoring tools
Date Sun, 02 Sep 2018 20:47:42 GMT
Hi,

please notice the following lines added (among others) to "solr.cmd" by commit https://github.com/apache/lucene-solr/commit/b36c68b16e67ae701cefce052a4fdbaac88fb65c
for https://issues.apache.org/jira/browse/SOLR-6833 about 4 years ago:

  set TMP=!SOLR_HOME:%EXAMPLE_DIR%=!
  IF NOT "%TMP%"=="%SOLR_HOME%" (
    set "SOLR_LOGS_DIR=%SOLR_HOME%\..\logs"
    set "LOG4J_CONFIG=file:%EXAMPLE_DIR%\resources\log4j.properties"
  )

Apparently, the new variable "TMP" is just a temporary one, but by coincidence, this variable
is also important for JVM! As this system variable tells where the "hsperfdata_<username>"
directory for storing applications' monitoring data should be located. And if this is changed,
JDK tools like JVisualVM and others won't locally see the given Java application, because
they search in a different default location. Tested with Java 8u152 and Solr 6.3.0.

So Solr authors, could you please rename that "TMP" variable to something else, or maybe remove
it completely (not sure about the latter alternative)? Hopefully it is as easy as described
above and I haven't overlooked some special meaning of that problematic lines...

Best regards

Petr B.

Mime
View raw message