我目前正在将代码从Jboss7迁移到Wildfly10。 服务器本身启动完全正常。当我们尝试将我们的客户端与用于ejb-remote调用的新的wildfly10服务器连接时,它将无法正常工作。 我唯一能使用的是以下错误:
org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector setupEJBReceivers警告:无法注册EJB接收器以连接到remote-ip:8080 java.lang.RuntimeException:操作失败,状态为WAITING,位于org.jboss.ejb.client.remoting。 IoFutureHelper.get(IoFutureHelper.java:94)org.jboss.ejb.client.remoting.ConnectionPool.getConnection(ConnectionPool.java:80)atg.jboss.ejb.client.remoting.RemotingConnectionManager.getConnection(RemotingConnectionManager.java: 51)org.jboss.ejb上的org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector.setupEJBReceivers(ConfigBasedEJBClientContextSelector.java:161)org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector.getCurrent(ConfigBasedEJBClientContextSelector.java:118) .client.remoting.ConfigBasedEJBClientContextSelector.getCurrent(ConfigBasedEJBClientContextSelector.java:47)org.jboss.ejb.client.EJBClientContext.getCurrent(EJBClientContext.java:281)org.jboss.ejb.client.EJBClientContext.requ位于com.sun的org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:146)的org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:178)中的ireCurrent(EJBClientContext.java:291) de.cinovo.rcp.test.RemoteEJBClient.invokeStatelessBean(RemoteEJBClient.java:39)at.cinovo.rcp.test.RemoteEJBClient.main(RemoteEJBClient.java:25)中的.proxy。$ Proxy2.connect(未知来源)
线程“main”中的异常java.lang.IllegalStateException:EJBCLIENT000025:没有EJB接收器可用于处理[appName:de.cinovo.tcc.server-ear,moduleName:de-cinovo-tcc-server-ejb-6.0-SNAPSHOT,distinctName :] org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor)中的org.jboss.ejb.client.EJBClientContext.requireEJBReceiver(EJBClientContext.java:798)中的调用上下文org.jboss.ejb.client.EJBClientInvocationContext@180542f的组合.java:128)org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:186)org.jboss.ejb.client.EJBInvocationHandler.sendRequestWithPossibleRetries(EJBInvocationHandler.java:255)org.jboss.ejb。 org.jboss.ejb.client.EJBInvocationHandler.invoke上的org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:183)中的client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:200)(EJBInvocationHandler.java:146) at com.sun.proxy。$ Proxy2.connect(Unknown Source)at de。 cinovo.rcp.test.RemoteEJBClient.invokeStatelessBean(RemoteEJBClient.java:39)at de.cinovo.rcp.test.RemoteEJBClient.main(RemoteEJBClient.java:25)
尝试连接时,服务器日志中没有出现错误,警告,信息或任何内容。 在呼叫尝试期间通过tcp在端口上执行某些操作。
真正有趣的部分是:
如果我在本地计算机上使用相同的wildfly设置,则完全相同的连接方法有效,但仅在使用localhost
作为jboss-ejb-client.properties
中的ip地址时。一旦我将ip更改为127.0.0.1
或我当前的ip地址,它将失败并出现与上述相同的错误。
相关信息:
standalone.xml
的相关部分
<subsystem xmlns="urn:jboss:domain:remoting:3.0">
<endpoint/>
<http-connector name="http-remoting-connector" connector-ref="default" security-realm="ApplicationRealm"/>
</subsystem>
[...]
<subsystem xmlns="urn:jboss:domain:undertow:3.1">
<buffer-cache name="default"/>
<server name="default-server">
<http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true"/>
[...]
</subsystem>
[...]
<interfaces>
<interface name="public">
<any-address/>
</interface>
</interfaces>
[...]
<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
<socket-binding name="http" interface="public" port="${jboss.http.port:8080}"/>
<socket-binding name="https" port="${jboss.https.port:8443}"/>
[...]
</socket-binding-group>
endpoint.name=client-endpoint
remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED=false
remote.connections=default
remote.connection.default.host=<host-ip>
remote.connection.default.port=8080
remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false
remote.connection.default.username=<usernmae>
remote.connection.default.password=<pswd>
final Hashtable jndiProperties = new Hashtable();
jndiProperties.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
final Context context = new InitialContext(jndiProperties);
[...]
return context.lookup("ejb:" + appName + "/" + moduleName + "/" + distinctName + "/" + beanName + "!" + viewClassName);
<dependency>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-ejb-client-bom</artifactId>
<version>10.1.0.Final</version>
<type>pom</type>
</dependency>
谁有同样的问题,知道我做错了什么?
看起来socket.binding-group中的standalone.xml中缺少定义:
<outbound-socket-binding name="remote-ejb">
<local-destination socket-binding-ref="http"/>
</outbound-socket-binding>
所以对于每个感兴趣的人,这里是我的问题的解决方案:基于comment by Steve C和朋友的帮助,我们发现问题不是基于服务器的。
一旦与Wildfly /服务器进行HTTP升级协商,就会出现一些防病毒程序,这些程序会对您的HTTP消息执行某些操作。他们似乎操纵发送/接收的包,这导致客户端的问题,因为它不再能够理解答案。因此它永远不会反应,因为包看起来已经丢失 - 因此找不到IoFuture
异常和EJB接收器。
简而言之:从我们的系统中移除防病毒程序(在我们的案例中为Bitdefender)会导致一切按预期工作......