简体   繁体   English

使用WMI for JDBC Connector进行远程:VM初始化期间发生错误无法为对象堆保留足够的空间

[英]Remote with WMI for JDBC Connector: Error occurred during initialization of VM Could not reserve enough space for object heap

I got a batch file which start up a JDBC connector with command below: 我得到了一个批处理文件,该文件使用以下命令启动JDBC连接器:

java -XX:NewSize=256m -XX:NewRatio=1 -Xms1024m -Xmx1024m  -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC 
-XX:+CMSIncrementalMode -XX:+CMSIncrementalPacing -XX:CMSIncrementalDutyCycleMin=0 
-XX:CMSIncrementalDutyCycle=5 -XX:+CMSParallelRemarkEnabled 
-XX:+UseTLAB -Dsun.rmi.dgc.client.gcInterval=240000 -Dsun.rmi.dgc.server.gcInterval=240000 -Dfile.encoding=UTF8 
-Djava.ext.dirs=..\lib;"C:\Program Files\Java\jdk1.5.0_16\jre"\lib;"C:\Program Files\Java\jdk1.5.0_16\jre"\lib\ext 

com.fastsearch.esp.connectors.jdbc.JDBCConnector %1 %2 %3 %4 %5 %6 %7 com.fastsearch.esp.connectors.jdbc.JDBCConnector%1%2%3%4%5%6%7

It works fine if I start it up on the PC locally, but it gives me "Error occurred during initialization of VM Could not reserve enough space for object heap" when I run it remotely with WMI in C#. 如果我在本地PC上启动它,它可以正常工作,但是当我在C#中使用WMI远程运行它时,它显示了“ VM初始化期间发生错误,无法为对象堆保留足够的空间”。

Here is the C# code I have used: 这是我使用的C#代码:

ObjectGetOptions objectGetOptions = new ObjectGetOptions(null,System.TimeSpan.MaxValue,true);
ManagementPath managementPath = new ManagementPath("Win32_Process");
ManagementClass processClass = new ManagementClass
    (manScope, managementPath, objectGetOptions);
ManagementBaseObject inParams = processClass.GetMethodParameters("Create");
inParams["CommandLine"] = @"D:\temp\connect.bat";
inParams["CurrentDirectory"] = @"D:\temp";
ManagementBaseObject outParams = processClass.InvokeMethod("Create", inParams, null); 

So is there any concern when I work with JVM remotely? 因此,当我远程使用JVM时是否有任何担忧? Is there any memory limit when I use WMI on remote machine? 在远程计算机上使用WMI时是否有内存限制?

According to this page: https://www.anoopcnair.com/configmgr-sccm-how-to-increase-wmi-default-memory-allocation/ 根据此页面: https//www.anoopcnair.com/configmgr-sccm-how-to-increase-wmi-default-memory-allocation/

I need to increase the WMI Process memory to a certain amount in order to get that JDBC Connector running. 我需要将WMI进程的内存增加到一定数量,以使JDBC连接器运行。 The default is 128MB, which is not enough for the Connector setup. 默认值为128MB,不足以进行连接器设置。 Just too much trouble... I give up. 太麻烦了...我放弃了。 I am going to use psExec instead. 我将改用psExec。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM