java – 即使端口没有占用,也无法启动Glassfish 3.1 - 代码日志

java – 即使端口没有占用,也无法启动Glassfish 3.1

在新安装的Debian“Squeeze”服务器上启动Glassfish 3.1时遇到麻烦。这是一个已经安装的测试服务器,Glassfish的安装是从一个工作的服务器复制到另一个服务器。

我试过运行:

# ./asadmin start-domain
There is a process already using the admin port 4848 -- it probably is another instance of a GlassFish server.
Command start-domain failed.

我也尝试重新启动域,因为我以为也许是在运行:

# ./asadmin restart-domain
Server is not running, will attempt to start it...
There is a process already using the admin port 4848 -- it probably is another instance of a GlassFish server.
Command restart-domain failed.

在这一点上,我确认Glassfish没有运行,所以我检查了4848端口是否被占用:

# netstat -aon | grep 4848

没有返回。

我怀疑Glassfish是从源服务器复制的,而Glassfish还在运行。也许有一些pid文件或锁文件也被复制了。

关于如何让Glassfish开始的任何建议?

编辑

执行asadmin start-domain命令后,这是domain1中的server.log文件:

Sep 12, 2011 11:18:02 AM com.sun.enterprise.admin.launcher.GFLauncherLogger info
INFO: JVM invocation command line:
/opt/glassfish3/jdk/bin/java
-cp
/opt/glassfish3/glassfish/modules/glassfish.jar
-XX:+UnlockDiagnosticVMOptions
-XX:MaxPermSize=192m
-XX:NewRatio=2
-Xmx512m
-client
-javaagent:/opt/glassfish3/glassfish/lib/monitor/flashlight-agent.jar
-Dosgi.shell.telnet.maxconn=1
-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver
-Dfelix.fileinstall.disableConfigSave=false
-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
-Djava.ext.dirs=/opt/glassfish3/jdk/lib/ext:/opt/glassfish3/jdk/jre/lib/ext:/opt/glassfish3/glassfish/domains/domain1/lib/ext
-Dfelix.fileinstall.bundles.startTransient=true
-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
-DANTLR_USE_DIRECT_CLASS_LOADING=true
-Djava.security.auth.login.config=/opt/glassfish3/glassfish/domains/domain1/config/login.conf
-Dgosh.args=--nointeractive
-Djava.library.path=/opt/glassfish3/glassfish/lib:/opt/glassfish3/jdk/jre/lib/amd64/server:/opt/glassfish3/jdk/jre/lib/amd64:/opt/glassfish3/jdk/lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/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
首先检查$ HOSTNAME和etc / hosts文件配置,不要尝试使用ps aux或netstat -aon找到问题。

> echo $HOSTNAME

回应>服务器(或其他)

> cat /etc/hosts

作为响应,如果您在127.0.0.1之后看不到“$ HOSTNAME”,则将其添加到字符串的末尾。
再次尝试执行start-domain命令。

http://stackoverflow.com/questions/7391466/unable-to-start-glassfish-3-1-even-though-port-not-occupied

本站文章除注明转载外,均为本站原创或编译
转载请明显位置注明出处:java – 即使端口没有占用,也无法启动Glassfish 3.1