5 Replies Latest reply: Mar 31, 2011 8:41 AM by handat RSS

    Glassfish3.1 cannot start up with jdk1.6.0.24 ?

    815325
      Hello all,

      root@sv1:/opt/glassfish3/glassfish/bin# sh asadmin start-domain domain1
      Waiting for domain1 to start .Error starting domain domain1.
      The server exited prematurely with exit code 1.
      Before it died, it produced the following output:
      
      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.
      root@sv1:/opt/glassfish3/glassfish/bin# cat /proc/meminfo
      MemTotal:       524288 kB
      MemFree:        305256 kB
      Buffers:             0 kB
      Cached:              0 kB
      SwapCached:          0 kB
      Active:              0 kB
      Inactive:            0 kB
      HighTotal:           0 kB
      HighFree:            0 kB
      LowTotal:       524288 kB
      LowFree:        305256 kB
      SwapTotal:           0 kB
      SwapFree:            0 kB
      Dirty:               0 kB
      Writeback:           0 kB
      AnonPages:           0 kB
      Mapped:              0 kB
      Slab:                0 kB
      PageTables:          0 kB
      NFS_Unstable:        0 kB
      Bounce:              0 kB
      CommitLimit:         0 kB
      Committed_AS:        0 kB
      VmallocTotal:        0 kB
      VmallocUsed:         0 kB
      VmallocChunk:        0 kB
      HugePages_Total:     0
      HugePages_Free:      0
      HugePages_Rsvd:      0
      Hugepagesize:     2048 kB
      Could you tell me, what is this error come from?
      Note: I use the default configuration file of glassfish3 (config\domain.xml)

      Thanks.
        • 1. Re: Glassfish3.1 cannot start up with jdk1.6.0.24 ?
          handat
          Lower the -mx value to something like 256m. The default is too high for your system.
          • 2. Re: Glassfish3.1 cannot start up with jdk1.6.0.24 ?
            815325
            I follow your instructions. and I have tried : 1024, 512, 128, 64, 32.

            The same results, cannot initialize JVM.
            root@sv1:/opt/glassfish3/glassfish/bin# sh asadmin start-domain domain1
            Waiting for domain1 to start .Error starting domain domain1.
            The server exited prematurely with exit code 1.
            Before it died, it produced the following output:
            
            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.
            here server log for 32m:
            INFO: JVM invocation command line:
            /home/jdk1.6.0_24/bin/java
            -cp
            /opt/glassfish3/glassfish/modules/glassfish.jar
            -XX:+UnlockDiagnosticVMOptions
            -XX:MaxPermSize=32m
            -XX:NewRatio=2
            -Xmx32m
            -client
            -javaagent:/opt/glassfish3/glassfish/lib/monitor/btrace-agent.jar=unsafe=true,noServer=true
            -Dosgi.shell.telnet.maxconn=1
            -Dfelix.fileinstall.disableConfigSave=false
            -Djdbc.drivers=org.apache.derby.jdbc.ClientDriver
            -Dfelix.fileinstall.dir=/opt/glassfish3/glassfish/modules/autostart/
            -Djavax.net.ssl.keyStore=/opt/glassfish3/glassfish/domains/domain1/config/keystore.jks
            -Dosgi.shell.telnet.port=6666
            -Djava.security.policy=/opt/glassfish3/glassfish/domains/domain1/config/server.policy
            -Dfelix.fileinstall.log.level=2
            -Dfelix.fileinstall.poll=5000
            -Dcom.sun.aas.instanceRoot=/opt/glassfish3/glassfish/domains/domain1
            -Dosgi.shell.telnet.ip=127.0.0.1
            -Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory
            -Djava.endorsed.dirs=/opt/glassfish3/glassfish/modules/endorsed:/opt/glassfish3/glassfish/lib/endorsed
            -Dcom.sun.aas.installRoot=/opt/glassfish3/glassfish
            -Dfelix.fileinstall.bundles.startTransient=true
            -Djava.ext.dirs=/home/jdk1.6.0_24/lib/ext:/home/jdk1.6.0_24/jre/lib/ext:/opt/glassfish3/glassfish/domains/domain1/lib/ext
            -Dfelix.fileinstall.bundles.new.start=true
            -Djavax.net.ssl.trustStore=/opt/glassfish3/glassfish/domains/domain1/config/cacerts.jks
            -Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell,org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell,org.apache.felix.gogo.command
            -Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as
            -Djava.security.auth.login.config=/opt/glassfish3/glassfish/domains/domain1/config/login.conf
            -DANTLR_USE_DIRECT_CLASS_LOADING=true
            -Dgosh.args=--nointeractive
            -Djava.library.path=/opt/glassfish3/glassfish/lib:/home/jdk1.6.0_24/jre/lib/i386/client:/home/jdk1.6.0_24/jre/lib/i386:/home/jdk1.6.0_24/lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib
            com.sun.enterprise.glassfish.bootstrap.ASMain
            -domainname
            domain1
            -asadmin-args
            --host,,,localhost,,,--port,,,4848,,,--secure=false,,,--terse=false,,,--echo=false,,,--interactive=true,,,start-domain,,,--verbose=false,,,--debug=false,,,--domaindir,,,/opt/glassfish3/glassfish/domains,,,domain1
            -instancename
            server
            -verbose
            false
            -debug
            false
            -asadmin-classpath
            /opt/glassfish3/glassfish/modules/admin-cli.jar
            -asadmin-classname
            com.sun.enterprise.admin.cli.AsadminMain
            -upgrade
            false
            -type
            DAS
            -domaindir
            /opt/glassfish3/glassfish/domains/domain1
            -read-stdin
            true
            Mar 31, 2011 7:09:55 AM com.sun.enterprise.admin.launcher.GFLauncherLogger info
            INFO: Successfully launched in 5 msec.
            • 3. Re: Glassfish3.1 cannot start up with jdk1.6.0.24 ?
              handat
              812322 wrote:
              I follow your instructions. and I have tried : 1024, 512, 128, 64, 32.
              You don't have enough physical memory on your box so trying a bigger number is pointless. Also, going so far under the default value is also fruitless since it is just insufficient. Add more memory to your box or use another one with more memory.
              • 4. Re: Glassfish3.1 cannot start up with jdk1.6.0.24 ?
                815325
                Thanks for you suggestions.

                Could you tell me more, what is the minimum memory requirement for glassfish3?

                Instead of adding more memory to my box or use another one with more memory, could I downgrade to use glassfish2 ? it will require low memory? the same question, what is the minimum memory requirement for glassfish2?

                Thanks in advance.
                • 5. Re: Glassfish3.1 cannot start up with jdk1.6.0.24 ?
                  handat
                  You will need at least 1GB of physical memory. It really depends on what else you need to run. Usually you would want to use a database as well for which you will need additional memory if you want to put it on the same box, or put it on another one. I would aim at getting something with at least 4GB. Most decent laptops these days have 4GB, some have even more.