• Bug
  • Status: Closed
  • 2 Major
  • Resolution: Fixed
  • hhuynh
  • Reporter: tgautier
  • July 31, 2007
  • 0
  • Watchers: 0
  • September 06, 2007
  • August 09, 2007

Description

This is the second time on the forums someone has reported problems connecting the admin console remotely.


I’m having a problem connecting remotely to the Terracotta servers with the Admin Console… It is running on port 9520

2007-07-31 08:13:27,379 INFO - JMX Server started. Authentication OFF - Available at URL[service:jmx:rmi:///jndi/rmi://localhost:9520/jmxrmi]

but I can’t connect remotely… is the JMX server configured for communication from localhost only?

Can we check into this to ensure that running our server on windows and on rhel is able to be connected to by a remote host?

Comments

Gary Keim 2007-07-31

If, on the server host:

% telnet `hostname` 9520

… shows that it’s connecting to a local 127.* address, then you won’t be able to monitor the Terracotta Server remotely.

The result of the hostname(1) command must be an externally resolvable address if you hope to be able to connect from a remote AdminConsole.

Taylor Gautier 2007-08-01

Latest information from a forum user:


Well, I rebooted the servers, explicitly added the following into both config files:

9520

Started everything up as normal, and now I can successfully connect the Administrator Console to the remote Terracotta servers.

So, the only things that I have changed are:

1) Make sure the /etc/hosts entry isn’t like the default CentOS installation which is:

127.0.0.1 hostname.domain.local hostname localhost.domain localhost

I changed it to:

127.0.0.1 localhost.domain localhost 192.168.1.X hostname.domain.local hostname

2) Explicitly add 9520 to the tc-config.xml

That should solve the problem.

Thanks for the help everyone… now back to my original thread

John

Taylor Gautier 2007-08-01

So it seems the way we open a port doesn’t work well with CentOS. I’d like to see if there’s anything to be done about it, or if it’s just an oddity of CentOS with a known workaround.

Fiona OShea 2007-08-01

Assigning back to Taylor to talk to Gary about this

Dave Mangot 2007-08-01

The oddity isn’t really with CentOS at all. It also has nothing to do with the way that we open ports other than that we use an RMI server. The RMI server returns whatever hostname(1) resolves to back to remote clients. Depending on how you do your Linux install (on the network, on a desktop, etc) you may wind up with only a loopback address in /etc/hosts after the install. If this is the case then the RMI server will not work remotely for you.

The test is as Gary describes. The solution is to fix the networking so it is correct for a machine that is operating on a TCP/IP network.

This is not particular to CentOS, we’ve seen it on SuSE and reproduced it reliably on Fedora.

Taylor Gautier 2007-08-01

According to Gary, the RMI server that we start /correctly/ uses the hostname configured for the machine. Unfortunately, a good portion of the world does not have their hostname correctly configured and this is the root cause of the problem.

Our old mechanism which was in place before we added authentication (which required the use of the RMI server) seemed to not have these issues, since it used a slightly different mechanism for opening the port (we have no choice of how the RMI server opens the port - we just get to tell it the port and that is it).

Therefore, Gary suggests using the old mechanism when no authentication has been specified, so the common case will work in variety of correctly and/or incorrectly configured machines.

The (slightly more uncommon) case of using authentication will require the machine to be configured correctly, but that is a reasonable restriction given the nature of enabling authentication for a given host.

Assigning to Gary to enable the fix.

Gary Keim 2007-08-09

If a server isn’t using authentication, the old JMXMP connector is used. JMX Messaging Protocol just routes requests over TCP using Java serialization. JMXMP is part of the jmxremote_optional, which is NOT shipped with J2SE.

If a server is using authentication, the JMX RMI connector is used. An in-process RMI registry is started at the TC JMX port (9520) and a connector stub is bound to “jmx.”