JBoss 5 Deploy

227 views
Skip to first unread message

BobG

unread,
Sep 12, 2011, 8:00:55 PM9/12/11
to psi-probe-discuss
Greetings,

Basic environment: RHEL 5.6 / JDK jdk1.6.0_23 / JBoss 5.1.0.GA

We have been using PSI-Probe for some time within our deployed JBoss 4
environment. We have recently updated to JBoss 5 and I am unable to
get PSI-Probe properly configured for our JBoss 5 environment. The
stack trace I get upon startup is as follows:

2011-09-12 16:00:17,430 INFO
[org.jboss.web.tomcat.service.deployers.TomcatDeployment] (main)
deploy, ctxPath=/
2011-09-12 16:00:17,483 INFO
[org.jboss.web.tomcat.service.deployers.TomcatDeployment] (main)
deploy, ctxPath=/jmx-console
2011-09-12 16:00:18,321 INFO
[org.jboss.web.tomcat.service.deployers.TomcatDeployment] (main)
deploy, ctxPath=/probe
2011-09-12 16:00:18,338 ERROR
[org.jboss.web.tomcat.service.deployers.JBossContextConfig] (main) XML
error parsing: WEB-INF/context.xml
org.jboss.xb.binding.JBossXBException: Failed to parse source: Logger
not found as a child of Context in unordered_sequence: Listener*
Parameters* Valve* SessionCookie? Loader? Manager? Realm? attributes?
InstanceListener* Resources?
at
org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:
203)
.... (MORE Follows - Can Add if needed)

2011-09-12 16:00:18,575 ERROR
[org.apache.catalina.startup.ContextConfig] (main) Marking this
application unavailable due to previous error(s)
2011-09-12 16:00:18,576 ERROR
[org.apache.catalina.core.StandardContext] (main) Context [/probe]
startup failed due to previous errors
2011-09-12 16:00:18,579 ERROR
[org.jboss.kernel.plugins.dependency.AbstractKernelController] (main)
Error installing to Start: name=jboss.web.deployment:war=/probe
state=Create mode=Manual requiredState=Installed
org.jboss.deployers.spi.DeploymentException: URL file:/opt/
jboss-5.1.0.GA/server/production/tmp/5c4o455u-p97f26-gsi2116m-1-
gsi22x9y-ap/probe.war/ deployment failed

Per the JBoss installation instructions, I have defined the
Application Policy by making the edit to login.xml (this file lives in
our deployed directory structure @ /opt/jboss/server/production/conf
(we use a jboss link for the full jboss-5.1.0.GA path) and I have
moved in the related probe-users and probe-properties files to the /
opt/jboss/server/production/conf/props directory).

Also per the JBoss installation instructions, I have placed the
probe.war in the /opt/jboss-5.1.0.GA/server/production/deploy/
directory.

I can't seem to find the appropriate jboss-service.xml file to for the
"privileged context" entry within our deployed directory and
application structure. As a possible reference for assistance, I have
provided the grep results of the various jboss-service.xml files that
exist within our environment and please note I have attempted to add
the "privileged context" setting in a number of those files but
without any success: (greped listing as follows:

/opt/jboss-5.1.0.GA/server/production/deploy/httpha-invoker.sar/META-
INF/jboss-service.xml
/opt/jboss-5.1.0.GA/server/production/deploy/httpha-invoker.sar/META-
INF/jboss-service.xml.PSS2_ORIG
/opt/jboss-5.1.0.GA/server/production/deploy/jmx-remoting.sar/META-INF/
jboss-service.xml
/opt/jboss-5.1.0.GA/server/production/deploy/juddi-service.sar/META-
INF/jboss-service.xml
/opt/jboss-5.1.0.GA/server/production/deploy/management/console-
mgr.sar/META-INF/jboss-service.xml
/opt/jboss-5.1.0.GA/server/production/deploy/snmp-adaptor.sar/META-INF/
jboss-service.xml
/opt/jboss-5.1.0.GA/server/production/deploy/uuid-key-generator.sar/
META-INF/jboss-service.xml

Any help on how I might get PSI-Probe to run within our JBoss 5
environment would be greatly appreciated.

Thanks.

-bobg

Mark

unread,
Sep 13, 2011, 1:16:07 AM9/13/11
to psi-prob...@googlegroups.com
My apologies.  The installation instructions on the wiki are for earlier versions of JBoss and are apparently in need of updates.  Editing jboss-service.xml may not be necessary, but there might be some other changes you need to make.  Can you try the following steps?
  1. Undeploy probe.
  2. Open the probe.war file in a ZIP editor.
  3. Remove the <Logger> element from both META-INF/context.xml and WEB-INF/context.xml.
  4. Remove jmxri-1.2.1.jar from WEB-INF/lib.
  5. Redeploy the modified .war file.
Let me know how this works out.  Based on your experience, I'd like to update the installation instructions.  Thanks!

BobG

unread,
Sep 13, 2011, 1:28:34 PM9/13/11
to psi-probe-discuss
Mark,

I have followed your steps below, just finished and it definitely
cleared the previously noted error and obviously I did not have any
jboss-service.xml file edited per the older instructions.
Unfortunately I did blow out with an exception when I attempted to
point the web browser with the below noted trace. I am concerned that
I may not have completely reversed everything I had touched in my
efforts
to get it running so I am going to start "fresh" and make sure that I
did not have something stale left over. I will updated on my
progress. In the meantime below is the trace on logging into Psi-
Probe:

nulljava.lang.NullPointerException
at
com.googlecode.psiprobe.controllers.apps.ListWebappsController.handleRequestInternal(ListWebappsController.java:
38)
at
org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:
153)
at
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:
48)
at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:
875)
at com.googlecode.psiprobe.ProbeServlet.doDispatch(ProbeServlet.java:
53)
at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:
807)
at
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:
571)
at
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:
501)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
206)
at
com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:
39)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
206)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:
638)
at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:
444)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:
382)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:
310)
at
org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:
696)
at
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:
667)
at jsp.index_jsp._jspService(jsp.index_jsp:43)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
206)
at
com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:
118)
at
com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:
52)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
206)
at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:
96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
235)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:
191)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:
190)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:
525)
at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:
92)
at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:
126)
at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:
70)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
102)
at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:
158)
at
org.jboss.web.tomcat.service.sso.ClusteredSingleSignOn.invoke(ClusteredSingleSignOn.java:
711)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:
330)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:
829)
at org.apache.coyote.http11.Http11Protocol
$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:
447)
at java.lang.Thread.run(Thread.java:662)


Thank you very much for responding and for your updated JBoss 5
instructions.

-bobg

On Sep 12, 10:16 pm, Mark <malfunctio...@gmail.com> wrote:
> My apologies.  The installation instructions on the wiki are for earlier
> versions of JBoss and are apparently in need of updates.  Editing
> jboss-service.xml may not be necessary, but there might be some other
> changes you need to make.  Can you try the following steps?
>
>    1. Undeploy probe.
>    2. Open the probe.war file in a ZIP editor.
>    3. Remove the <Logger> element from both META-INF/context.xml and
>    WEB-INF/context.xml.
>    4. Remove jmxri-1.2.1.jar from WEB-INF/lib.
>    5. Redeploy the modified .war file.

Mark

unread,
Sep 13, 2011, 3:10:20 PM9/13/11
to psi-prob...@googlegroups.com
Bob, if you got that far, you're in a much better position than you were.  If probe threw an exception, it means Probe is running.  I've seen that exception before, and starting fresh probably won't fix it.

That exception can show up when the ServerInfo returned by the server doesn't match up with with what PSI Probe is expecting from supported servers.  Sometimes people override their ServerInfo for security reasons (1).  Can you determine what your ServerInfo is?  Probe is expecting it to have "JBoss Web 2.1" at the beginning, but there may a case sensitivity issue (2).  Please let me know if it's "JBoss" or "Jboss" in your ServerInfo.  Thanks!

1. https://www.owasp.org/index.php/Securing_tomcat#Common (see the item discussing ServerInfo.properties)

BobG

unread,
Sep 14, 2011, 5:30:12 PM9/14/11
to psi-probe-discuss
Mark,

Sorry for the delayed response / update: I only get to pursue the fun
(or maybe not so fun stuff depending upon my level of success) stuff
as production support permits. I have spoken to our Build Engineer
about what we may or may not be touching with respect to the base JB5
deploy objects that we then move into "our production" deploy
directories. We don't touch any of the ServerInfo objects (I have
only been able to find ServerInfo.jsp objects in either the default or
our production directories) and we definitely don't modify or touch
any of those files. It occurred to me that the trace that I sent you
from the browser connection to probe actually cuts off part of the
exception. I have included that below in the event it provides some
kind of clue as to what I may be doing wrong. Take a look and see if
it helps you point me in the right direction. I love PSI-Probe and
have grown very reliant on it for our existing JB4 servers and can't
imagine not having it for our JB5 production servers. Anyhow, my next
trick is to see if I can get PSI-Probe running in a default (non
modified for our application objects and directory changes) instance
of JB5 and then do a directory / object scan to see what we may be
missing in our production deploy (I am presuming that I can get PSI-
Probe running in a base default JB5 deploy!)

The stack trace I mentioned earlier: (This is the trace from the
server.log when I log in to PSI-Probe):

2011-09-14 14:07:46,815 ERROR [org.apache.catalina.core.ContainerBase.
[jboss.web].[localhost].[/probe].[probe]] (http-0.0.0.0-8080-4)
Servlet.service() for servlet probe threw exception
672)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:
330)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:
829)
at org.apache.coyote.http11.Http11Protocol
$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:
447)
at java.lang.Thread.run(Thread.java:662)

Again, thanks for your continued assistance and insights.

-bobg

Mark

unread,
Sep 14, 2011, 11:23:00 PM9/14/11
to psi-prob...@googlegroups.com
Thanks for including the full stack trace.  The really important bit was at the top of the first one, but you can never have too many details.  I'm sorry it's taken this long to track things down.

Since I don't have a bunch of different environments where I can test Probe, I've largely relied on others for compatibility testing.  Unfortunately, Probe was not fully tested on JBoss 5, so fixing this issue may require changes to Probe.  I'm prepared to make these changes if necessary and include them in a patch release for you.

To do this however, I need some information from you.  Could you include your ServerInfo string here?  Even if you haven't changed it, I'd like to check it against what Probe is expecting.  It's possible Probe has had the wrong string for JBoss 5 this whole time.

Thanks!
Reply all
Reply to author
Forward
0 new messages