[jboss-user] [Beginners Corner] - Re: How to reliably count active sessions (re-post)

mrgordonz do-not-reply at jboss.com
Tue Sep 9 18:58:26 EDT 2008


Hi Peter,

The installation of JBoss in this case is bundled with an application (Saba), and the Saba engineers have "tweaked" JBoss such that it listens on port 1098, not 1099.  I have no idea why they did this, but when I check to see which ports are open (ie: being listened on), JBoss is listening on port 1098, not 1099.  

Here is what happens when I try it using the default port:

D:\SabaWeb\JBoss_Tomcat\bin>twiddle -s localhost get "jboss.web:host=localhost,path=/Saba,type=Manager" activeSessions
  | 08:48:16,204 ERROR [Twiddle] Exec failed
  | org.jboss.util.NestedRuntimeException: Could not obtain connection to any of these urls: localhost and discovery failed with error:
  | javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out]; - nested throwable: (javax.naming.CommunicationException: Could not obtain connection to any of these  urls: localhost and discovery failed with error:
  | javax.naming.CommunicationException: Receive timed out [Root exception  is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]])
  |         at org.jboss.console.twiddle.Twiddle$1.getServer(Twiddle.java:143)
  |         at org.jboss.console.twiddle.command.MBeanServerCommand.getMBeanServer(MBeanServerCommand.java:59)
  |         at org.jboss.console.twiddle.command.GetCommand.execute(GetCommand.java:149)
  |         at org.jboss.console.twiddle.Twiddle.main(Twiddle.java:305)
  | Caused by: javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]]
  |         at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1414)
  |         at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:594)
  |         at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
  |         at javax.naming.InitialContext.lookup(InitialContext.java:347)
  |         at org.jboss.console.twiddle.Twiddle.createMBeanServerConnection(Twiddle.java:250)
  |         at org.jboss.console.twiddle.Twiddle.connect(Twiddle.java:268)
  |         at org.jboss.console.twiddle.Twiddle.access$300(Twiddle.java:62)
  |         at org.jboss.console.twiddle.Twiddle$1.getServer(Twiddle.java:139)
  |         ... 3 more
  | Caused by: javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]
  |         at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:269)
  |         at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1385)
  |         ... 10 more
  | Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused: connect]
  |         at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:243)
  |         ... 11 more
  | Caused by: java.net.ConnectException: Connection refused: connect
  |         at java.net.PlainSocketImpl.socketConnect(Native Method)
  |         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
  |         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
  |         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
  |         at java.net.Socket.connect(Socket.java:464)
  |         at java.net.Socket.connect(Socket.java:414)
  |         at java.net.Socket.<init>(Socket.java:310)
  |         at java.net.Socket.<init>(Socket.java:212)
  |         at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:84)
  |         at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:77)
  |         at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:239)
  |         ... 11 more

Perhaps the changed port number is what is causing twiddle to sit there and do nothing - I've tried letting it go for a coupe of hours and it never returns a result.

Cheers,

Paul

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4175444#4175444

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4175444



More information about the jboss-user mailing list