12 Replies Latest reply on Jul 22, 2011 3:50 AM by Mike Duffy

    Very Annoying Errors at Startup

    Mike Duffy Newbie

      Please help.

       

      I downloaded the latest and greatest of JBoss:  jboss-6.0.0.Final.

       

      After install on Windows 7 and starting the server, I see the following two errors continuously:

       

      08:29:23,742 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/jmx-console].[HtmlAdaptor]] Servlet.service() for servlet HtmlAdapt

      or threw exception: javax.management.InstanceNotFoundException: jboss.web:type=JspMonitor,name=jsp,WebModule=//localhost/admin-console,J2EEApplication=n

      one,J2EEServer=none is not registered.

              at org.jboss.mx.server.registry.BasicMBeanRegistry.get(BasicMBeanRegistry.java:529) [:6.0.0.GA]

              at org.jboss.mx.server.MBeanServerImpl.getMBeanInfo(MBeanServerImpl.java:677) [:6.0.0.GA]

              at org.jboss.jmx.adaptor.control.Server.getMBeanData(Server.java:98) [:]

              at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet$1.run(HtmlAdaptorServlet.java:357) [:]

              at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet$1.run(HtmlAdaptorServlet.java:354) [:]

              at java.security.AccessController.doPrivileged(Native Method) [:1.6.0_26]

              at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.getMBeanData(HtmlAdaptorServlet.java:353) [:]

              at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.inspectMBean(HtmlAdaptorServlet.java:224) [:]

              at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.processRequest(HtmlAdaptorServlet.java:100) [:]

              at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.doGet(HtmlAdaptorServlet.java:81) [:]

              at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) [:1.0.0.Final]

              at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [:1.0.0.Final]

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324) [:6.0.0.Final]

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]

              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [:6.0.0.Final]

              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) [:6.0.0.Final]

              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181) [:6.0.0.Final]

              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88) [:6.0.0.Final]

              at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100) [:6.0.0.Final]

              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [:6.0.0.Final]

              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [:6.0.0.Final]

              at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) [:6.0.0.Final]

              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [:6.0.0.Final]

              at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53) [:6.0.0.Final]

              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [:6.0.0.Final]

              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [:6.0.0.Final]

              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654) [:6.0.0.Final]

              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951) [:6.0.0.Final]

              at java.lang.Thread.run(Thread.java:662) [:1.6.0_26]

       

      ******************************************************************************************************************************************************

       

       

      09:02:18,188 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/jmx-console].[HtmlAdaptor]] Servlet.service() for servlet HtmlAdapt

      or threw exception: javax.management.MalformedObjectNameException: Invalid character ':' in value part of property

              at javax.management.ObjectName.construct(ObjectName.java:602) [:1.6.0_26]

              at javax.management.ObjectName.<init>(ObjectName.java:1403) [:1.6.0_26]

              at org.jboss.jmx.adaptor.control.Server.getMBeanData(Server.java:97) [:]

              at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet$1.run(HtmlAdaptorServlet.java:357) [:]

              at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet$1.run(HtmlAdaptorServlet.java:354) [:]

              at java.security.AccessController.doPrivileged(Native Method) [:1.6.0_26]

              at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.getMBeanData(HtmlAdaptorServlet.java:353) [:]

              at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.inspectMBean(HtmlAdaptorServlet.java:224) [:]

              at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.processRequest(HtmlAdaptorServlet.java:100) [:]

              at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.doGet(HtmlAdaptorServlet.java:81) [:]

              at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) [:1.0.0.Final]

              at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [:1.0.0.Final]

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324) [:6.0.0.Final]

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]

              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [:6.0.0.Final]

              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) [:6.0.0.Final]

              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181) [:6.0.0.Final]

              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88) [:6.0.0.Final]

              at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100) [:6.0.0.Final]

              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [:6.0.0.Final]

              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [:6.0.0.Final]

              at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) [:6.0.0.Final]

              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [:6.0.0.Final]

              at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53) [:6.0.0.Final]

              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [:6.0.0.Final]

              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [:6.0.0.Final]

              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654) [:6.0.0.Final]

              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951) [:6.0.0.Final]

              at java.lang.Thread.run(Thread.java:662) [:1.6.0_26]

        • 1. Re: Very Annoying Errors at Startup
          Mike Duffy Newbie

          I am starting the server with the -b option to bind the server to the IP address of my workstation.

           

          I was able to stop the first error by going to my C:\Windows\System32\drivers\etc\hosts file and adding the line

           

              192.168.1.108    localhost

           

          If it's not already commented out, make the following change:

           

          #    127.0.0.1       localhost

           

          Note:  On Windows 7 you need to open the hosts file with a notepad.exe launched as the administrator (right click select "Run as Administrator").

           

          The second error, "MalformedObjectNameException: Invalid character ':'", is truly annoying because it shows up in the JBoss discussions for several different reasons, usually when people are trying to deploy EJBs.  In my case, I have no code deployed. 

           

          It is weird that this error occurs every 55 minutes (exactly) when nothing else is running on the server.

          • 2. Re: Very Annoying Errors at Startup
            Peter Johnson Master

            I think that your hosts file changes are throwing things off. localhost and 127.0.0.1 are supposed to be the same. I have never yet needed to edit the hosts file on Windows to get Jboss AS to run properly (Linux, on the other hand, is a different story).

             

            Exactly what value are you passing with the -b option?

            • 3. Re: Very Annoying Errors at Startup
              jaikiran pai Master

              Mike Duffy wrote:

               

               

              It is weird that this error occurs every 55 minutes (exactly) when nothing else is running on the server.

              Enable the AccessLogValve in JBOSS_HOME/server/<servername>/deploy/jbossweb.sar/server.xml:

               

              <!-- Access logger -->
                          <Valve className="org.apache.catalina.valves.AccessLogValve"
                              prefix="localhost_access_log." suffix=".log"
                              pattern="common" directory="${jboss.server.log.dir}" 
                              resolveHosts="false" />
              

               

              This will generate the access logs in the server/<servername>/log folder. When the error occurs every 55 minutes, check what URL is being accessed.

              • 4. Re: Very Annoying Errors at Startup
                Mike Duffy Newbie

                I am binding to the IP address of my workstation:  -b 192.168.1.108

                • 5. Re: Very Annoying Errors at Startup
                  Mike Duffy Newbie

                  Enabling my AccessLogValve was a great suggestion.

                   

                  Here is the entry that triggered the error:

                   

                  66.249.72.27 - - [21/Jul/2011:07:07:34 -0500] "GET /robots.txt HTTP/1.1" 404 983

                  66.249.72.27 - - [21/Jul/2011:07:07:34 -0500] "GET /jmx-console/HtmlAdaptor?action=inspectMBean&name=jboss.web%3Atype%3DConnector%2Cport%3D8009%2Caddress%3D%252F192.168.1.108%3Ejboss.web:type=Connector,port=8009,address=%2F192.168.1.108%3C/a%3E%3C/p%3E%20%20%20%20%3C/pre%3E%20%20%20%3C/td%3E%20%20%3C/tr%3E%20%20%3Ctr%3E%20%20%20%3Ctd%20class= HTTP/1.1" 500 822

                   

                  If you do a WhoIs lookup on 66.249.72.27 the owner of the IP address is Google.

                   

                  Why is Google trying to inspect one of my JBoss MBeans???

                   

                  Is this a good thing or a bad thing???

                   

                  If it helps index my website, then perhaps its a good thing.

                   

                  It's a little bit scary that Google (or anyone else) was able to get the IP address of my workstation on my internal home network.  Is that a security flaw in JBoss or perhaps a misconfig on my Linksys router?

                   

                  Can anyone tell me what is really going on???

                  • 7. Re: Very Annoying Errors at Startup
                    jaikiran pai Master

                    Mike Duffy wrote:

                     

                    Why is Google trying to inspect one of my JBoss MBeans???

                     

                    Is this a good thing or a bad thing???

                    Bad. It shows that your system (including the jmx-console) is exposed to the outside world. See this wiki on what you need to do if you expose your server to the world http://community.jboss.org/wiki/SecureJBoss

                    • 8. Re: Very Annoying Errors at Startup
                      Mike Duffy Newbie

                      Why doesn't JBoss come with security settings set correctly by default?

                       

                      By "correctly", I mean what most people would normally want>

                      • 9. Re: Very Annoying Errors at Startup
                        jaikiran pai Master

                        JBoss AS just binds to localhost by default. So it isn't accessible to the outside world, by default. The admin who makes it accessible to the outside world has to make sure that he takes necessary security measures (like mentioned in that wiki) before publishing it.

                         

                        Furthermore, the EAP (paid) version of JBoss AS has all these security setup enabled by default.

                        • 10. Re: Very Annoying Errors at Startup
                          Mike Duffy Newbie

                          The documentation at the link sent above is more than three years old (JBoss 4.0).

                           

                          Does the following information make sense to anyone (it is not even grammatically correct much less technically correct):

                           

                          To secure the JMX Console using a username/password file -

                          • Locate the  directory.  This will normally be in  directory.
                          • Edit  and uncomment the security-constraint block.
                          • Edit  or  (version >=4.0.2) and  or  (version >=4.0.2) and change the users and passwords to what you desire.  They will need the JBossAdmin role specified in the web.xml file to run the JMX Console.
                          • Edit  and uncomment the security-domain block. The security-domain value of jmx-console maps is declared in the login-config.xml JAAS configuration file which defines how authentication and authorization is done.
                          • 11. Re: Very Annoying Errors at Startup
                            jaikiran pai Master

                            Looking at the version history of that page http://community.jboss.org/wiki/SecureTheJmxConsole it appears like some of the text got cut in a specific version. I'll take a look at fixing it later tonight/tomorrow.

                            • 12. Re: Very Annoying Errors at Startup
                              Mike Duffy Newbie

                              The needed changes turned out to be quite simple.

                               

                              In ...\jboss-6.0.0.Final\conf\props\jmx-console-users.properties change the password for admin

                               

                              In ...\jboss-6.0.0.Final\common\deploy\jmx-console.war\WEB-INF\web.xml uncomment the <security-constraint> element.

                               

                              In ...\jboss-6.0.0.Final\common\deploy\jmx-console.war\WEB-INF\jboss-web.xml uncomment the <security-domain> element.

                               

                              Suggestions:

                               

                                  The out of the box config for JBoss should be secure (just like the enterprise edition is).

                               

                                  There should be a "Quick Start" guide for setting the admin password, etc.

                               

                                  Redhat should do some basic usability testing on the installation and configuration of JBoss. 

                               

                                  The goal should be to make all JBoss processes as easy and as simple as possible.

                               

                              I understand JBoss is free and open-source; however, having a bad open-source version when you are trying to sell enterprise licenses is like doing very bad advertising and demonstrates a, "We don't give a shit.", attitude.

                               

                              FYI:  The company I work for has a high six figure contract with Redhat, so we are supporting the cause.