Невозможно выполнить команду создания кластера powershell в java.
Я включил enable-wsmancredssp на моем сервере, чтобы предотвратить любую проблему с привилегиями.Мой сервер - Windows Server 2016.
String command = "cmd /c start powershell \"New-Cluster -Name CLUSTER1 -node NODE1,NODE2 -StaticAddress 202.100.11.3 -AdministrativeAccessPoint Dns\"";
Process clustering_process = Runtime.getRuntime().exec(command);
clustering_process.waitFor();
Нет сообщения об ошибке, но я обнаружил предупреждение в файле журнала tomcat.
04-Jul-2019 14:50:07.322 INFO [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.startup.HostConfig.undeploy Undeploying context [/Portal]
04-Jul-2019 14:50:09.650 WARNING [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [Portal] is still processing a request that has yet to finish. This is very likely to create a memory leak. You can control the time allowed for requests to finish by using the unloadDelay attribute of the standard Context implementation. Stack trace of request processing thread:[
java.io.FileInputStream.readBytes(Native Method)
java.io.FileInputStream.read(Unknown Source)
java.io.BufferedInputStream.read1(Unknown Source)
java.io.BufferedInputStream.read(Unknown Source)
sun.nio.cs.StreamDecoder.readBytes(Unknown Source)
sun.nio.cs.StreamDecoder.implRead(Unknown Source)
sun.nio.cs.StreamDecoder.read(Unknown Source)
java.io.InputStreamReader.read(Unknown Source)
java.io.BufferedReader.fill(Unknown Source)
java.io.BufferedReader.readLine(Unknown Source)
java.io.BufferedReader.readLine(Unknown Source)
HA.HA.doPost(HA.java:400)
javax.servlet.http.HttpServlet.service(HttpServlet.java:661)
javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459)
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
java.lang.Thread.run(Unknown Source)]