You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Jan Høydahl (Jira)" <ji...@apache.org> on 2022/09/11 19:10:00 UTC

[jira] [Commented] (SOLR-16406) Module loading does not work when using SOLR_MODULES in solr.in.sh

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

Jan Høydahl commented on SOLR-16406:
------------------------------------

I reproduced it locally. Since Solr reads this env var directly in Java code, it needs to be exported from the shell for the var to be visible in the Java process. But bin/solr script sources solr.in.sh, which is not an export.

Simplest solution is to modify the example commented line in solr.in.sh to use {*}export{*}. Tested it and that works. Perhaps that is a good enough solution. Else, we'd need to modify bin/solr to explicitly pass SOLR_MODULES as -Dsolr.modules as we do with the other vars.

> Module loading does not work when using SOLR_MODULES in solr.in.sh
> ------------------------------------------------------------------
>
>                 Key: SOLR-16406
>                 URL: https://issues.apache.org/jira/browse/SOLR-16406
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: scripts and tools, Server
>    Affects Versions: 9.0
>            Reporter: Thomas Wöckinger
>            Priority: Major
>
> As documented there are several ways to enable Solr modules.
> When using -Dsolr.modules=analysis-extras all works as expected and the start up produces following log:
> {code:java}
> 2022-09-09T12:31:41.911492838Z 2022-09-09 12:31:41.910 INFO  (main) [] o.a.s.c.SolrResourceLoader Added 12 libs to classloader, from paths: [/opt/solr/modules/analysis-extras/lib]
> 2022-09-09T12:31:41.911590590Z 2022-09-09 12:31:41.911 INFO  (main) [] o.a.s.c.NodeConfig Added module analysis-extras. libPath=/opt/solr/modules/analysis-extras/lib with 12 libs {code}
> But when using SOLR_MODULES=analysis-extras in solr.in.sh the module is not loaded.
> Additionally i checked the `solr` (under /opt/bin/solr) script itself and /opt/solr/bin/solr.in.sh is included
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org