[英]glashfish 4.1 not start on ubuntu server 14.04
I follow http://www.lyonlabs.org/howto/howdoi-glassfish.html to install Glassfish 4.1 on Ubuntu 14.04 server. 我按照http://www.lyonlabs.org/howto/howdoi-glassfish.html在Ubuntu 14.04服务器上安装Glassfish 4.1。
But when I try to start glassfish server it show: remote server does not listen for requests on [localhost:4848] is the server up 但是,当我尝试启动glassfish服务器时,它显示:远程服务器不监听[localhost:4848]上的请求是服务器
Thanks 谢谢
GlassFish doesn't need to be installed. 不需要安装GlassFish。 All you need to do is download the ZIP file, extract to the right directory, then run
$GF_HOME/bin/asadmin start-domain
. 您需要做的就是下载ZIP文件,解压缩到正确的目录,然后运行
$GF_HOME/bin/asadmin start-domain
。
The output should look like this: 输出应如下所示:
mike@mike-ProLiant/opt/glassfish/glassfish-4.1$ bin/asadmin start-domain
Waiting for domain1 to start ...
Successfully started the domain : domain1
domain Location: /opt/glassfish/glassfish-4.1/glassfish/domains/domain1
Log File: /opt/glassfish/glass
There are a few ways to find out if the server is up. 有几种方法可以确定服务器是否已启动。
You can run jps -l
: 你可以运行
jps -l
:
mike@mike-ProLiant/opt/glassfish/glassfish-4.1$ jps -l
12540 sun.tools.jps.Jps
12301 com.sun.enterprise.glassfish.bootstrap.ASMain
You can see the GlassFish process there is 12301
"ASMain". 你可以看到GlassFish进程有
12301
“ASMain”。
jps
is a tool which comes with the JDK, so if you don't have it, or you don't have your path set up correctly and can't find it, you can use ps aux
and grep
the output for ASMain
: jps
是JDK附带的工具,所以如果你没有它,或者你没有正确设置你的路径而找不到它,你可以使用ps aux
和grep
输出ASMain
:
mike@mike-ProLiant/opt/glassfish/glassfish-4.1$ ps aux | grep ASMain
mike 12301 5.2 1.4 5125688 363452 pts/16 Sl 17:07 0:14 /usr/lib/jvm/java-7-oracle/bin/java -cp /opt/glassfish/glassfish-4.1/glassfish/modules/glassfish.jar -XX:+UnlockDiagnosticVMOptions -XX:MaxPermSize=192m -XX:NewRatio=2 -Xmx512m -client -javaagent:/opt/glassfish/glassfish-4.1/glassfish/lib/monitor/flashlight-agent.jar -Dfelix.fileinstall.disableConfigSave=false -Djavax.net.ssl.keyStore=/opt/glassfish/glassfish-4.1/glassfish/domains/domain1/config/keystore.jks -Djava.awt.headless=true -Dcom.ctc.wstx.returnNullForDefaultNamespace=true -Dfelix.fileinstall.poll=5000 -Djava.endorsed.dirs=/opt/glassfish/glassfish-4.1/glassfish/modules/endorsed:/opt/glassfish/glassfish-4.1/glassfish/lib/endorsed -Dfelix.fileinstall.bundles.startTransient=true -Djavax.net.ssl.trustStore=/opt/glassfish/glassfish-4.1/glassfish/domains/domain1/config/cacerts.jks -Djavax.xml.accessExternalSchema=all -Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as -Djava.security.auth.login.config=/opt/glassfish/glassfish-4.1/glassfish/domains/domain1/config/login.conf -DANTLR_USE_DIRECT_CLASS_LOADING=true -Dgosh.args=--nointeractive -Dosgi.shell.telnet.maxconn=1 -Djdbc.drivers=org.apache.derby.jdbc.ClientDriver -Dfelix.fileinstall.dir=/opt/glassfish/glassfish-4.1/glassfish/modules/autostart/ -Dosgi.shell.telnet.port=6666 -Djava.security.policy=/opt/glassfish/glassfish-4.1/glassfish/domains/domain1/config/server.policy -Dfelix.fileinstall.log.level=2 -Dcom.sun.aas.instanceRoot=/opt/glassfish/glassfish-4.1/glassfish/domains/domain1 -Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory -Dosgi.shell.telnet.ip=127.0.0.1 -Dcom.sun.aas.installRoot=/opt/glassfish/glassfish-4.1/glassfish -Djava.ext.dirs=/usr/lib/jvm/java-7-oracle/lib/ext:/usr/lib/jvm/java-7-oracle/jre/lib/ext:/opt/glassfish/glassfish-4.1/glassfish/domains/domain1/lib/ext -Dfelix.fileinstall.bundles.new.start=true -Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell,org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell,org.apache.felix.gogo.command,org.apache.felix.shell.remote,org.apache.felix.fileinstall -Djdk.corba.allowOutputStreamSubclass=true -Djava.library.path=/opt/glassfish/glassfish-4.1/glassfish/lib:/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,,,--watchdog=false,,,--debug=false,,,--domaindir,,,/opt/glassfish/glassfish-4.1/glassfish/domains,,,domain1 -instancename server -verbose false -debug false -asadmin-classpath /opt/glassfish/glassfish-4.1/glassfish/lib/client/appserver-cli.jar -asadmin-classname com.sun.enterprise.admin.cli.AdminMain -upgrade false -type DAS -domaindir /opt/glassfish/glassfish-4.1/glassfish/domains/domain1 -read-stdin true
mike 12608 0.0 0.0 18932 932 pts/16 S+ 17:12 0:00 grep --color=auto ASMain
You should get at least two entries. 你应该至少得到两个条目。 One is the actual GlassFish process, and will be really long, the other will be the command you just ran (since it has
ASMain
in it). 一个是实际的GlassFish进程,并且将非常长,另一个将是您刚刚运行的命令(因为它中包含
ASMain
)。
Another useful way to see if GlassFish is up is to check if it's bound to the right ports with netstat
: 查看GlassFish是否已启动的另一种有用方法是检查它是否与
netstat
绑定到正确的端口:
mike@mike-ProLiant/opt/glassfish/glassfish-4.1$ sudo netstat -lntp
[sudo] password for mike:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:3000 0.0.0.0:* LISTEN 28775/nodejs
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 1119/master
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 5305/cupsd
tcp6 0 0 :::25 :::* LISTEN 1119/master
tcp6 0 0 :::7676 :::* LISTEN 12301/java
tcp6 0 0 :::8686 :::* LISTEN 12301/java
tcp6 0 0 :::4848 :::* LISTEN 12301/java
tcp6 0 0 :::8080 :::* LISTEN 12301/java
tcp6 0 0 :::3700 :::* LISTEN 12301/java
tcp6 0 0 :::8181 :::* LISTEN 12301/java
tcp6 0 0 ::1:631 :::* LISTEN 5305/cupsd
So you can see above that port 4848
is bound by a process, and that the process is 12301/java
which we saw earlier was GlassFish. 所以你可以看到上面的端口
4848
被一个进程绑定,并且进程是12301/java
,我们之前看到的是GlassFish。
Make sure you sudo
the command ( sudo netstat -lntp
) because the p
at the end needs super-user privileges. 确保你
sudo
命令( sudo netstat -lntp
),因为最后的p
需要超级用户权限。 It's the important one which tells us the name of the process, so we can see that it's Java. 它是告诉我们进程名称的重要部分,因此我们可以看到它是Java。
Today I done some searching and get same Issue on https://www.stagejava.net/forum/topic/glassfish/glassfish/issues-starting-glassfish-server according to this issue. 今天我做了一些搜索,并根据这个问题在https://www.stagejava.net/forum/topic/glassfish/glassfish/issues-starting-glassfish-server上获得相同的问题。 If you give wrong option to
Asadmin
then this error message are come. 如果您给
Asadmin
提供了错误的选项, Asadmin
此错误消息。 I correct option and try it work. 我正确选择并尝试它的工作。 thanks to all.
谢谢大家。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.