users@glassfish.java.net

Re: NodeAgent + multi-homed WinXP + JMX Connector URL confusion

From: <glassfish_at_javadesktop.org>
Date: Wed, 12 Nov 2008 08:00:30 PST

Hi again,
  Well, most of the info about how I created the node-agent is in my original post, but I'll boil it down here.
  First, the physical layout is simple enough: I have a DAS stand-alone server instance running on machine DAS (which happens to be a multi-homed linux box), then I have a bunch of physical machines (all Windows XP, all have 2 NICs). On each machine I will have a node-agent which will ultimately manage a single stand-alone instance. I am doing this configuration for management and monitoring purposes only, meaning there is NOT a cluster here and there is no load-balancing or failover. I don't think much of this matters really though...
  The real problem is the multiple NICs on the Windows machines and configuring the NodeAgents.

I used this create-node-agent command to set up the node-agent:
c:\glassfish\bin\asadmin.bat create-node-agent --interactive=false --host
DASHOST --port 4848 --user ADMINUSER --passwordfile
c:\glassfish\glassfish.txt --savemasterpassword=true --agentproperties
listenaddress=192.168.3.191:remoteclientaddress=192.168.3.191%computername%-node-agent

Initial rendezvous works just fine, ie I see the node-agent show up in the DAS admin console.

Here is the contents of the nodeagent.properties file that is generated:
#Node Agent Connection Properties
#Thu Oct 30 13:19:46 EDT 2008
agent.bind.status=BOUND
agent.adminPort=3130
agent.root=C\:\\glassfish\\nodeagents
agent.protocol=rmi_jrmp
agent.doNotConfirmServerCert=true
agent.client.host=192.168.3.191
agent.adminHost=192.168.3.191

Now, when I try to start up the node-agent using:
c:\glassfish\bin\asadmin.bat start-node-agent --user ADMINUSER
--passwordfile c:\glassfish\glassfish.txt %computername%-node-agent

I get the following trouble in the server.log file:

[#|2008-10-30T11:53:06.312-0400|WARNING|sun-appserver9.1|javax.ee.enterprise.system.nodeagent|_ThreadID=10;_ThreadName=main;|NAGT0003:An exception has occurred during the initialization of the NodeAgent.
[b]java.io.IOException: Cannot bind to URL [rmi://SL-XAV:2918/management/rmi-jmx-connector]:[/b]
javax.naming.ServiceUnavailableException [Root exception is
java.rmi.ConnectException: Connection refused to host: SL-XAV; nested
exception is:
java.net.ConnectException: Connection refused: connect]
...

For the life of me, I don't know why the [u]hostname[/u] is used to construct this URL instead of consulting the nodeagent.properties file and using the agent.client.host or agent.adminHost properties.

Hope that makes sense.
J
[Message sent by forum member 'jstalker' (jstalker)]

http://forums.java.net/jive/thread.jspa?messageID=316313