Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-10-26 Thread via GitHub
malliaridis commented on PR #2712: URL: https://github.com/apache/solr/pull/2712#issuecomment-2439671998 @janhoy Since this PR got merged I have multiple tests that fail on Windows with `access denied ("java.io.FilePermission" "<>" "execute")`. I'd like to see the security manager bei

Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-10-20 Thread via GitHub
janhoy merged PR #2712: URL: https://github.com/apache/solr/pull/2712 -- 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: issues-unsubscr...@solr.apache.org

Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-10-18 Thread via GitHub
janhoy commented on PR #2712: URL: https://github.com/apache/solr/pull/2712#issuecomment-240749 Note that until now, the only supported syntax has been `bin/solr status` for user-facing, and `bin/solr status --solr-url --max-wait-secs ` for scripts. So that's the only we need to worry

Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-10-18 Thread via GitHub
janhoy commented on PR #2712: URL: https://github.com/apache/solr/pull/2712#issuecomment-2422212816 Did another pass at cleaning up some convoluted code, and remove some duplicate printout. Here I have copied the command response from some local tests. Will probably commit soon if you think

Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-10-17 Thread via GitHub
epugh commented on PR #2712: URL: https://github.com/apache/solr/pull/2712#issuecomment-2420106926 I love how instead of making StatusTool help output more complex, you added the "stealth" idea that honestly we may use in other places! -- This is an automated message from the Apache Git S

Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-10-17 Thread via GitHub
janhoy commented on code in PR #2712: URL: https://github.com/apache/solr/pull/2712#discussion_r1805152713 ## solr/core/src/java/org/apache/solr/cli/StatusTool.java: ## @@ -65,72 +73,224 @@ public String getName() { .desc("Wait up to the specified number of seconds to

Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-10-17 Thread via GitHub
janhoy commented on code in PR #2712: URL: https://github.com/apache/solr/pull/2712#discussion_r1805048091 ## solr/core/src/java/org/apache/solr/cli/StatusTool.java: ## @@ -65,72 +73,224 @@ public String getName() { .desc("Wait up to the specified number of seconds to

Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-10-17 Thread via GitHub
epugh commented on code in PR #2712: URL: https://github.com/apache/solr/pull/2712#discussion_r1804628762 ## solr/core/src/java/org/apache/solr/cli/StatusTool.java: ## @@ -65,72 +73,224 @@ public String getName() { .desc("Wait up to the specified number of seconds to

Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-10-17 Thread via GitHub
janhoy commented on code in PR #2712: URL: https://github.com/apache/solr/pull/2712#discussion_r1804262865 ## solr/core/src/java/org/apache/solr/cli/StatusTool.java: ## @@ -65,72 +73,224 @@ public String getName() { .desc("Wait up to the specified number of seconds to

Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-10-16 Thread via GitHub
epugh commented on code in PR #2712: URL: https://github.com/apache/solr/pull/2712#discussion_r1804003579 ## solr/core/src/java/org/apache/solr/cli/StatusTool.java: ## @@ -65,72 +73,224 @@ public String getName() { .desc("Wait up to the specified number of seconds to

Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-10-16 Thread via GitHub
janhoy commented on code in PR #2712: URL: https://github.com/apache/solr/pull/2712#discussion_r1803440828 ## solr/core/src/java/org/apache/solr/cli/StatusTool.java: ## @@ -65,72 +73,224 @@ public String getName() { .desc("Wait up to the specified number of seconds to

Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-10-16 Thread via GitHub
janhoy commented on PR #2712: URL: https://github.com/apache/solr/pull/2712#issuecomment-2417306791 Did more testing. The output when starting Solr on Win was broken and printed the json status text on Win, while on Linux it still printed `Started Solr server on port (pid=6838). Happy

Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-10-16 Thread via GitHub
janhoy commented on code in PR #2712: URL: https://github.com/apache/solr/pull/2712#discussion_r1803391559 ## gradle/testing/randomization/policies/solr-tests.policy: ## @@ -109,6 +109,8 @@ grant { permission java.lang.RuntimePermission "writeFileDescriptor"; // needed by

Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-10-16 Thread via GitHub
janhoy commented on code in PR #2712: URL: https://github.com/apache/solr/pull/2712#discussion_r1803388476 ## solr/server/etc/security.policy: ## @@ -228,4 +228,7 @@ grant { // expanded to a wildcard if set, allows all networking everywhere permission java.net.SocketPerm

Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-10-16 Thread via GitHub
epugh commented on code in PR #2712: URL: https://github.com/apache/solr/pull/2712#discussion_r1802975213 ## gradle/testing/randomization/policies/solr-tests.policy: ## @@ -109,6 +109,8 @@ grant { permission java.lang.RuntimePermission "writeFileDescriptor"; // needed by h

Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-10-16 Thread via GitHub
janhoy commented on code in PR #2712: URL: https://github.com/apache/solr/pull/2712#discussion_r1802537974 ## gradle/testing/randomization/policies/solr-tests.policy: ## @@ -109,6 +109,8 @@ grant { permission java.lang.RuntimePermission "writeFileDescriptor"; // needed by

Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-10-15 Thread via GitHub
epugh commented on code in PR #2712: URL: https://github.com/apache/solr/pull/2712#discussion_r1802217471 ## gradle/testing/randomization/policies/solr-tests.policy: ## @@ -109,6 +109,8 @@ grant { permission java.lang.RuntimePermission "writeFileDescriptor"; // needed by h

Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-10-15 Thread via GitHub
janhoy commented on code in PR #2712: URL: https://github.com/apache/solr/pull/2712#discussion_r1802073770 ## gradle/testing/randomization/policies/solr-tests.policy: ## @@ -109,6 +109,8 @@ grant { permission java.lang.RuntimePermission "writeFileDescriptor"; // needed by

Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-10-15 Thread via GitHub
janhoy commented on code in PR #2712: URL: https://github.com/apache/solr/pull/2712#discussion_r1802071570 ## solr/server/etc/security.policy: ## @@ -228,4 +228,7 @@ grant { // expanded to a wildcard if set, allows all networking everywhere permission java.net.SocketPerm

Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-10-15 Thread via GitHub
janhoy commented on code in PR #2712: URL: https://github.com/apache/solr/pull/2712#discussion_r1801992048 ## gradle/testing/randomization/policies/solr-tests.policy: ## @@ -250,6 +252,8 @@ grant { // expanded to a wildcard if set, allows all networking everywhere permis

Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-10-15 Thread via GitHub
janhoy commented on code in PR #2712: URL: https://github.com/apache/solr/pull/2712#discussion_r1801990185 ## solr/core/src/java/org/apache/solr/cli/StatusTool.java: ## @@ -65,37 +75,132 @@ public String getName() { .desc("Wait up to the specified number of seconds to

Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-10-14 Thread via GitHub
malliaridis commented on code in PR #2712: URL: https://github.com/apache/solr/pull/2712#discussion_r1799446120 ## solr/packaging/test/test_status.bats: ## @@ -37,18 +37,27 @@ teardown() { solr stop run solr status assert_output --partial "No Solr nodes are running." +}

Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-10-14 Thread via GitHub
malliaridis commented on code in PR #2712: URL: https://github.com/apache/solr/pull/2712#discussion_r1799446120 ## solr/packaging/test/test_status.bats: ## @@ -37,18 +37,27 @@ teardown() { solr stop run solr status assert_output --partial "No Solr nodes are running." +}

Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-10-13 Thread via GitHub
janhoy commented on PR #2712: URL: https://github.com/apache/solr/pull/2712#issuecomment-2409297675 Pushed some commits * Fixes `BasicAuthIntegrationTest` by allowing status test to check status by URL even if Solr is not an OS process * Workaround for Windows. Tested on Windows 11 in

Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-10-11 Thread via GitHub
malliaridis commented on PR #2712: URL: https://github.com/apache/solr/pull/2712#issuecomment-2407109386 If this is the only use-case I would avoid adding an entire library and prefer the workaround. I had to make three changes though to make it work: - Define `isWindows` in `getComma

Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-10-10 Thread via GitHub
janhoy commented on PR #2712: URL: https://github.com/apache/solr/pull/2712#issuecomment-2406243063 > After some lookup, I found through [StackOverflow](https://stackoverflow.com/a/46768046/3329810) this: What a pity. Guess we can then either bring in https://github.com/oshi/oshi whi

Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-10-10 Thread via GitHub
malliaridis commented on PR #2712: URL: https://github.com/apache/solr/pull/2712#issuecomment-2405924311 After some lookup, I found this through [StackOverflow](https://stackoverflow.com/a/46768046/3329810) this: > The command line arguments are not available via a non-privileged API

Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-10-10 Thread via GitHub
malliaridis commented on PR #2712: URL: https://github.com/apache/solr/pull/2712#issuecomment-2405890817 It seems that `p.info().commandLine()` is always empty and falls back to the empty string, filtering out all the java processes. This means that `-Djetty.port=` is not maintained and onl

Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-10-10 Thread via GitHub
janhoy commented on PR #2712: URL: https://github.com/apache/solr/pull/2712#issuecomment-2404849888 Thanks for contributing Windows hardening. Could be the PID-file pattern at https://github.com/apache/solr/pull/2712/files#diff-1c8756285d3b596e65a2d20534ac75173349c4b117db59711e9121c05d0012ff

Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-10-09 Thread via GitHub
rahulgoswami commented on PR #2712: URL: https://github.com/apache/solr/pull/2712#issuecomment-2404160626 Can confirm @malliaridis's observation on Windows. solr status responds with a "No solr nodes are running". Trying to debug this to see why processMgr.getAllRunning() in StatusToo

Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-10-09 Thread via GitHub
malliaridis commented on PR #2712: URL: https://github.com/apache/solr/pull/2712#issuecomment-2403939847 I've tried to run this on Windows 11, but I don't get a correct output. This is what I did: ```console [PATH_TO_PROJECT]\solr\packaging\build\dev>bin\solr.cmd start Ja

Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-10-09 Thread via GitHub
janhoy commented on PR #2712: URL: https://github.com/apache/solr/pull/2712#issuecomment-2402627619 > @janhoy would this Java code approach also be useful in the AuthTool? It checks that you are running `bin/solr auth` on a server with a local Solr running in order to get the port number...

Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-10-09 Thread via GitHub
epugh commented on PR #2712: URL: https://github.com/apache/solr/pull/2712#issuecomment-2402237547 @janhoy would this Java code approach also be useful in the AuthTool? It checks that you are running `bin/solr auth` on a server with a local Solr running in order to get the port number...

Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-10-09 Thread via GitHub
epugh commented on PR #2712: URL: https://github.com/apache/solr/pull/2712#issuecomment-2402229967 @Willdotwhite I think we are looking for confidence that moving to the Java code for system information works well in both windows and linux. I often look at the .bats test and repeat those s

Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-10-09 Thread via GitHub
Willdotwhite commented on PR #2712: URL: https://github.com/apache/solr/pull/2712#issuecomment-2401917554 Ahhh, this completely slipped my mind, apologies team - new baby brain and all that! I'll get on testing this after work today, are there any particular areas of the status checks you w

Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-09-18 Thread via GitHub
janhoy commented on PR #2712: URL: https://github.com/apache/solr/pull/2712#issuecomment-2359604116 Feel free to jump in and commit to this PR if you have ideas. I'll eventually come around to it and can do a pull... -- This is an automated message from the Apache Git Service. To respond

Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-09-18 Thread via GitHub
epugh commented on PR #2712: URL: https://github.com/apache/solr/pull/2712#issuecomment-2358707530 Okay, I see the challenge with StatusTool. StatusTool *should* support `--credentials`. Look at the tests, you can see we do: ``` "--credentials", SecurityJson.USER_PA

Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-09-16 Thread via GitHub
janhoy commented on PR #2712: URL: https://github.com/apache/solr/pull/2712#issuecomment-2352420107 So the reason is that in `BasicAuthIntegrationTest` it calls the tool directly with a url to query the status endpoint of the local Solr being tested. However, our test suite does not actuall

Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-09-16 Thread via GitHub
janhoy commented on PR #2712: URL: https://github.com/apache/solr/pull/2712#issuecomment-2352314226 There's a reproducible failure since `BasicAuthIntegrationTest` actually uses StatusTool and expects it to output pure JSON with the `--solr-url` option, and for it to also handle basic auth

Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-09-14 Thread via GitHub
janhoy commented on PR #2712: URL: https://github.com/apache/solr/pull/2712#issuecomment-2351044545 I removed the RuntimePermission for `manageProcess` for runtime since I suspect it is only needed for tests, where we actually do spawn processes... Will revert that commit if the test fails.

Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-09-14 Thread via GitHub
janhoy commented on code in PR #2712: URL: https://github.com/apache/solr/pull/2712#discussion_r1759758008 ## solr/core/src/java/org/apache/solr/cli/SolrProcessMgr.java: ## @@ -0,0 +1,159 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contribut

Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-09-14 Thread via GitHub
janhoy commented on code in PR #2712: URL: https://github.com/apache/solr/pull/2712#discussion_r1759757460 ## solr/core/src/java/org/apache/solr/cli/StatusTool.java: ## @@ -65,37 +74,119 @@ public String getName() { .desc("Wait up to the specified number of seconds to

Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-09-14 Thread via GitHub
janhoy commented on code in PR #2712: URL: https://github.com/apache/solr/pull/2712#discussion_r1759757260 ## solr/core/src/java/org/apache/solr/cli/StatusTool.java: ## @@ -65,37 +74,119 @@ public String getName() { .desc("Wait up to the specified number of seconds to

Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-09-14 Thread via GitHub
janhoy commented on code in PR #2712: URL: https://github.com/apache/solr/pull/2712#discussion_r1759757008 ## solr/core/src/java/org/apache/solr/cli/SolrProcessMgr.java: ## @@ -0,0 +1,159 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contribut

Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-09-14 Thread via GitHub
epugh commented on PR #2712: URL: https://github.com/apache/solr/pull/2712#issuecomment-2350933829 > > We can put a call out to the community for testing on Windows... @Willdotwhite would you be interested in taking this PR for a spin on Windows? > > I'd be happy to, although I'm away

Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-09-14 Thread via GitHub
Willdotwhite commented on PR #2712: URL: https://github.com/apache/solr/pull/2712#issuecomment-2350932827 > We can put a call out to the community for testing on Windows... @Willdotwhite would you be interested in taking this PR for a spin on Windows? I'd be happy to, although I'm awa

Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-09-13 Thread via GitHub
epugh commented on PR #2712: URL: https://github.com/apache/solr/pull/2712#issuecomment-2350744709 We can put a call out to the community for testing on Windows... @Willdotwhite would you be interested in taking this PR for a spin on Windows? -- This is an automated message from the Apac

Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-09-13 Thread via GitHub
epugh commented on code in PR #2712: URL: https://github.com/apache/solr/pull/2712#discussion_r1759625530 ## solr/core/src/java/org/apache/solr/cli/SolrProcessMgr.java: ## @@ -0,0 +1,159 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributo