2013-09-25 34 views
0

啓動服務器glassfish時出現問題。當我開始加載大約1分鐘,然後立即發送下面引用的錯誤消息。啓動時出錯Glassfish(errno = 22)

Glassfish的域配置:

<java-config debug-options="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9009" system-classpath="" classpath-suffix=""> 
    <jvm-options>-Djava.awt.headless=true</jvm-options> 
    <jvm-options>-XX:+AggressiveOpts</jvm-options> 
    <jvm-options>-Djava.security.policy=${com.sun.aas.instanceRoot}/config/server.policy</jvm-options> 
    <jvm-options>-Xmn1500m</jvm-options> 
    <jvm-options>-XX:+UseLargePages</jvm-options> 
    <jvm-options>-Dfelix.fileinstall.disableConfigSave=false</jvm-options> 
    <jvm-options>-Dosgi.shell.telnet.maxconn=1</jvm-options> 
    <jvm-options>-Dfelix.fileinstall.poll=5000</jvm-options> 
    <jvm-options>-XX:NewRatio=2</jvm-options> 
    <jvm-options>-Djava.endorsed.dirs=${com.sun.aas.installRoot}/modules/endorsed${path.separator}${com.sun.aas.installRoot}/lib/endorsed</jvm-options> 
    <jvm-options>-Dosgi.shell.telnet.port=6666</jvm-options> 
    <jvm-options>-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory</jvm-options> 
    <jvm-options>-Djava.ext.dirs=${com.sun.aas.javaRoot}/lib/ext${path.separator}${com.sun.aas.javaRoot}/jre/lib/ext${path.separator}${com.sun.aas.instanceRoot}/lib/ext</jvm-options> 
    <jvm-options>-XX:+UseParallelOldGC</jvm-options> 
    <jvm-options>-XX:PermSize=2048m</jvm-options> 
    <jvm-options>-Dgosh.args=--nointeractive</jvm-options> 
    <jvm-options>-Dwebconsole.type=properties</jvm-options> 
    <jvm-options>-Djava.rmi.server.hostname=localhost</jvm-options> 
    <jvm-options>-Dwebconsole.jms.url=tcp://localhost:61616</jvm-options> 
    <jvm-options>-Djavax.management.builder.initial=com.sun.enterprise.v3.admin.AppServerMBeanServerBuilder</jvm-options> 
    <jvm-options>-Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as</jvm-options> 
    <jvm-options>-XX:MaxPermSize=4096m</jvm-options> 
    <jvm-options>-XX:LargePageSizeInBytes=2048k</jvm-options> 
    <jvm-options>-XX:+UnlockDiagnosticVMOptions</jvm-options> 
    <jvm-options>-XX:ParallelGCThreads=16</jvm-options> 
    <jvm-options>-Dwebconsole.jmx.url=service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi</jvm-options> 
    <jvm-options>-Dfelix.fileinstall.bundles.startTransient=true</jvm-options> 
    <jvm-options>-Dfelix.fileinstall.bundles.new.start=true</jvm-options> 
    <jvm-options>-Dfelix.fileinstall.dir=${com.sun.aas.installRoot}/modules/autostart/</jvm-options> 
    <jvm-options>-Djava.security.auth.login.config=${com.sun.aas.instanceRoot}/config/login.conf</jvm-options> 
    <jvm-options>-Dosgi.shell.telnet.ip=127.0.0.1</jvm-options> 
    <jvm-options>-Dfelix.fileinstall.log.level=2</jvm-options> 
    <jvm-options>-Djavax.net.ssl.keyStore=${com.sun.aas.instanceRoot}/config/keystore.jks</jvm-options> 
    <jvm-options>-server</jvm-options> 
    <jvm-options>-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver</jvm-options> 
    <jvm-options>-DAllowMediatedWriteInDefaultFetchGroup=true</jvm-options> 
    <jvm-options>-Djavax.net.ssl.trustStore=${com.sun.aas.instanceRoot}/config/cacerts.jks</jvm-options> 
    <jvm-options>-Dcom.sun.enterprise.server.ss.ASQuickStartup=false</jvm-options> 
    <jvm-options>-Xms2048m</jvm-options> 
    <jvm-options>-DANTLR_USE_DIRECT_CLASS_LOADING=true</jvm-options> 
    <jvm-options>-Xmx5020m</jvm-options> 
    <jvm-options>-XX:+UseTLAB</jvm-options> 
    <jvm-options>-XX:+UseParallelGC</jvm-options> 
    </java-config> 

錯誤描述:

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

Java HotSpot(TM) 64-Bit Server VM warning: Failed to reserve shared memory (errno = 22). 
Java HotSpot(TM) 64-Bit Server VM warning: Failed to reserve shared memory (errno = 22). 
Launching GlassFish on Felix platform 

Exception: java.lang.NullPointerException thrown from the UncaughtExceptionHandler in thread "Grizzly-kernel-thread(1)" 

Exception: java.lang.NullPointerException thrown from the UncaughtExceptionHandler in thread "Grizzly-kernel-thread(1)" 

Command start-domain failed. 

如果有人知道我能做些什麼來解決這個問題將有助於我很多東西。

謝謝!

回答

1

當您使用-XX:+UseLargePages並且沒有更多的HugePages可用或它們對當前用戶不可訪問時,會發生此問題。

你可以看到,如果大頁面是,如果你運行可用:cat /proc/meminfo(在* nix)

嘗試取出JVM選項,看看是否有幫助。 In the debian wiki你可以得到一些關於HugePages的詳細信息以及如何使用它們。

+0

謝謝!我刪除參數「-XX:+ UseLargePages」並工作 –