Search code examples
javaeclipsejbossjboss-tools

JBoss Tools Remote Launch with sh script


I have a configured JBoss 5.1 server that has to be started and stopped by a dedicated .sh script.

I tried adding server to Eclipse via JBoss Tools and specifying the start and stop commands. However, because the script output is dots when waiting for server to start and a line from log if server started, JBoss Tools does not detect that server started (still displaying starting... and then timeout).

What to change in script output to make JBoss Tools recognize that server has started?

Output of script looks like this:

me@pc:~/jboss$ ./cluster-admin.sh start
Starting server 
===> Waiting for server to start 
...............
2015-04-16 15:25:50,680 INFO  
[org.jboss.bootstrap.microcontainer.ServerImpl] (main) JBoss  
[5.1.0.GA] Started in 19s:70ms

Solution

  • However, because the script output is dots when waiting for server to start and a line from log if server started, JBoss Tools does not detect that server started

    This isn't the reason the tools can't detect the server has started. The tools do not parse server output to detect server state.

    If you double-click on your server in the Servers View, you can see inside the server editor a section named Server State Detectors or something similar.

    If your server's startup poller is set to "Web Port Poller", then the tools are trying to open a URL Connection to {host}:{webport}. The host can be found in the "General Information" section of the server editor, while the port can be found in the "Server Ports" section.

    If your server's startup poller is set to JMX Poller, then you'll need to make sure your remote server has exposed it's JMX ports in it's configuration files and startup flags to the world so the tools can attempt to connect, which may not be a good idea for a production server or even a development server outside of your intranet.