Wildfly10 - EJB-Remote Client - 无响应

Tho*_*oph 9 java wildfly wildfly-10

我目前正在将代码从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.requ的org.jboss.ejb.client.EJBClientContext.getCurrent(EJBClientContext.java:281)位于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)的.proxy.$ Proxy2.connect(未知来源)at de.cinovo.rcp.test.RemoteEJBClient.main(RemoteEJBClient.java:25)

线程"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作为IP地址jboss-ejb-client.properties.一旦我将ip更改为127.0.0.1或当前的ip地址,它将失败并出现与上述相同的错误.

相关信息:

  • Wildfly将在端口8080上响应telnet
  • Wildfly是唯一一款在8080上收听的服务
  • 我的/ etc/hosts配置正确
  • 更改端口不能解决问题
  • Wildfly版本10.1.0.Final
  • 来自我的相关部分 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>
    
    Run Code Online (Sandbox Code Playgroud)
  • 我的jboss-ejb-client.properties

    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>
    
    Run Code Online (Sandbox Code Playgroud)
  • 客户代码

    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);
    
    Run Code Online (Sandbox Code Playgroud)
  • EJB-Client-Maven-Dependency:

    <dependency>
        <groupId>org.wildfly</groupId>
        <artifactId>wildfly-ejb-client-bom</artifactId>
        <version>10.1.0.Final</version>
        <type>pom</type>
    </dependency>
    
    Run Code Online (Sandbox Code Playgroud)

谁有同样的问题,知道我做错了什么?

小智 5

看起来socket.binding-group中的standalone.xml中缺少定义:

<outbound-socket-binding name="remote-ejb">
  <local-destination socket-binding-ref="http"/>
</outbound-socket-binding>
Run Code Online (Sandbox Code Playgroud)


Tho*_*oph 2

因此,对于感兴趣的每个人,这里是我的问题的解决方案:根据Steve C 的评论和朋友的帮助,我们发现问题不是基于服务器的。

似乎有一些防病毒程序会在与 Wildfly/服务器的 HTTP 升级协商完成后立即对您的 HTTP 消息执行某些操作。他们似乎操纵了发送/接收的包,这导致客户端出现问题,因为它不再能够理解答案。因此它永远不会做出反应,因为包似乎已丢失 - 因此IoFuture未找到异常和 EJB 接收器。

长话短说:从我们的系统中删除防病毒程序(在我们的例子中是 Bitdefender)会导致一切按预期运行......