新建数据中心时无响应,出现java.lang.OutOfMemoryError: PermGen space
金蝶云社区-罗振其
罗振其
0人赞赏了该文章 736次浏览 未经作者许可,禁止转载编辑于2017年08月23日 11:21:07

Admin.log中日志如下:ee/eas/server/metas/eas/permission_fme-metas.jar;/kingdee/eas/server/metas/eas/eas_bi_application-metas.jar;/kingdee/eas/server/metas/eas/permission-metas.jar;/kingdee/eas/server/metas/eas/permission_fp-metas.jar;/kingdee/eas/server/metas/eas/log_macp-metas.jar;/kingdee/eas/server/metas/eas/permission_rpt-metas.jar;/kingdee/eas/server/metas/eas/log_fp-metas.jar;/kingdee/eas/server/metas/eas/package-metas.jar;/kingdee/eas/server/metas/eas/cm_cal-metas.jar;/kingdee/eas/server/metas/eas/fm_birt-metas.jar;/kingdee/eas/server/metas/eas/cm_bb-metas.jar;/kingdee/eas/server/metas/eas/cm_common-metas.jar;/kingdee/eas/server/metas/eas/bd_cm-metas.jar;/kingdee/eas/server/metas/eas/em_basedata-metas.jar;/kingdee/eas/server/metas/eas/em_maintain-metas.jar;/kingdee/eas/server/metas/eas/em_common-metas.jar;/kingdee/eas/server/metas/eas/eas_bimrptframework-metas.jar;[2017-08-22 14:27:26,485 INFO]Init pkmapping. Can't find index.lst[2017-08-22 14:27:26,681 INFO]MetaDataclassloader inited. spent 1145 ms.[2017-08-22 14:27:26,683 INFO]InitMetaMetaData Engine ... [2017-08-22 14:27:29,583 INFO]MetaMetaDataInited. spent 2834 ms.Exception in thread "RMIRenewClean-[192.168.3.110:49760]" java.lang.OutOfMemoryError:PermGen space at sun.misc.Unsafe.defineClass(Native Method) at sun.reflect.ClassDefiner.defineClass(ClassDefiner.java:45) atsun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:381) at java.security.AccessController.doPrivileged(Native Method) at sun.reflect.MethodAccessorGenerator.generate(MethodAccessorGenerator.java:377) atsun.reflect.MethodAccessorGenerator.generateSerializationConstructor(MethodAccessorGenerator.java:95) at sun.reflect.ReflectionFactory.newConstructorForSerialization(ReflectionFactory.java:313) atjava.io.ObjectStreamClass.getSerializableConstructor(ObjectStreamClass.java:1382) at java.io.ObjectStreamClass.access$1500(ObjectStreamClass.java:51) at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:449) at java.security.AccessController.doPrivileged(Native Method) at java.io.ObjectStreamClass.(ObjectStreamClass.java:425) at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:322) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1115) atjava.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1535) atjava.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1496) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1413) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1159) atjava.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1535) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1496) atjava.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1413) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1159) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:329) at sun.rmi.transport.DGCImpl_Stub.dirty(Unknown Source) atsun.rmi.transport.DGCClient$EndpointEntry.makeDirtyCall(DGCClient.java:359) at sun.rmi.transport.DGCClient$EndpointEntry.access$1600(DGCClient.java:170) atsun.rmi.transport.DGCClient$EndpointEntry$RenewCleanThread$1.run(DGCClient.java:577) atsun.rmi.transport.DGCClient$EndpointEntry$RenewCleanThread$1.run(DGCClient.java:574) at java.security.AccessController.doPrivileged(Native Method) atsun.rmi.transport.DGCClient$EndpointEntry$RenewCleanThread.run(DGCClient.java:574) at java.lang.Thread.run(Thread.java:682)[2017-08-22 14:32:47,690INFO]CorrectException in thread "Thread-7" EAjava.lang.OutOfMemoryError:PermGen spaceSEntiryReference failed!PermGen spacejava.lang.OutOfMemoryError:PermGen space at java.lang.String.intern(Native Method) at com.kingdee.util.SortedSt^C

解决办法:修改 /kingdee/eas/admi/adminserver.sh 增加 -XX:PermSize=512m 参数例如:root@easserver # cat /kingdee/eas/admi/adminserver.sh
$JAVA_HOME/bin/java -Xmx1024m -Xms64m $MAXPERMSION -cp $ADMINCLASSPATH -Djava.io.tmpdir=$EAS_HOME/admin/workspace -Dibm.stream.nio=true -Duser.timezone=Asia/Shanghai -Djava.net.preferIPv4Stack=true -DlocalIP=$LOCAL_IP -Djava.security.policy=$EAS_HOME/server/properties/eas.policy -DPLUGIN.LIB.PATH=$EAS_HOME/admin/lib -DADMIN_HOME=$EAS_HOME/admin -DEAS_HOME=$EAS_HOME -DAPP_SERVER_TYPE=$APP_SERVER_TYPE -DAPP_SERVER_HOME=$APP_SERVER_HOME -DAPUSIC_SERVER_HOME=$APUSIC_SERVER_HOME -DWAS_SERVER_HOME=$WAS_SERVER_HOME -DWLS_SERVER_HOME=$WLS_SERVER_HOME -DAPP_SERVER_VERSION=$APP_SERVER_VERSION -Dlog4j.configuration=file:./config/log4j.properties -DNoStd=true -DjvmStdCount=20 -DjvmStdSize=4 -Dadmin.application=file:./config/standalone_app.xml -DAUTO_TASKNAME=$2 -DjvmStd=./logs/admin.log com.kingdee.eas.tools.launcher.Start ./admin.pid org.eclipse.core.runtime.adaptor.EclipseStarter -configuration ./config -clean &
else
nohup $JAVA_HOME/bin/java -Xmx1024m -Xms64m $MAXPERMSION -Xrs -cp $ADMINCLASSPATH -Djava.io.tmpdir=$EAS_HOME/admin/workspace -Dibm.stream.nio=true -Duser.timezone=Asia/Shanghai -Djava.net.preferIPv4Stack=true -DlocalIP=$LOCAL_IP -Djava.security.policy=$EAS_HOME/server/properties/eas.policy -DPLUGIN.LIB.PATH=$EAS_HOME/admin/lib -DADMIN_HOME=$EAS_HOME/admin -DEAS_HOME=$EAS_HOME -DStartUIClient=$StartUIClient -DAPP_SERVER_TYPE=$APP_SERVER_TYPE -DAPP_SERVER_HOME=$APP_SERVER_HOME -DAPUSIC_SERVER_HOME=$APUSIC_SERVER_HOME -DWAS_SERVER_HOME=$WAS_SERVER_HOME -DWLS_SERVER_HOME=$WLS_SERVER_HOME -DAPP_SERVER_VERSION=$APP_SERVER_VERSION -Dlog4j.configuration=file:./config/log4j.properties -Dadmin.application=file:./config/server_app.xml -DjvmStdCount=20 -DjvmStdSize=4 -DjvmStd=./logs/admin.log com.kingdee.eas.tools.launcher.Start ./adminserver.pid org.eclipse.core.runtime.adaptor.EclipseStarter -configuration ./config -clean >/dev/null &

增加 -XX:PermSize=512m 参数

改成:
root@easserver # cat /kingdee/eas/admi/adminserver.sh
$JAVA_HOME/bin/java -Xmx1024m -Xms64m -XX:PermSize=512m $MAXPERMSION -cp $ADMINCLASSPATH -Djava.io.tmpdir=$EAS_HOME/admin/workspace -Dibm.stream.nio=true -Duser.timezone=Asia/Shanghai -Djava.net.preferIPv4Stack=true -DlocalIP=$LOCAL_IP -Djava.security.policy=$EAS_HOME/server/properties/eas.policy -DPLUGIN.LIB.PATH=$EAS_HOME/admin/lib -DADMIN_HOME=$EAS_HOME/admin -DEAS_HOME=$EAS_HOME -DAPP_SERVER_TYPE=$APP_SERVER_TYPE -DAPP_SERVER_HOME=$APP_SERVER_HOME -DAPUSIC_SERVER_HOME=$APUSIC_SERVER_HOME -DWAS_SERVER_HOME=$WAS_SERVER_HOME -DWLS_SERVER_HOME=$WLS_SERVER_HOME -DAPP_SERVER_VERSION=$APP_SERVER_VERSION -Dlog4j.configuration=file:./config/log4j.properties -DNoStd=true -DjvmStdCount=20 -DjvmStdSize=4 -Dadmin.application=file:./config/standalone_app.xml -DAUTO_TASKNAME=$2 -DjvmStd=./logs/admin.log com.kingdee.eas.tools.launcher.Start ./admin.pid org.eclipse.core.runtime.adaptor.EclipseStarter -configuration ./config -clean &
else
nohup $JAVA_HOME/bin/java -Xmx1024m -Xms64m -XX:PermSize=512m $MAXPERMSION -Xrs -cp $ADMINCLASSPATH -Djava.io.tmpdir=$EAS_HOME/admin/workspace -Dibm.stream.nio=true -Duser.timezone=Asia/Shanghai -Djava.net.preferIPv4Stack=true -DlocalIP=$LOCAL_IP -Djava.security.policy=$EAS_HOME/server/properties/eas.policy -DPLUGIN.LIB.PATH=$EAS_HOME/admin/lib -DADMIN_HOME=$EAS_HOME/admin -DEAS_HOME=$EAS_HOME -DStartUIClient=$StartUIClient -DAPP_SERVER_TYPE=$APP_SERVER_TYPE -DAPP_SERVER_HOME=$APP_SERVER_HOME -DAPUSIC_SERVER_HOME=$APUSIC_SERVER_HOME -DWAS_SERVER_HOME=$WAS_SERVER_HOME -DWLS_SERVER_HOME=$WLS_SERVER_HOME -DAPP_SERVER_VERSION=$APP_SERVER_VERSION -Dlog4j.configuration=file:./config/log4j.properties -Dadmin.application=file:./config/server_app.xml -DjvmStdCount=20 -DjvmStdSize=4 -DjvmStd=./logs/admin.log com.kingdee.eas.tools.launcher.Start ./adminserver.pid org.eclipse.core.runtime.adaptor.EclipseStarter -configuration ./config -clean >/dev/null &

修改完后重启 eas控制台,再重新建立数据中心