0

I'm trying to run GlassFish 3.1.1 on Centos 6 in the Joyent cloud. No matter what I set the admin port to in glassfish/domains/domain1/config/domain.xml, when attempting to start it says:

There is a process already using the admin port XXXXX -- it probably is another instance of a GlassFish server.

I've checked netstat and /etc/services and tried dozens of different ports, but to no avail. It just flat out says that every port I try is taken.

Ideas?

Steve
  • 200

6 Answers6

1

I ended up modifying /etc/hosts to make it work.

Before:

127.0.0.1      localhost localhost.localdomain localhost4 localhost4.localdomain4
::1            localhost localhost.localdomain localhost6 localhost6.localdomain6

After:

199.192.240.10 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1            localhost localhost.localdomain localhost6 localhost6.localdomain6

I'm not really sure why I needed to do that, but it worked.

Disclaimer: This isn't really my IP address - just used it for this example.

Steve
  • 200
1

This symptom occurs if your chosen host name does not resolve.

The host name is defined in /etc/sysconfig/network:

[root@funky glassfish]# cat /etc/sysconfig/network
# general networking
NETWORKING=yes
HOSTNAME=funky
[root@funky glassfish]

Check if you can ping it:

[root@funky glassfish]# ping funky
ping: unknown host funky
[root@funky glassfish]#

If this is not the case and your IP address is static, edit /etc/hosts and add an entry for your hostname:

# IPv4
127.0.0.1 localhost
44.33.222.111 funky

(use 'ifconfig eth0' to determine your ip)

Now ping will succeed and glassfish will start.

bebbo
  • 109
0

I had same issue as above after changing my vm hostname to mydomain.xx.xx from localdomain.localdomain. After reading the comments and answers above, I fixed this issue by adding the new host name in my >/etc/hosts as below

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 mydomain.xx.xx

0

Have you checked your /etc/hosts configuration? it could be that you've recently changed your IP and left something like that ouy? is the hosts file is properly configured? (see Used/blocked ports in Ubuntu). is your hostname, dns working properly?

Ereli
  • 133
0

I've seen similar behavior out of several commercial java apps in the past - it seems to be pretty common to not handle ipv6 capabilities very well, as well as not handling multiple NICs well.

Do use the support@joyent.com guys as a resource - they're there to help, and glassfish is common enough that I'd like to see this Q FAQ-i-fied.

Best,

--e (@ joyent)

0

I have found on a Centos 6 Oracle Xe installation I have to check the following /etc/sysconfig/network:

/etc/hosts
$HOSTNAME

In my case, it was /etc/sysconfig/network host definition conflict that caused the problem. thanks to bebbo

Oracle specific host areas

listener.ora (not always essential but can pertain) tnsnames.ora in SQL+ show parameter local_listener glassfish check the config in defaults.xml

stambata
  • 1,734