Win a copy of Fixing your Scrum this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

Is JBoss running?

 
Ranch Hand
Posts: 838
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is the easiest way to check to see if JBoss is indeed running? Thanks.

Rob
 
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Some options

* Hit the url http://localhost:8080 to see if you get a response - most obvious

* You can telnet localhost 8080 and see if it connects

* If you are in *nix you can do a ps -ef | grep java to see if you get any results

* If you are crashdows you can do a tasklist to see if java is running

Enjoy !!
 
Rob Hunter
Ranch Hand
Posts: 838
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the reply. If you go to localhost:8080 would you not get the JBoss configuration page or something related to it? This is disabled on the server I'm trying to test it on. Is there a particular jsp in JBoss that I can try connecting to instead? Thanks.
 
Venkatraman Kandaswamy
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In that case you should try accessing the JMX port that JBoss exposes. There are lot of open source tools : JMX tools available. Heres an example of how to do this : web page
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Be careful about using the JMX port to tell if the server is running. The JNDI port and JMX ports are open long before the HTTP port is available, and if you are running on a slow machine (or your check is running very quickly), HTTP might not be available.

Note that I am assuming that the definition of "the server is up" means "http is ready and available".

By the way, are you looking for a manual way to check is the server is up, or an automated way? If automated, successfully connecting to the http port should be enough to tell it is up - you don't need to ask for anything.
 
Author
Posts: 198
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you are checking from the same machine, you might consider not disabling the administrative apps, but rather just binding them too the loopback address, allowing them to only be accessed when you're physically on the machine.
 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there any way by which java code can know the jboss server is started completely(that is showing message - started in ... sec) or not?
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
http://community.jboss.org/wiki/StartupAndDeploymentCheck
 
Rancher
Posts: 2759
32
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The solution really depends on what you mean by "Jboss is up"

Do you mean the process has started? Do ps -ef Or ping the JMX port
Do you mean that the web server is up? Ping 8080
Do you mean that your webapp is up? You can always have a healthcheck action/webservice/REST in your webapp that should be available when your webapp is initialized. Try to call that page and when it gives an OK response, your webapp is up
Do you want to check that your webapp can connect to databases/web services/external resources? You can have your healthcheck service to run some self tests and report the result
 
Sham Phadtale
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Jaikiran...
How can I get output of the command "twiddle get "jboss.system:type=Server" Started" in java code? I want to check the status(server started or not) and accordingly want to take some actions.
Sorry it is java specific question, I will ask it on another thread.


Thanks Jayesh..
For me Jboss is up means there is message on console - "JBoss (Microcontainer) [null] Started in 1m:57s:515ms"

 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic