2011-10-12 25 views
6

Quiero aumentar el tamaño del almacenamiento dinámico de mi Glassfish. Por eso, sé que puedo ir hasta 4 GB:Error al iniciar Glassfish después de aumentar el tamaño del almacenamiento dinámico

java -Xmx4000M -version 
java version "1.6.0_26" 
Java(TM) SE Runtime Environment (build 1.6.0_26-b03-384-10M3425) 
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02-384, mixed mode) 

Me trataron de establecer en el archivo domain.xml la -Xmx 2 GB:

<jvm-options>-Xmx2000m</jvm-options> 

Pero estoy consiguiendo el error siguiente:

asadmin> start-domain 
Waiting for ... to start .Error starting domain ... 
The server exited prematurely with exit code 1. 
Before it died, it produced the following output: 

Error occurred during initialization of VM 
The size of the object heap + VM data exceeds the maximum representable size 
launchctl bsexec failed: Inappropriate ioctl for device 

Inicio del comando con la opción -v da esto:

12 oct. 2011 11:46:34 com.sun.enterprise.admin.launcher.GFLauncherLogger info 
INFO: JVM invocation command line: 
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java 
-XX:+UnlockDiagnosticVMOptions 
-XX:MaxPermSize=512m 
-XX:NewRatio=2 
-XX:+CMSClassUnloadingEnabled 
-Xmx2000m 
-Xms1000m 
... 
12 oct. 2011 11:46:35 com.sun.enterprise.admin.launcher.GFLauncherLogger info 
INFO: Successfully launched in 45 msec. 
Error occurred during initialization of VM 
Could not reserve enough space for object heap 
Could not create the Java virtual machine. 
Command start-domain failed. 

Respuesta

12

Encontré el problema. Por algunas razones que no entiendo, el argumento "-d32" fue pasado en el comando, pidiendo que se inicie en el modo de 32 bits. Al agregar

<jvm-options>-d64</jvm-options> 

al archivo domain.xml, glassfish starts. Tenga en cuenta que esta opción no está presente por defecto en el archivo.

0

debe estar utilizando una instalación Java diferente al hacer la "versión" y desde GlassFish. Puedo reproducir el mismo error con el "Java" por defecto en la trayectoria de Mac OS' pero no cuando se utiliza una ruta absoluta:

% /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java -Xmx2300m -version 
java version "1.6.0_26" 
Java(TM) SE Runtime Environment (build 1.6.0_26-b03-383-11A511) 
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02-383, mixed mode) 
% java -Xmx2300m -version 
Error occurred during initialization of VM 
Could not reserve enough space for object heap 
Could not create the Java virtual machine. 
0

Podría ser que usted no tiene suficiente espacio en disco en su sistema? La reserva de 4 GB de RAM puede requerir que el sistema operativo MAC amplíe el espacio de intercambio, y es posible que no tenga espacio en el disco para hacerlo. Lamentablemente, esto me ha quemado antes: -/

Cuestiones relacionadas