[Logo] Terracotta Discussion Forums (LEGACY READ-ONLY ARCHIVE)
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
can not monitor the JMX port 9520 while the terracotta run on CentOS  XML
Forum Index -> Terracotta for Web Sessions Go to Page: Previous  1, 2
Author Message
Joy.Cai

journeyman

Joined: 07/19/2007 19:14:55
Messages: 40
Offline


The problem is solved.
thanks.
gkeim

ophanim

Joined: 12/05/2006 10:22:37
Messages: 685
Location: Terracotta, Inc.
Offline

Do you mind telling me how you solved the problem? I would like to be able to help out others that run into the same problem.

Was it related to the network configurations?

Gary Keim (terracotta developer) Want to post to this forum? Join the Terracotta Community
jeg1972

master

Joined: 07/16/2007 12:55:26
Messages: 68
Location: UK
Offline

It appears I have a similar problem... what was the resolution?

John
ari

seraphim

Joined: 05/24/2006 14:23:21
Messages: 1665
Location: San Francisco, CA
Offline

I saw this sort of behavior in the middle of a presentation at JavaOne this year. We later fiddled with my firewall settings on my Mac and it immediately connected.

Sadly, I later could not connect and my firewall was disabled so this was indeed not the problem. But, we suspected the RMI library inside the product that we use to do password authentication of the admin console to the L2.

Right now, I suspect more the localhost port binding. Try running admin console on the same machine as Terracotta's server process and connecting to localhost. Next, screenshot the output of "netstat -a -n" for us, and send us your config files so we can see which port you expect JMX services to bind to and which port they are indeed bound to.

Hopefully, we will all find that the interface on which we are listening for connections can sometimes be too restrictive (localhost instead of * -- all interfaces).

Thanks for your patience,

--Ari
[WWW]
dmangot

journeyman

Joined: 05/24/2006 13:00:33
Messages: 28
Location: San Francisco, USA
Offline

The RMI server will return the address of whatever your hostname(1) is set to for clients connecting remotely.

An easy test (on Unix or Cygwin/CMD.exe):

telnet `hostname` 9520

If the first line says Trying 127... then your machine thinks that hostname is bound to a loopback address and you will not be able to remotely use the Admin console to monitor your Terracotta server. (but it will work fine running the Admin console to localhost on the same machine)

If you would like to resolve this, make sure that whatever name the hostname(1) command returns is resolvable to an external accessible IP address.

Hope that helps.
[WWW] [Yahoo!]
Joy.Cai

journeyman

Joined: 07/19/2007 19:14:55
Messages: 40
Offline

Hi gkeim,

this is my solution:
config the servers like this:
Code:
  <servers>
     <server host="192.168.0.12" name="server1">
       <dso-port>9510</dso-port>
       <jmx-port>9520</jmx-port>
       <data>data/server-data</data>
       <logs>logs/server-logs</logs>
       <l2-group-port>9530</l2-group-port>
       <dso>
         <persistence>
           <mode>permanent-store</mode>
         </persistence>
       </dso>
     </server>
     <!--<server host="192.168.0.13" name="server2">
       <dso-port>9510</dso-port>
       <jmx-port>9520</jmx-port>
       <data>data/server-data</data>
       <logs>logs/server2-logs</logs>
       <l2-group-port>9530</l2-group-port>
       <dso>
         <persistence>
           <mode>permanent-store</mode>
         </persistence>
       </dso>
     </server>-->
     <ha>
       <mode>networked-active-passive</mode>
       <networked-active-passive>
         <election-time>5</election-time>
       </networked-active-passive>
     </ha>
   </servers>
 


config the clients like this:
Code:
 <system>
     <configuration-model>production</configuration-model>
   </system>
   <servers>
     <server host="192.168.0.12">
       <data>data/server-data</data>
       <logs>logs/server-logs</logs>
     </server>
   </servers>
 


and then modify this file start.sh like this:

Code:
 TC_SERVER=192.168.0.12
 TC_CONFIG_PATH="${TC_SERVER}:9510"
 . "${TC_INSTALL_DIR}"/bin/dso-env.sh -q
 


but now I got into another problem that after I use the jdk6,my terracotta client can not success to connect to the terracotta server of 192.168.0.12
why?

thanks.
Joy
jeg1972

master

Joined: 07/16/2007 12:55:26
Messages: 68
Location: UK
Offline

OK, my problem seems the same, I'm running two Terracotta servers on two CentOS 4.5 servers.

I'm using the Windows Administrator Console to connect remotely to the two Terracotta servers due to the fact that X is not installed on the two Linux boxes.

The result of netstat -a -n is:

tcp 0 0 :::9520 :::* LISTEN

When I first tried to run:

telnet `hostname` 9520

I got:

Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.

Which obviously meant I needed to alter the hosts file, which I did and it now resolves to the IP address of the server.

I'm going to reboot the servers and try again and i'll post back to see if that makes any change.

Regards

John
jeg1972

master

Joined: 07/16/2007 12:55:26
Messages: 68
Location: UK
Offline

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

<jmx-port>9520</jmx-port>

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 <jmx-port>9520</jmx-port> to the tc-config.xml

That should solve the problem.

Thanks for the help everyone... now back to my original thread :-)

John
tgautier

seraphim

Joined: 06/05/2006 12:19:26
Messages: 1781
Offline

Well I am glad we know what the problem is and that you are moving forward.

I've added the relevant information into http://jira.terracotta.org/jira/browse/CDV-354.

We'll see if there is anything to be done to make the console work ok on CentOS, if not we'll just know that there is a known issue with CentOS with an easy workaround.
[WWW]
gkeim

ophanim

Joined: 12/05/2006 10:22:37
Messages: 685
Location: Terracotta, Inc.
Offline

Hi Joy.Cai,

Don't use the shell variable TC_SERVER because that is used to specify that a client should connect to a particular server regardless of what the configuration states, useful for running the samples on multiple nodes to prove that Terracotta works!

http://www.terracotta.org/confluence/display/docs1/Multi-node+Setup

Change it to something like TC_SERVER_HOST.

Gary Keim (terracotta developer) Want to post to this forum? Join the Terracotta Community
Joy.Cai

journeyman

Joined: 07/19/2007 19:14:55
Messages: 40
Offline

OK,thanks.
 
Forum Index -> Terracotta for Web Sessions Go to Page: Previous  1, 2
Go to:   
Powered by JForum 2.1.7 © JForum Team