[jira] [Commented] (SOLR-17746) bin/solr always fails if you attempt to use --jettyconfig (aka "-j")
[
https://issues.apache.org/jira/browse/SOLR-17746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17986930#comment-17986930
]
ASF subversion and git services commented on SOLR-17746:
Commit 47e74382d3189c98085ce122700f8ca1295cb00d in solr's branch
refs/heads/fix-native-access-warning from Eric Pugh
[ https://gitbox.apache.org/repos/asf?p=solr.git;h=47e74382d31 ]
SOLR-17746: Provide long form --jettyconfig option to go with -j (#3332)
> bin/solr always fails if you attempt to use --jettyconfig (aka "-j")
>
>
> Key: SOLR-17746
> URL: https://issues.apache.org/jira/browse/SOLR-17746
> Project: Solr
> Issue Type: Bug
>Reporter: Chris M. Hostetter
>Assignee: Eric Pugh
>Priority: Major
> Labels: pull-request-available
> Fix For: 9.9
>
> Time Spent: 1h 20m
> Remaining Estimate: 0h
>
> The "-jettyconfig" optiona (aka "-j") is documented as...
> {noformat}
> -j Additional parameters to pass to Jetty when starting
> Solr.
> For example, to add configuration folder that jetty
> should read
> you could pass: -j
> "--include-jetty-dir=/etc/jetty/custom/server/"
> In most cases, you should wrap the additional
> parameters in double quotes.
> {noformat}
> ..but if you actually attempt to run use that example option, you will get
> an error...
> {noformat}
> ./bin/solr start ... -j "--include-jetty-dir=/etc/jetty/custom/server/"
> ERROR: Jetty config is required when using the -j option!
> {noformat}
> IIUC this is because the bash code for parsing this option requires that it
> not start with a "{{\-}}" character; but by definition any option you want to
> pass to jetty will start with "{{\--}}".
> Attempting to workaround this problem by using two sets of quotes doesn't
> seem to work -- the inner quotes are passed verbatim to jetty which seems to
> prevent jetty from recognizing it as a valid option.
> A workaround that *does* seem to work (in my limited testing) is to include a
> leading space character _inside_ the quotes...
> {noformat}
> ./bin/solr start ... -j " --include-jetty-dir=/etc/jetty/custom/server/"
> {noformat}
> ...because for some reason that does *NOT* seem to be passed verbatim.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
[jira] [Commented] (SOLR-17746) bin/solr always fails if you attempt to use --jettyconfig (aka "-j")
[
https://issues.apache.org/jira/browse/SOLR-17746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17986247#comment-17986247
]
ASF subversion and git services commented on SOLR-17746:
Commit 332ac1816ebba1c72977dfd8bee3a356f0b58b83 in solr's branch
refs/heads/branch_9x from Eric Pugh
[ https://gitbox.apache.org/repos/asf?p=solr.git;h=332ac1816eb ]
SOLR-17746: Provide long form --jettyconfig option to go with -j (#3332)
(cherry picked from commit 47e74382d3189c98085ce122700f8ca1295cb00d)
> bin/solr always fails if you attempt to use --jettyconfig (aka "-j")
>
>
> Key: SOLR-17746
> URL: https://issues.apache.org/jira/browse/SOLR-17746
> Project: Solr
> Issue Type: Bug
>Reporter: Chris M. Hostetter
>Assignee: Eric Pugh
>Priority: Major
> Labels: pull-request-available
> Fix For: 9.9
>
> Time Spent: 1h 20m
> Remaining Estimate: 0h
>
> The "-jettyconfig" optiona (aka "-j") is documented as...
> {noformat}
> -j Additional parameters to pass to Jetty when starting
> Solr.
> For example, to add configuration folder that jetty
> should read
> you could pass: -j
> "--include-jetty-dir=/etc/jetty/custom/server/"
> In most cases, you should wrap the additional
> parameters in double quotes.
> {noformat}
> ..but if you actually attempt to run use that example option, you will get
> an error...
> {noformat}
> ./bin/solr start ... -j "--include-jetty-dir=/etc/jetty/custom/server/"
> ERROR: Jetty config is required when using the -j option!
> {noformat}
> IIUC this is because the bash code for parsing this option requires that it
> not start with a "{{\-}}" character; but by definition any option you want to
> pass to jetty will start with "{{\--}}".
> Attempting to workaround this problem by using two sets of quotes doesn't
> seem to work -- the inner quotes are passed verbatim to jetty which seems to
> prevent jetty from recognizing it as a valid option.
> A workaround that *does* seem to work (in my limited testing) is to include a
> leading space character _inside_ the quotes...
> {noformat}
> ./bin/solr start ... -j " --include-jetty-dir=/etc/jetty/custom/server/"
> {noformat}
> ...because for some reason that does *NOT* seem to be passed verbatim.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
[jira] [Commented] (SOLR-17746) bin/solr always fails if you attempt to use --jettyconfig (aka "-j")
[
https://issues.apache.org/jira/browse/SOLR-17746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17986233#comment-17986233
]
ASF subversion and git services commented on SOLR-17746:
Commit 47e74382d3189c98085ce122700f8ca1295cb00d in solr's branch
refs/heads/main from Eric Pugh
[ https://gitbox.apache.org/repos/asf?p=solr.git;h=47e74382d31 ]
SOLR-17746: Provide long form --jettyconfig option to go with -j (#3332)
> bin/solr always fails if you attempt to use --jettyconfig (aka "-j")
>
>
> Key: SOLR-17746
> URL: https://issues.apache.org/jira/browse/SOLR-17746
> Project: Solr
> Issue Type: Bug
>Reporter: Chris M. Hostetter
>Priority: Major
> Labels: pull-request-available
> Time Spent: 1h 20m
> Remaining Estimate: 0h
>
> The "-jettyconfig" optiona (aka "-j") is documented as...
> {noformat}
> -j Additional parameters to pass to Jetty when starting
> Solr.
> For example, to add configuration folder that jetty
> should read
> you could pass: -j
> "--include-jetty-dir=/etc/jetty/custom/server/"
> In most cases, you should wrap the additional
> parameters in double quotes.
> {noformat}
> ..but if you actually attempt to run use that example option, you will get
> an error...
> {noformat}
> ./bin/solr start ... -j "--include-jetty-dir=/etc/jetty/custom/server/"
> ERROR: Jetty config is required when using the -j option!
> {noformat}
> IIUC this is because the bash code for parsing this option requires that it
> not start with a "{{\-}}" character; but by definition any option you want to
> pass to jetty will start with "{{\--}}".
> Attempting to workaround this problem by using two sets of quotes doesn't
> seem to work -- the inner quotes are passed verbatim to jetty which seems to
> prevent jetty from recognizing it as a valid option.
> A workaround that *does* seem to work (in my limited testing) is to include a
> leading space character _inside_ the quotes...
> {noformat}
> ./bin/solr start ... -j " --include-jetty-dir=/etc/jetty/custom/server/"
> {noformat}
> ...because for some reason that does *NOT* seem to be passed verbatim.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
[jira] [Commented] (SOLR-17746) bin/solr always fails if you attempt to use --jettyconfig (aka "-j")
[
https://issues.apache.org/jira/browse/SOLR-17746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17986145#comment-17986145
]
Rahul Goswami commented on SOLR-17746:
--
[~hossman] FWIW passing multiple space separated args in --jvm-opts as shown
below does work on Windows post the fix in
https://issues.apache.org/jira/browse/SOLR-7962
--jvm-opts "
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:18983
-Dsolr.myprops.custom=hello"
I remember it not working on Linux since the parsing in SolrCLI is different,
but might need to check again.
> bin/solr always fails if you attempt to use --jettyconfig (aka "-j")
>
>
> Key: SOLR-17746
> URL: https://issues.apache.org/jira/browse/SOLR-17746
> Project: Solr
> Issue Type: Bug
>Reporter: Chris M. Hostetter
>Priority: Major
> Labels: pull-request-available
> Time Spent: 40m
> Remaining Estimate: 0h
>
> The "-jettyconfig" optiona (aka "-j") is documented as...
> {noformat}
> -j Additional parameters to pass to Jetty when starting
> Solr.
> For example, to add configuration folder that jetty
> should read
> you could pass: -j
> "--include-jetty-dir=/etc/jetty/custom/server/"
> In most cases, you should wrap the additional
> parameters in double quotes.
> {noformat}
> ..but if you actually attempt to run use that example option, you will get
> an error...
> {noformat}
> ./bin/solr start ... -j "--include-jetty-dir=/etc/jetty/custom/server/"
> ERROR: Jetty config is required when using the -j option!
> {noformat}
> IIUC this is because the bash code for parsing this option requires that it
> not start with a "{{\-}}" character; but by definition any option you want to
> pass to jetty will start with "{{\--}}".
> Attempting to workaround this problem by using two sets of quotes doesn't
> seem to work -- the inner quotes are passed verbatim to jetty which seems to
> prevent jetty from recognizing it as a valid option.
> A workaround that *does* seem to work (in my limited testing) is to include a
> leading space character _inside_ the quotes...
> {noformat}
> ./bin/solr start ... -j " --include-jetty-dir=/etc/jetty/custom/server/"
> {noformat}
> ...because for some reason that does *NOT* seem to be passed verbatim.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
[jira] [Commented] (SOLR-17746) bin/solr always fails if you attempt to use --jettyconfig (aka "-j")
[
https://issues.apache.org/jira/browse/SOLR-17746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17946176#comment-17946176
]
Chris M. Hostetter commented on SOLR-17746:
---
{quote}... and basically it ensures that you don't forget to provide a value
for the option ...
{quote}
Strictly speaking it checks if the value of the first character is "-"
It makes sense for things like {{--port}} but it definitely doesn't make sense
for {{\--jettyconfig}} or {{\--jvm-opts}}
bq. I am putting up a PR that first cleans some docs up about --jettyconfig,
and then adds a test. Can you look at it?
Seems fine ... except the absolute path in your test might actually exist :)
... maybe better to use something like {{./BOGUS}}
FWIW: Since you can't specify {{\--jettyconfig}} or {{\--jvm-opts}} more then
once on the command line (w/o them overwriting eachother) we should probably
also be be testing that you can pass a quoted sting containing multiple "real"
options and they get parsed correctly...
{noformat}
./bin/solr ... -j "--module=foobar --include-jetty-dir=/weird"
{noformat}
(but maybe that should be it's own jira?)
> bin/solr always fails if you attempt to use --jettyconfig (aka "-j")
>
>
> Key: SOLR-17746
> URL: https://issues.apache.org/jira/browse/SOLR-17746
> Project: Solr
> Issue Type: Bug
>Reporter: Chris M. Hostetter
>Priority: Major
> Labels: pull-request-available
> Time Spent: 10m
> Remaining Estimate: 0h
>
> The "-jettyconfig" optiona (aka "-j") is documented as...
> {noformat}
> -j Additional parameters to pass to Jetty when starting
> Solr.
> For example, to add configuration folder that jetty
> should read
> you could pass: -j
> "--include-jetty-dir=/etc/jetty/custom/server/"
> In most cases, you should wrap the additional
> parameters in double quotes.
> {noformat}
> ..but if you actually attempt to run use that example option, you will get
> an error...
> {noformat}
> ./bin/solr start ... -j "--include-jetty-dir=/etc/jetty/custom/server/"
> ERROR: Jetty config is required when using the -j option!
> {noformat}
> IIUC this is because the bash code for parsing this option requires that it
> not start with a "{{\-}}" character; but by definition any option you want to
> pass to jetty will start with "{{\--}}".
> Attempting to workaround this problem by using two sets of quotes doesn't
> seem to work -- the inner quotes are passed verbatim to jetty which seems to
> prevent jetty from recognizing it as a valid option.
> A workaround that *does* seem to work (in my limited testing) is to include a
> leading space character _inside_ the quotes...
> {noformat}
> ./bin/solr start ... -j " --include-jetty-dir=/etc/jetty/custom/server/"
> {noformat}
> ...because for some reason that does *NOT* seem to be passed verbatim.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
[jira] [Commented] (SOLR-17746) bin/solr always fails if you attempt to use --jettyconfig (aka "-j")
[
https://issues.apache.org/jira/browse/SOLR-17746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17945857#comment-17945857
]
Eric Pugh commented on SOLR-17746:
--
Did some digging... I am putting up a PR that first cleans some docs up about
--jettyconfig, and then adds a test. Can you look at it?
I asked GPT about what the "${2:0:1}" == "-" ] is about, and basically it
ensures that you don't forget to provide a value for the option, like in this
example for port: --port --jettyconfig blah.
However, there is no real pattern for that check and I can see that removing it
globaly might make sense?
> bin/solr always fails if you attempt to use --jettyconfig (aka "-j")
>
>
> Key: SOLR-17746
> URL: https://issues.apache.org/jira/browse/SOLR-17746
> Project: Solr
> Issue Type: Bug
>Reporter: Chris M. Hostetter
>Priority: Major
>
> The "-jettyconfig" optiona (aka "-j") is documented as...
> {noformat}
> -j Additional parameters to pass to Jetty when starting
> Solr.
> For example, to add configuration folder that jetty
> should read
> you could pass: -j
> "--include-jetty-dir=/etc/jetty/custom/server/"
> In most cases, you should wrap the additional
> parameters in double quotes.
> {noformat}
> ..but if you actually attempt to run use that example option, you will get
> an error...
> {noformat}
> ./bin/solr start ... -j "--include-jetty-dir=/etc/jetty/custom/server/"
> ERROR: Jetty config is required when using the -j option!
> {noformat}
> IIUC this is because the bash code for parsing this option requires that it
> not start with a "{{\-}}" character; but by definition any option you want to
> pass to jetty will start with "{{\--}}".
> Attempting to workaround this problem by using two sets of quotes doesn't
> seem to work -- the inner quotes are passed verbatim to jetty which seems to
> prevent jetty from recognizing it as a valid option.
> A workaround that *does* seem to work (in my limited testing) is to include a
> leading space character _inside_ the quotes...
> {noformat}
> ./bin/solr start ... -j " --include-jetty-dir=/etc/jetty/custom/server/"
> {noformat}
> ...because for some reason that does *NOT* seem to be passed verbatim.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
[jira] [Commented] (SOLR-17746) bin/solr always fails if you attempt to use --jettyconfig (aka "-j")
[
https://issues.apache.org/jira/browse/SOLR-17746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17945520#comment-17945520
]
Chris M. Hostetter commented on SOLR-17746:
---
I think this bug was introduced by the changes in SOLR-6962.
[~epugh] - can you please take a look? I'm not sure I understand why
34f77886104a15f9e478cf7b4a5f6b0691d79eb7 added this simple check for
{{--jvm-options}} ...
{noformat}
+if [[ -z "$2" ]]; then
+ print_usage "$SCRIPT_CMD" "JVM options are required when using
the $1 option!"
{noformat}
but this more restrictive check for {{--jettyconfig}} ...
{noformat}
+if [[ -z "$2" || "${2:0:1}" == "-" ]]; then
+ print_usage "$SCRIPT_CMD" "Jetty config is required when using
the $1 option!"
{noformat}
> bin/solr always fails if you attempt to use --jettyconfig (aka "-j")
>
>
> Key: SOLR-17746
> URL: https://issues.apache.org/jira/browse/SOLR-17746
> Project: Solr
> Issue Type: Bug
>Reporter: Chris M. Hostetter
>Priority: Major
>
> The "-jettyconfig" optiona (aka "-j") is documented as...
> {noformat}
> -j Additional parameters to pass to Jetty when starting
> Solr.
> For example, to add configuration folder that jetty
> should read
> you could pass: -j
> "--include-jetty-dir=/etc/jetty/custom/server/"
> In most cases, you should wrap the additional
> parameters in double quotes.
> {noformat}
> ..but if you actually attempt to run use that example option, you will get
> an error...
> {noformat}
> ./bin/solr start ... -j "--include-jetty-dir=/etc/jetty/custom/server/"
> ERROR: Jetty config is required when using the -j option!
> {noformat}
> IIUC this is because the bash code for parsing this option requires that it
> not start with a "{{\-}}" character; but by definition any option you want to
> pass to jetty will start with "{{\--}}".
> Attempting to workaround this problem by using two sets of quotes doesn't
> seem to work -- the inner quotes are passed verbatim to jetty which seems to
> prevent jetty from recognizing it as a valid option.
> A workaround that *does* seem to work (in my limited testing) is to include a
> leading space character _inside_ the quotes...
> {noformat}
> ./bin/solr start ... -j " --include-jetty-dir=/etc/jetty/custom/server/"
> {noformat}
> ...because for some reason that does *NOT* seem to be passed verbatim.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
