Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOLR-16876: Remove extra /solr from calls that generates extra WARNING in logs #1833

Merged
merged 8 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion solr/bin/solr
Original file line number Diff line number Diff line change
Expand Up @@ -1165,7 +1165,7 @@ if [[ "$SCRIPT_CMD" == "auth" ]]; then
fi
done
fi
run_tool auth "${AUTH_PARAMS[@]}" -solrUrl "$SOLR_URL_SCHEME://$SOLR_TOOL_HOST:${AUTH_PORT:-8983}/solr" -authConfDir "$SOLR_HOME" $VERBOSE
run_tool auth "${AUTH_PARAMS[@]}" -solrUrl "$SOLR_URL_SCHEME://$SOLR_TOOL_HOST:${AUTH_PORT:-8983}" -authConfDir "$SOLR_HOME" $VERBOSE
exit $?
fi

Expand Down
2 changes: 1 addition & 1 deletion solr/bin/solr.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -1640,7 +1640,7 @@ if "!AUTH_PORT!"=="" (
-Dlog4j.configurationFile="file:///%DEFAULT_SERVER_DIR%\resources\log4j2-console.xml" ^
-classpath "%DEFAULT_SERVER_DIR%\solr-webapp\webapp\WEB-INF\lib\*;%DEFAULT_SERVER_DIR%\lib\ext\*" ^
org.apache.solr.cli.SolrCLI auth %AUTH_PARAMS% -solrIncludeFile "%SOLR_INCLUDE%" -authConfDir "%SOLR_HOME%" ^
-solrUrl !SOLR_URL_SCHEME!://%SOLR_TOOL_HOST%:!AUTH_PORT!/solr
-solrUrl !SOLR_URL_SCHEME!://%SOLR_TOOL_HOST%:!AUTH_PORT!
goto done


Expand Down
14 changes: 14 additions & 0 deletions solr/packaging/test/test_auth.bats
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,17 @@ setup() {
run ! solr auth enable -type basicAuth -credentials any:any -updateIncludeFileOnly ture
assert_output --partial "Argument [updateIncludeFileOnly] must be either true or false, but was [ture]"
}

@test "auth enable/disable lifecycle" {
solr start -c
solr auth enable -type basicAuth -credentials name:password
solr assert --started http://localhost:${SOLR_PORT}/solr --timeout 5000

run curl -u name:password --basic "http://localhost:${SOLR_PORT}/solr/admin/collections?action=CREATE&collection.configName=_default&name=test&numShards=2&replicationFactor=1&router.name=compositeId&wt=json"
assert_output --partial '"status":0'

solr auth disable
run curl "http://localhost:${SOLR_PORT}/solr/test/select?q=*:*"
assert_output --partial '"numFound":0'
solr stop -all
}
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ For example, if Solr is running on port 8983, then the embedded ZooKeeper will l
[IMPORTANT]
====
If your ZooKeeper connection string uses a chroot, such as `localhost:2181/solr`, then you need to create the /solr znode before launching SolrCloud using the `bin/solr` script.
+

To do this use the `mkroot` command outlined below, for example: `bin/solr zk mkroot /solr -z 192.168.1.4:2181`
====

Expand Down
Loading