I follow http://www.lyonlabs.org/howto/howdoi-glassfish.html to install Glassfish 4.1 on Ubuntu 14.04 server.
But when I try to start glassfish server it show: remote server does not listen for requests on [localhost:4848] is the server up
Thanks
I follow http://www.lyonlabs.org/howto/howdoi-glassfish.html to install Glassfish 4.1 on Ubuntu 14.04 server.
But when I try to start glassfish server it show: remote server does not listen for requests on [localhost:4848] is the server up
Thanks
GlassFish doesn't need to be installed. All you need to do is download the ZIP file, extract to the right directory, then run $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
:
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".
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
:
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).
Another useful way to see if GlassFish is up is to check if it's bound to the right ports with 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.
Make sure you sudo
the command (sudo netstat -lntp
) because the p
at the end needs super-user privileges. It's the important one which tells us the name of the process, so we can see that it's 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. If you give wrong option to Asadmin
then this error message are come. I correct option and try it work.
thanks to all.