dsmiley commented on PR #5358: URL: https://github.com/apache/solr/pull/5358#issuecomment-7057306154
🤖 Heads-up: this change appears to have broken the nightly [Solr-TestIntegration-main](https://ci-builds.apache.org/job/Solr/job/Solr-TestIntegration-main/) job (BATS). Builds [733](https://ci-builds.apache.org/job/Solr/job/Solr-TestIntegration-main/733/) and [734](https://ci-builds.apache.org/job/Solr/job/Solr-TestIntegration-main/734/) fail the same 3 tests on two different agents; [731](https://ci-builds.apache.org/job/Solr/job/Solr-TestIntegration-main/731/) (at 4890215acc8, just before this commit) passed. Build 732 never ran its tests because of an agent JAVA_HOME problem. Of the commits in that range, this is the only one that touches `bin/solr` start behavior. Until it's fixed, this may also hold up backports of this change and others, since the integration suite is red. **Failing tests** - `test_secure_example.bats:39`: secure example starts two HTTPS nodes with authentication and ZooKeeper ACLs - `test_ssl.bats:122`: use different hostname when not checking peer-name (`solr restart` failed) - `test_ssl.bats:360`: start solr with mTLS needed (`solr start -z localhost:${ZK_PORT} -p ${SOLR3_PORT}` failed) **Analysis** `start_solr` used to wait only until `lsof` saw the port listening. It now runs `status -p $SOLR_PORT_LISTEN --max-wait-secs $SOLR_START_WAIT`, which needs a successful request to `https://localhost:<port>/solr`. `waitForSolrUp` only treats 401/403 as "up". Any other error is retried until the timeout, and then `start` returns 1. - **test_ssl.bats:122 and :360**: both tests deliberately start a node that the CLI client can't talk to. - :122 sets `-Dsolr.jetty.ssl.sni.host.check.enabled=true`, so a request to `localhost` gets "Invalid SNI" (HTTP 400). - :360 sets `SOLR_SSL_CLIENT_HOSTNAME_VERIFICATION=true`. The test's own comment says "We can't check if the server has come up, because we can't connect to it". - In both cases the node does come up (the log shows cores loading), but `start` waits the full 180s and then fails. - **test_secure_example.bats:39** (less certain): step 5 restarts node1 with ZK digest ACLs, and that restart failed after about 2s instead of waiting out the 15s timeout. The `solr.log` tail that was printed comes from the previous process's shutdown. That suggests `status -p` exited right away rather than polling. The likely path is `processForPort()` returning empty ("Could not find a running Solr on port …"), maybe because the new JVM wasn't visible yet. The `runTool` port branch exits 1 at that point without honoring `--max-wait-secs`. The real message is hidden because `wait_for_solr_ready` prints `status_output` only with `--verbose`. **Possible fixes** 1. In `waitForSolrUp`, treat any HTTP response from the server (e.g. Jetty's 400 for the SNI case) as "up", as 401/403 already are. A TLS rejection could arguably count too. The alternative is to change the two SSL tests to tolerate a failing `start` (`run solr start` …). 2. With `--max-wait-secs`, make `status -p` keep polling for the process instead of exiting right away when none is found yet. 3. Print `status_output` on failure regardless of `--verbose`, so CI logs show the cause. 4. The CATS ports merged in #5323 (`SslTest`, `SecureExampleTest`) probably have the same expectations. **Testing:** run the BATS tests locally with `./gradlew iTest --tests test_ssl.bats` and `./gradlew iTest --tests test_secure_example.bats`, or run the CATS equivalents with `./gradlew -p solr/packaging catsTests --tests "*SslTest"`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
