简体   繁体   English

JBOSS部署中出错javax.management.InstanceNotFoundException

[英]Error in JBOSS deployment javax.management.InstanceNotFoundException

I'm having an issue very strange in my enviroment wich is jboss-5.1.0.GA java version "1.6.0_33" Java(TM) SE Runtime Environment (build 1.6.0_33-b03) Java HotSpot(TM) 64-Bit Server VM (build 20.8-b03, mixed mode) 我的环境问题非常奇怪jboss-5.1.0.GA java版“1.6.0_33”Java(TM)SE运行时环境(版本1.6.0_33-b03)Java HotSpot(TM)64位服务器VM(内置20.8-b03,混合模式)

It was completely functional until I update a version of some jar (wich was tested in 6 enviroments before this one without the error) in the context. 直到我在上下文中更新某个jar的版本(在这个没有错误之前在6个环境中测试过)之前它才完全正常工作。 before the error i had this files: 错误之前我有这个文件:

server/default/deploy/myfolder 服务器/ default / deploy目录/ MyFolder文件

-rw-r--r--  1 jboss users  808430 May 16 17:29 s-c-core-2.38.6.0.jar
-rw-r--r--  1 jboss users  555328 May 16 17:29 s-c-dao-2.38.6.0.jar
drwxr-xr-x  9 jboss users    4096 Jun  3 20:11 s-c-web.war
-rw-r--r--  1 jboss users  199259 May  2 16:58 s-com-core-2.38.5.0.jar
-rw-r--r--  1 jboss users  202086 May  2 16:58 s-com-dao-2.38.5.0.jar
-rw-r--r--  1 jboss users 1333612 May  2 16:58 s-com-domain-2.38.5.0.jar
-rw-r--r--  1 jboss users   86526 May  2 16:58 s-com-util-2.38.5.0.jar
-rw-r--r--  1 jboss users  660621 May 11 13:01 s-fin-core-2.38.6.0.jar
-rw-r--r--  1 jboss users  559292 May 11 13:01 s-fin-dao-2.38.6.0.jar
drwxr-xr-x  8 jboss users    4096 May 15 21:41 s-fin-web.war
-rw-r--r--  1 jboss users  108444 May  7 07:29 s-geio-engine-2.38.5.0.jar
drwxr-xr-x  8 jboss users    4096 May 15 21:24 s-geio-web.war
-rw-r--r--  1 jboss users   71975 Jun 14  2012 s-o-core-1.1.4.0.jar
-rw-r--r--  1 jboss users   66516 Jun 14  2012 s-o-dao-1.1.4.0.jar
-rw-r--r--  1 jboss users   53532 Jun 14  2012 s-o-domain-1.1.4.0.jar
-rw-r--r--  1 jboss users   16347 Jun 14  2012 s-o-util-1.1.4.0.jar
drwxr-xr-x  5 jboss users    4096 Jun 14  2012 s-o-web.war
-rw-r--r--  1 jboss users   54588 Apr 10 11:29 s-p-core-2.38.2.0.jar
-rw-r--r--  1 jboss users   35784 Apr 10 11:29 s-p-dao-2.38.2.0.jar
drwxr-xr-x  8 jboss users    4096 Apr 10 19:20 s-p-web.war
-rw-r--r--  1 jboss users   69140 Jun 14  2012 s-s-se-1.1.0.jar
-rw-r--r--  1 jboss users  594214 May 13 13:36 s-ser-core-2.38.6.1.jar
-rw-r--r--  1 jboss users  530903 May 13 13:36 s-ser-dao-2.38.6.1.jar
drwxr-xr-x  9 jboss users    4096 May 15 21:58 s-ser-web.war
drwxr-xr-x  6 jboss users    4096 May 28 08:27 s-te-me.war
-rw-r--r--  1 jboss users  155639 May 15 22:06 s-uni-core-2.38.5.0.jar
-rw-r--r--  1 jboss users  145944 May 15 22:05 s-uni-dao-2.38.5.0.jar
drwxr-xr-x  7 jboss users    4096 May 15 21:20 s-uni-web.war

then I stop my jboss (/etc/init.d/jbossd stop) and update just theese three files/folder (deleting the old ones and putting the new ones) 然后我停止我的jboss(/etc/init.d/jbossd停止)并更新theese三个文件/文件夹(删除旧文件和新文件)

-rw-r--r--  1 jboss users  808430 May 16 17:29 s-c-core-2.38.7.0.jar
-rw-r--r--  1 jboss users  555328 May 16 17:29 s-c-dao-2.38.7.0.jar
drwxr-xr-x  9 jboss users    4096 Jun  3 20:11 s-c-web.war

after server start with the user root and with the command "/etc/init.d/jbossd start" at some point the users start to use applications and on the log file server/default/log/server.log start to appear some strange errors like this: 服务器启动后用户root并用命令“/etc/init.d/jbossd start”在某个时刻用户开始使用应用程序并在日志文件server / default / log / server.log上启动出现一些奇怪的像这样的错误:

2013-06-04 00:01:30,615 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/jmx-console].[HtmlAdaptor]] (http-0.0.0.0-80-3) Servlet.service() for servlet HtmlAdaptor threw exception
javax.management.InstanceNotFoundException: jboss.j2ee:jar=s-c-core-2.38.6.0.jar,name=ApCarBusinessImpl,service=EJB3 is not registered.
      at org.jboss.mx.server.registry.BasicMBeanRegistry.get(BasicMBeanRegistry.java:526)
      at org.jboss.mx.server.MBeanServerImpl.getMBeanInfo(MBeanServerImpl.java:675)
      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)
      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: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 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.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.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:383)
      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:619)

Saying that the EJBs are not instantiated (lots of then) but nothing happens to the user, the application keep working normally 如果说EJB没有实例化(很多时候),但用户没有任何反应,应用程序会继续正常工作

So I start to verify if the file sc-core-2.38.6.0.jar wasn't left behind in some folder inside my jboss and NO it didn't. 所以我开始验证文件sc-core-2.38.6.0.jar是不是留在了我的jboss里面的某个文件夹中,而不是没有。 So I start to think that is some kind of cache that the jboss was reading so I stop the service and delete the folders server/default/tmp and server/default/work and restart the server but the error keep going on the log. 所以我开始认为这是jboss正在读取的某种缓存所以我停止服务并删除文件夹server / default / tmp和server / default / work并重新启动服务器,但错误继续记录日志。

My run.conf is with this configuration: 我的run.conf使用以下配置:

JAVA_OPTS="-DSB_BASE=$SB_BASE -Dmodulo.context.file=s-o-core-context.xml;s-com-core-context.xml;s-ser-core-context.xml;s-geio-core-context.xml;s-fin-core-context.xml;s-c-core-context.xml;s-uni-core-context.xml;s-p-core-context.xml -Xmx3072m -Xms768m -XX:MaxPermSize=256m -Xss1024k -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -XX:+UseConcMarkSweepGC -Djava.awt.headless=true"

I tried a lot of things like user permissions, folder permissions, memory configurations (xmx xms) and the error keep appearing in the log file. 我尝试了很多东西,比如用户权限,文件夹权限,内存配置(xmx xms),并且错误一直出现在日志文件中。

When I came back to the files that I changed ( sc- -2.38.6.0 ) the application stop to show this error, so I obviously though that the erro is with that package then I applyed it on a mirror server and the error does'nt show up. 当我回到我更改的文件(sc- -2.38.6.0 )时,应用程序停止显示此错误,所以我很明显,错误是使用该包然后我将它应用于镜像服务器上并且错误确实'出现了。

So I am without options right now. 所以我现在没有选择。 The application is working fine for the user but the error keep appearing in the log and this is very annoying. 应用程序对用户工作正常,但错误仍然出现在日志中,这非常烦人。

Has someone here experienced something like this? 这里有人经历过这样的事吗?

I've posted this question on community.jboss.org 2 days ago with no help: 我在2天前在community.jboss.org上发布了这个问题,没有任何帮助:

Thanks in advance, sorry about my english. 在此先感谢,对不起我的英语。

The error basically implies that JBoss was unable to find the service MBean in its tree. 该错误基本上意味着JBoss无法在其树中找到服务MBean。 Do you see that service deployed in the jmx-console? 您是否看到在jmx-console中部署了该服务?

You are seeing the InstanceNotFoundException: jboss.j2ee:jar=sc-core-2.38.6.0.jar,name=ApCarBusinessImpl,service=EJB3 is not registered because: 您将看到InstanceNotFoundException: jboss.j2ee:jar=sc-core-2.38.6.0.jar,name=ApCarBusinessImpl,service=EJB3 is not registered因为:

Some external service/tool/app or your own application is trying to invoke that particular service ( name=ApCarBusinessImpl,service=EJB3 ). 某些外部服务/工具/应用程序或您自己的应用程序正在尝试调用该特定服务( name=ApCarBusinessImpl,service=EJB3 )。 Since JBoss cant find it deployed anywhere (as a result of you updating the deployed JAR), it simply logs the message that it couldn't find the MBean that it was asked to invoke. 由于JBoss无法在任何地方找到它(因为您更新了已部署的JAR),因此它只是记录了它无法找到要求它调用的MBean的消息。

To resolve the issue you will need to find out who is making the request on the old service name ( jboss.j2ee:jar=sc-core-2.38.6.0.jar ) and have it updated to point to the new service name. 要解决此问题,您需要找出谁在旧服务名称上发出请求( jboss.j2ee:jar=sc-core-2.38.6.0.jar )并将其更新为指向新服务名称。 This should resolve seeing those exception log messages. 这应该解决看到这些异常日志消息。

Edit by Jorge Campos: 由Jorge Campos编辑:

As @Coolbeans said it was indeed a external service that was calling my beans started on JBoss. 正如@Coolbeans所说,确实是一个外部服务,我在JBoss上调用了我的bean。 I found out that in the installed jboss was a security issue that was not properly configured (jmx-console). 我发现在已安装的jboss中存在未正确配置的安全问题(jmx-console)。 So, there was a worm that was making requests to a previosly installed beans in my application server (some kind of cache). 因此,有一种蠕虫在我的应用程序服务器(某种缓存)中向一个预先安装的bean发出请求。 After some digging inside the jboss installation I find this war iesvc.war which is a worm as stated in this thread https://community.jboss.org/blogs/mjc/2011/10/20/statement-regarding-security-threat-to-jboss-application-server 在jboss安装中进行了一些挖掘后,我发现这个war iesvc.war是一个蠕虫,如本线程中所述https://community.jboss.org/blogs/mjc/2011/10/20/statement-regarding-security-threat -to-的JBoss应用服务器

The worm is JAVA_JBOSSPY.A identified by a trend micro office scan. 蠕虫是JAVA_JBOSSPY.A由趋势微型办公室扫描识别。

So thank you for the answer @Coolbeans you were right it was a "Some external service/tool/app" as you said. 所以,谢谢你的回答@Coolbeans你是对的,正如你所说的那样是“一些外部服务/工具/应用程序”。

This is sometimes caused by the PU name. 这有时是由PU名称引起的。 Try to change the PU name to another name, clean and build and deploy. 尝试将PU名称更改为其他名称,清理并构建和部署。

Regards 问候

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM