Glassfish在ubuntu 12.04启动时失败

Glassfish在ubuntu 12.04启动时失败,ubuntu,amazon-ec2,ubuntu-12.04,glassfish-3,Ubuntu,Amazon Ec2,Ubuntu 12.04,Glassfish 3,升级到ubuntu 12.04的最新版本后。我的glassfish启动脚本在启动时失败 以下是my boot.log的相关部分: Error starting domain XXXYYY. The server exited prematurely with exit code 0. Before it died, it produced the following output: ..... adName=Grizzly-kernel-thread(1);|doSelect IOExcepti

升级到ubuntu 12.04的最新版本后。我的glassfish启动脚本在启动时失败

以下是my boot.log的相关部分:

Error starting domain XXXYYY.
The server exited prematurely with exit code 0.
Before it died, it produced the following output:
.....
adName=Grizzly-kernel-thread(1);|doSelect IOException
java.net.BindException: No free port within range: 8181=com.sun.enterprise.v3.services.impl.monitor.MonitorableSSLSelectorHandler@19e2595
......
[#|2014-05-28T09:08:28.639-0500|SEVERE|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=1;_ThreadName=main;|Shutting down v3 due to startup exception : No free port within range: 80=com.sun.enterprise.v3.services.impl.monitor.MonitorableSelectorHandler@197e2a6|#]
但是,当我从控制台sudo service glassfish start运行命令时,服务启动良好

这是我的初始化脚本:

### BEGIN INIT INFO
# Provides:          scriptname
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start daemon at boot time
# Description:       Enable service provided by daemon.
### END INIT INFO

#!/bin/sh
#
# glassfish init script for Linux
# Simplest possible case -- no password file, one default domain
# it would be simple to add such options

GLASSFISH_HOME=${GLASSFISH_HOME:-"/home/glassfish"}

case "$1" in
start)
    $GLASSFISH_HOME/bin/asadmin start-domain XXXYYY >/dev/null
    ;;
stop)
    $GLASSFISH_HOME/bin/asadmin stop-domain XXXYYY >/dev/null
    ;;
restart)
    $GLASSFISH_HOME/bin/asadmin restart-domain XXXYYY >/dev/null
    ;;
\*)
    echo "usage: $0 (start|stop|restart|help)"
esac

我将感谢任何帮助

最后,我使用sudo update rc.d-f glassfish remove删除启动服务,并将脚本的执行添加到/etc/rc.local文件中

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

exit 0

/etc/init.d/glassfish start

我认为你的
要求的启动
行是错误的,在网络启动之前触发了鱼的启动,这是它绝对不喜欢的。看一看,他们使用
#必需的开始:$local\u fs$remote\u fs$network$syslog$named
。谢谢。我做了更改并调整了您的脚本,但出现了相同的错误:[#| 2014-05-28311:34:04.311-0500 |严重| glassfish3.1.2 | javax.enterprise.system.core.com.sun.enterprise.v3.server | u ThreadID=1;| u ThreadName=main;|由于启动异常而关闭v3:范围内没有可用端口:8081=com.sun.enterprise.v3.services.impl.monitor。MonitorableSSLSelectorHandler@d6cffa|#]