[ 
https://issues.apache.org/jira/browse/SOLR-12776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16625183#comment-16625183
 ] 

Erick Erickson edited comment on SOLR-12776 at 9/23/18 5:24 PM:
----------------------------------------------------------------

Very slightly modified, uses TMP_SOLR_HOME rather than TMP1. I'll probably 
check this in later today

One thing I'm unsure about given my unfamiliarity with Windows scripting, This 
assignment (This wasn't changed by the patch BTW, it just looks odd)

{{set TMP_SOLR_HOME=!SOLR_HOME:%EXAMPLE_DIR%=!}}

What's the meaning of the equals sign after the last percent sign? the {{%=!}} 
at the end?

Petr: 

For future reference, the convention is just to label the patch with the Jira 
number and a ".patch" extension. If multiple copies are uploaded with the same 
name, they're all kept and the newest one is in blue with the rest gray. No big 
deal, just FYI.


was (Author: erickerickson):
Very slightly modified, uses TMP_SOLR_HOME rather than TMP1. I'll probably 
check this in later today

One thing I'm unsure about given my unfamiliarity with Windows scripting, This 
assignment (This wasn't changed by the patch BTW, it just looks odd)

set TMP_SOLR_HOME=!SOLR_HOME:%EXAMPLE_DIR%=!

What's the meaning of the equals sign after the last percent sign? the {{%=!}} 
at the end?

Petr: 

For future reference, the convention is just to label the patch with the Jira 
number and a ".patch" extension. If multiple copies are uploaded with the same 
name, they're all kept and the newest one is in blue with the rest gray. No big 
deal, just FYI.

> Setting of TMP in solr.cmd causes invisibility of Solr to JDK tools
> -------------------------------------------------------------------
>
>                 Key: SOLR-12776
>                 URL: https://issues.apache.org/jira/browse/SOLR-12776
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: scripts and tools
>    Affects Versions: 5.0
>         Environment: Windows. Tested with Java 8u152 and Solr 6.3.0.
>            Reporter: Petr Bodnar
>            Assignee: Erick Erickson
>            Priority: Major
>         Attachments: SOLR-12776.patch, simple-rename-fix.patch
>
>
> (issue firstly discussed in here: 
> http://mail-archives.apache.org/mod_mbox/lucene-solr-user/201809.mbox/%3c20180916154315.0922a...@centrum.cz%3E)
> 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 (v5.0):
> {code:java}
> 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"
> ){code}
> 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, jps and others won't locally see the given Java application, 
> because they search in a different default location.
> h3. Proposed solution
> A working solution seems to be just to *rename the TMP variable* to for 
> example TMP1 as in the attached [^simple-rename-fix.patch]. Maybe even a 
> simple "==" comparison of SOLR_HOME and EXAMPLE_DIR could (should?) be made, 
> but I don't have enough time to study and test this scenario.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to