基于Linux GlassFish v3 配置:
download:http://download.java.net/glassfish/3.0.1/release/glassfish-3.0.1.zip
java version:
[root@linux250 bin]# java -version
java version "1.6.0_22"
Java(TM)
SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)
There is a process already using the admin port 4848 -- it probably is another instance of a GlassFish server.
Command start-domain failed.
这个问题是由于/etc/hosts造成的
[root@linux250 bin]# vi /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
linux250
192.168.1.248 mfsmaster
192.168.1.249 drbd249
192.168.1.250 drbd250
这种就不能报错如上,修改为如下
[root@linux250 bin]# vi /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
127.0.0.1 linux250
192.168.1.248 mfsmaster
192.168.1.249 drbd249
192.168.1.250 drbd250
hostname -F /etc/hosts 生效。
启动:[root@linux250 bin]# hostname
192.168.1.250 drbd250
[root@linux250 bin]# ./asadmin start-domain domain1
Waiting for DAS to start ....................................
Started domain: domain1
Domain location: /usr/local/glassfishv3/glassfish/domains/domain1
Log file: /usr/local/glassfishv3/glassfish/domains/domain1/logs/server.log
Admin port for the domain: 4848
Command start-domain executed successfully.
[root@linux250 bin]# pwd
/usr/local/glassfishv3/glassfish/bin