即使端口没有被占用,也无法启动Glassfish 3.1 [英] Unable to start Glassfish 3.1 even though port not occupied
问题描述
我在新设置的DebianSqueeze服务器上启动 Glassfish 3.1
时遇到问题。这是一个已经设置的测试服务器,并且 Glassfish
安装已从工作服务器复制到另一台服务器。
I'm having trouble starting Glassfish 3.1
on a newly setup Debian "Squeeze" server. This is a testing server that has been setup and the Glassfish
installation was copied from a working server to this other server.
我试过运行:
# ./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.
我也尝试重新启动域名,因为我认为它可能正在运行:
I also tried restarting the domain because I thought maybe it was running:
# ./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是否被占用:
At this point I confirmed that Glassfish
was not running so I checked to see if port 4848 was occupied:
# netstat -aon | grep 4848
没有返回任何内容。
我怀疑 Glassfish
是从源服务器复制的,而 Glassfish
仍然在运行。也许有某种pid文件或锁定文件也被复制了。
I have suspicion that Glassfish
was copied from the source server while Glassfish
was still running. Maybe there is some sort of pid file or lock file that was copied over as well.
关于如何获得 Glassfish的任何建议
开始?
修改
这是<$ c $执行 asadmin start-domain
命令后,c> server.log 来自 domain1
的文件:
Here's the server.log
file from domain1
after executing the asadmin start-domain
command:
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的问题。
First of all check the $HOSTNAME and the etc/hosts file configuration , not try to find a problem with ps aux or netstat -aon .
> echo $HOSTNAME
response> server(或etc)
response > server (or etc)
> cat /etc/hosts
作为回应,如果你在127.0.0.1之后看不到$ HOSTNAME然后添加它结束了字符串。
再次尝试执行start-domain命令。
in response if you cannot see "$HOSTNAME" after 127.0.0.1 then add it end of the string . Try again to execute the start-domain command.
这篇关于即使端口没有被占用,也无法启动Glassfish 3.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!