You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "janhoy (via GitHub)" <gi...@apache.org> on 2025/03/27 10:56:42 UTC

[PR] SOLR-17717 Starting solr on newer Windows 11 Home complained about WMIC [solr]

janhoy opened a new pull request, #3291:
URL: https://github.com/apache/solr/pull/3291

   https://issues.apache.org/jira/browse/SOLR-17717
   
   Workaround is to fetch the same information using `powershell.exe`. This is WIP code, not tested on Windows yet.


-- 
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-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] SOLR-17717 Starting solr on newer Windows 11 Home complained about WMIC [solr]

Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on code in PR #3291:
URL: https://github.com/apache/solr/pull/3291#discussion_r2018447441


##########
solr/core/src/java/org/apache/solr/cli/SolrProcessManager.java:
##########
@@ -162,42 +171,60 @@ private static Optional<String> commandLine(ProcessHandle ph) {
     if (!Constants.WINDOWS) {
       return ph.info().commandLine();
     } else {
-      long desiredProcessid = ph.pid();
-      try {
-        Process process =
-            new ProcessBuilder(
-                    "wmic",
-                    "process",
-                    "where",
-                    "ProcessID=" + desiredProcessid,
-                    "get",
-                    "commandline",
-                    "/format:list")
-                .redirectErrorStream(true)
-                .start();
-        try (InputStreamReader inputStreamReader =
-                new InputStreamReader(process.getInputStream(), StandardCharsets.UTF_8);
-            BufferedReader reader = new BufferedReader(inputStreamReader)) {
-          while (true) {
-            String line = reader.readLine();
-            if (line == null) {
-              return Optional.empty();
-            }
-            if (!line.startsWith("CommandLine=")) {
-              continue;
-            }
-            return Optional.of(line.substring("CommandLine=".length()));
-          }
+      return Optional.ofNullable(pidToWindowsCommandLineMap.get(ph.pid()));
+    }
+  }
+
+  /**
+   * Gets the command lines of all java processes on Windows using PowerShell.
+   *
+   * @return a map of process IDs to command lines
+   */
+  private static Map<Long, String> commandLinesWindows() {
+    try {
+      StopWatch stopWatch = StopWatch.createStarted();
+      Process process =
+          new ProcessBuilder(
+                  "powershell.exe",
+                  "-Command",
+                  "Get-CimInstance -ClassName Win32_Process | Where-Object { $_.Name -like '*java*' } | Select-Object ProcessId, CommandLine | ConvertTo-Json -Depth 1")
+              .redirectErrorStream(true)
+              .start();
+      try (InputStreamReader inputStreamReader =
+              new InputStreamReader(process.getInputStream(), StandardCharsets.UTF_8);

Review Comment:
   P.S.: I like the idea to use JSON output. That's much better than applying regexes and line-by line parsing of arbitrary tabular output.



-- 
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-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] SOLR-17717 Starting solr on newer Windows 11 Home complained about WMIC [solr]

Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #3291:
URL: https://github.com/apache/solr/pull/3291#issuecomment-2758634149

   Powershell is available in Windows 10 and 11 for all variants. Servers have it for sure. Windows 8 also has Powershell but its out of date. Windows 7 can install it. If anybody complains about Windows XP, I'm out of arguments.


-- 
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-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] SOLR-17717 Starting solr on newer Windows 11 Home complained about WMIC [solr]

Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #3291:
URL: https://github.com/apache/solr/pull/3291#issuecomment-2758999802

   > > It is tempting to just defer this complexity to https://github.com/oshi/oshi as we discussed in the original feature issue.
   > 
   > I thought you found a limitation that prevented oshi being viable? It looks like an active maintained library ;-).
   
   Please don't add new libraries (especially those with native code) just for a single function call. I'd remove the wmic support completely. It might also no longer be installed on freshly installed Windows 11 Pro or Servers. If you add libraries with native code, you need to whitelist them in later Java versions, because by default next LTS will disable native code via JNI and Panama. So it is now mandatory to add the command line option to enable it for Lucene Core (see recent upgrades to build scripts).
   
   Uwe


-- 
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-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] SOLR-17717 Starting solr on newer Windows 11 Home complained about WMIC [solr]

Posted by "janhoy (via GitHub)" <gi...@apache.org>.
janhoy commented on PR #3291:
URL: https://github.com/apache/solr/pull/3291#issuecomment-2760808394

   Did some more testing and a weakness of the solution is that the Powershell process is spawned once for every Java process running on the system, and each invocation takes some 3-5 seconds on the Win11 VM on my MacBook. Don't know if such slow invocation is representative for a real windows system, but it is an overhead. I have not done a comparison for the old wmic invocation. Manual command invocation in a PS terminal takes <1s. While manually invoking `powershell.exe -Command "foo"` from a CMD terminal takes 2+ secs, perhaps there's a startup cost in starting powershell process.
   
   So I refactored the code to instead of calling PS once per PID, we do one full PID list on startup with
   ```
   "Get-CimInstance -ClassName Win32_Process | Where-Object { $_.Name -like '*java*' } | Select-Object ProcessId, CommandLine | ConvertTo-Json -Depth 1"
   ```
   and stuffs it into a `Map<Long, String>` for later lookup.
   
   The OSHI library, using jna would probably be far more performant, but I agree that adding a 1Mb jar just for this is too much.


-- 
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-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] SOLR-17717 Starting solr on newer Windows 11 Home complained about WMIC [solr]

Posted by "janhoy (via GitHub)" <gi...@apache.org>.
janhoy commented on code in PR #3291:
URL: https://github.com/apache/solr/pull/3291#discussion_r2018429739


##########
solr/core/src/java/org/apache/solr/cli/SolrProcessManager.java:
##########
@@ -162,42 +171,60 @@ private static Optional<String> commandLine(ProcessHandle ph) {
     if (!Constants.WINDOWS) {
       return ph.info().commandLine();
     } else {
-      long desiredProcessid = ph.pid();
-      try {
-        Process process =
-            new ProcessBuilder(
-                    "wmic",
-                    "process",
-                    "where",
-                    "ProcessID=" + desiredProcessid,
-                    "get",
-                    "commandline",
-                    "/format:list")
-                .redirectErrorStream(true)
-                .start();
-        try (InputStreamReader inputStreamReader =
-                new InputStreamReader(process.getInputStream(), StandardCharsets.UTF_8);
-            BufferedReader reader = new BufferedReader(inputStreamReader)) {
-          while (true) {
-            String line = reader.readLine();
-            if (line == null) {
-              return Optional.empty();
-            }
-            if (!line.startsWith("CommandLine=")) {
-              continue;
-            }
-            return Optional.of(line.substring("CommandLine=".length()));
-          }
+      return Optional.ofNullable(pidToWindowsCommandLineMap.get(ph.pid()));
+    }
+  }
+
+  /**
+   * Gets the command lines of all java processes on Windows using PowerShell.
+   *
+   * @return a map of process IDs to command lines
+   */
+  private static Map<Long, String> commandLinesWindows() {
+    try {
+      StopWatch stopWatch = StopWatch.createStarted();
+      Process process =
+          new ProcessBuilder(
+                  "powershell.exe",
+                  "-Command",
+                  "Get-CimInstance -ClassName Win32_Process | Where-Object { $_.Name -like '*java*' } | Select-Object ProcessId, CommandLine | ConvertTo-Json -Depth 1")
+              .redirectErrorStream(true)
+              .start();
+      try (InputStreamReader inputStreamReader =
+              new InputStreamReader(process.getInputStream(), StandardCharsets.UTF_8);

Review Comment:
   Yea, added onion layers, will take a stab on peeling.



-- 
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-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] SOLR-17717 Starting solr on newer Windows 11 Home complained about WMIC [solr]

Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on code in PR #3291:
URL: https://github.com/apache/solr/pull/3291#discussion_r2018383512


##########
solr/core/src/java/org/apache/solr/cli/SolrProcessManager.java:
##########
@@ -162,42 +171,60 @@ private static Optional<String> commandLine(ProcessHandle ph) {
     if (!Constants.WINDOWS) {
       return ph.info().commandLine();
     } else {
-      long desiredProcessid = ph.pid();
-      try {
-        Process process =
-            new ProcessBuilder(
-                    "wmic",
-                    "process",
-                    "where",
-                    "ProcessID=" + desiredProcessid,
-                    "get",
-                    "commandline",
-                    "/format:list")
-                .redirectErrorStream(true)
-                .start();
-        try (InputStreamReader inputStreamReader =
-                new InputStreamReader(process.getInputStream(), StandardCharsets.UTF_8);
-            BufferedReader reader = new BufferedReader(inputStreamReader)) {
-          while (true) {
-            String line = reader.readLine();
-            if (line == null) {
-              return Optional.empty();
-            }
-            if (!line.startsWith("CommandLine=")) {
-              continue;
-            }
-            return Optional.of(line.substring("CommandLine=".length()));
-          }
+      return Optional.ofNullable(pidToWindowsCommandLineMap.get(ph.pid()));
+    }
+  }
+
+  /**
+   * Gets the command lines of all java processes on Windows using PowerShell.
+   *
+   * @return a map of process IDs to command lines
+   */
+  private static Map<Long, String> commandLinesWindows() {
+    try {
+      StopWatch stopWatch = StopWatch.createStarted();
+      Process process =
+          new ProcessBuilder(
+                  "powershell.exe",
+                  "-Command",
+                  "Get-CimInstance -ClassName Win32_Process | Where-Object { $_.Name -like '*java*' } | Select-Object ProcessId, CommandLine | ConvertTo-Json -Depth 1")
+              .redirectErrorStream(true)
+              .start();
+      try (InputStreamReader inputStreamReader =
+              new InputStreamReader(process.getInputStream(), StandardCharsets.UTF_8);

Review Comment:
   Why not directly tell jackson to load the JSON from the `inputStreamReader`? To me it looks strange to read it line by line and concat it together. This should be the task of the JSON parser.



-- 
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-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] SOLR-17717 Starting solr on newer Windows 11 Home complained about WMIC [solr]

Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #3291:
URL: https://github.com/apache/solr/pull/3291#issuecomment-2760953243

   >  Don't know if such slow invocation is representative for a real windows system, but it is an overhead.
   
   Powershell is slow to start. Yes. Also on real machines.


-- 
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-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] SOLR-17717 Use Powershell instead of WMIC to get cmdline on Windows [solr]

Posted by "janhoy (via GitHub)" <gi...@apache.org>.
janhoy merged PR #3291:
URL: https://github.com/apache/solr/pull/3291


-- 
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-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] SOLR-17717 Starting solr on newer Windows 11 Home complained about WMIC [solr]

Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on code in PR #3291:
URL: https://github.com/apache/solr/pull/3291#discussion_r2018412617


##########
solr/core/src/java/org/apache/solr/cli/SolrProcessManager.java:
##########
@@ -162,42 +171,60 @@ private static Optional<String> commandLine(ProcessHandle ph) {
     if (!Constants.WINDOWS) {
       return ph.info().commandLine();
     } else {
-      long desiredProcessid = ph.pid();
-      try {
-        Process process =
-            new ProcessBuilder(
-                    "wmic",
-                    "process",
-                    "where",
-                    "ProcessID=" + desiredProcessid,
-                    "get",
-                    "commandline",
-                    "/format:list")
-                .redirectErrorStream(true)
-                .start();
-        try (InputStreamReader inputStreamReader =
-                new InputStreamReader(process.getInputStream(), StandardCharsets.UTF_8);
-            BufferedReader reader = new BufferedReader(inputStreamReader)) {
-          while (true) {
-            String line = reader.readLine();
-            if (line == null) {
-              return Optional.empty();
-            }
-            if (!line.startsWith("CommandLine=")) {
-              continue;
-            }
-            return Optional.of(line.substring("CommandLine=".length()));
-          }
+      return Optional.ofNullable(pidToWindowsCommandLineMap.get(ph.pid()));
+    }
+  }
+
+  /**
+   * Gets the command lines of all java processes on Windows using PowerShell.
+   *
+   * @return a map of process IDs to command lines
+   */
+  private static Map<Long, String> commandLinesWindows() {
+    try {
+      StopWatch stopWatch = StopWatch.createStarted();
+      Process process =
+          new ProcessBuilder(
+                  "powershell.exe",
+                  "-Command",
+                  "Get-CimInstance -ClassName Win32_Process | Where-Object { $_.Name -like '*java*' } | Select-Object ProcessId, CommandLine | ConvertTo-Json -Depth 1")
+              .redirectErrorStream(true)
+              .start();
+      try (InputStreamReader inputStreamReader =
+              new InputStreamReader(process.getInputStream(), StandardCharsets.UTF_8);

Review Comment:
   ...or just use `IOUtils.toString(reader)` or better `IOUtils.toString(stream, charset)`



-- 
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-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] SOLR-17717 Starting solr on newer Windows 11 Home complained about WMIC [solr]

Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on code in PR #3291:
URL: https://github.com/apache/solr/pull/3291#discussion_r2018444722


##########
solr/core/src/java/org/apache/solr/cli/SolrProcessManager.java:
##########
@@ -162,42 +171,60 @@ private static Optional<String> commandLine(ProcessHandle ph) {
     if (!Constants.WINDOWS) {
       return ph.info().commandLine();
     } else {
-      long desiredProcessid = ph.pid();
-      try {
-        Process process =
-            new ProcessBuilder(
-                    "wmic",
-                    "process",
-                    "where",
-                    "ProcessID=" + desiredProcessid,
-                    "get",
-                    "commandline",
-                    "/format:list")
-                .redirectErrorStream(true)
-                .start();
-        try (InputStreamReader inputStreamReader =
-                new InputStreamReader(process.getInputStream(), StandardCharsets.UTF_8);
-            BufferedReader reader = new BufferedReader(inputStreamReader)) {
-          while (true) {
-            String line = reader.readLine();
-            if (line == null) {
-              return Optional.empty();
-            }
-            if (!line.startsWith("CommandLine=")) {
-              continue;
-            }
-            return Optional.of(line.substring("CommandLine=".length()));
-          }
+      return Optional.ofNullable(pidToWindowsCommandLineMap.get(ph.pid()));
+    }
+  }
+
+  /**
+   * Gets the command lines of all java processes on Windows using PowerShell.
+   *
+   * @return a map of process IDs to command lines
+   */
+  private static Map<Long, String> commandLinesWindows() {
+    try {
+      StopWatch stopWatch = StopWatch.createStarted();
+      Process process =
+          new ProcessBuilder(
+                  "powershell.exe",
+                  "-Command",
+                  "Get-CimInstance -ClassName Win32_Process | Where-Object { $_.Name -like '*java*' } | Select-Object ProcessId, CommandLine | ConvertTo-Json -Depth 1")
+              .redirectErrorStream(true)
+              .start();
+      try (InputStreamReader inputStreamReader =
+              new InputStreamReader(process.getInputStream(), StandardCharsets.UTF_8);

Review Comment:
   I am sure starting the process and reading/converting the output can at end be a 4-liner using Java streaming API ;-)



-- 
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-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] SOLR-17717 Starting solr on newer Windows 11 Home complained about WMIC [solr]

Posted by "janhoy (via GitHub)" <gi...@apache.org>.
janhoy commented on code in PR #3291:
URL: https://github.com/apache/solr/pull/3291#discussion_r2018513810


##########
solr/core/src/java/org/apache/solr/cli/SolrProcessManager.java:
##########
@@ -162,42 +169,60 @@ private static Optional<String> commandLine(ProcessHandle ph) {
     if (!Constants.WINDOWS) {
       return ph.info().commandLine();
     } else {
-      long desiredProcessid = ph.pid();
-      try {
-        Process process =
-            new ProcessBuilder(
-                    "wmic",
-                    "process",
-                    "where",
-                    "ProcessID=" + desiredProcessid,
-                    "get",
-                    "commandline",
-                    "/format:list")
-                .redirectErrorStream(true)
-                .start();
-        try (InputStreamReader inputStreamReader =
-                new InputStreamReader(process.getInputStream(), StandardCharsets.UTF_8);
-            BufferedReader reader = new BufferedReader(inputStreamReader)) {
-          while (true) {
-            String line = reader.readLine();
-            if (line == null) {
-              return Optional.empty();
-            }
-            if (!line.startsWith("CommandLine=")) {
-              continue;
-            }
-            return Optional.of(line.substring("CommandLine=".length()));
-          }
-        }
-      } catch (IOException e) {
+      return Optional.ofNullable(pidToWindowsCommandLineMap.get(ph.pid()));
+    }
+  }
+
+  /**
+   * Gets the command lines of all java processes on Windows using PowerShell.
+   *
+   * @return a map of process IDs to command lines
+   */
+  private static Map<Long, String> commandLinesWindows() {
+    try {
+      Process process =
+          new ProcessBuilder(
+                  "powershell.exe",
+                  "-Command",
+                  "Get-CimInstance -ClassName Win32_Process | Where-Object { $_.Name -like '*java*' } | Select-Object ProcessId, CommandLine | ConvertTo-Json -Depth 1")

Review Comment:
   The `Get-CimInstance` is not available in Powershell 2.0 (Windows 7). We could use `Get-WmiObject` instead, but it is slower. Don't think we need to care too much about Windows 7 these days.



-- 
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-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] SOLR-17717 Use Powershell instead of WMIC to get cmdline on Windows [solr]

Posted by "janhoy (via GitHub)" <gi...@apache.org>.
janhoy commented on PR #3291:
URL: https://github.com/apache/solr/pull/3291#issuecomment-2814059047

   Coming back to this. Lacking test suite on multiple windows versions makes such changes brittle. I hope the iterations we have done here and the reviews is enough to merge. And then hope the fix is not worse than what it replaces, except for perhaps added latency launching powershell. I'll go ahead and merge to main for now.


-- 
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-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] SOLR-17717 Starting solr on newer Windows 11 Home complained about WMIC [solr]

Posted by "janhoy (via GitHub)" <gi...@apache.org>.
janhoy commented on PR #3291:
URL: https://github.com/apache/solr/pull/3291#issuecomment-2759833854

   Thanks for the review. I removed RMIC support. I have tested the PowerShell option on my UTM Win11 ARM VM and it works. However, my user is administrator, so I'd need to test with an unprivileged user as well. Feel free to give it a spin if you are on Win..


-- 
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-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] SOLR-17717 Starting solr on newer Windows 11 Home complained about WMIC [solr]

Posted by "janhoy (via GitHub)" <gi...@apache.org>.
janhoy commented on PR #3291:
URL: https://github.com/apache/solr/pull/3291#issuecomment-2758569105

   I'm not fluent enough in Windows world to know whether powershell.exe is available on all home, pro and server versions, so due to lack of integration tests on windows, it feels safer to handle it as a fallback for the existing approach. I wish Java implemented this for us in `Process` on Windows too. `ph.info().commandLine()` is so much nicer than these workarounds.


-- 
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-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] SOLR-17717 Starting solr on newer Windows 11 Home complained about WMIC [solr]

Posted by "janhoy (via GitHub)" <gi...@apache.org>.
janhoy commented on PR #3291:
URL: https://github.com/apache/solr/pull/3291#issuecomment-2758600652

   It is tempting to just defer this complexity to https://github.com/oshi/oshi as we discussed in the original feature issue.


-- 
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-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] SOLR-17717 Starting solr on newer Windows 11 Home complained about WMIC [solr]

Posted by "epugh (via GitHub)" <gi...@apache.org>.
epugh commented on PR #3291:
URL: https://github.com/apache/solr/pull/3291#issuecomment-2758645066

   > It is tempting to just defer this complexity to https://github.com/oshi/oshi as we discussed in the original feature issue.
   
   I thought you found a limitation that prevented oshi being viable?  It looks like an active maintained library ;-).


-- 
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-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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