Wildfly10 - EJB-Remote Client - 没有响应 [英] Wildfly10 - EJB-Remote Client - no response

查看:227
本文介绍了Wildfly10 - EJB-Remote Client - 没有响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将我们的代码从Jboss7迁移到Wildfly10。

服务器本身启动完全正常。
当我们尝试将我们的客户端连接到工作的新的wildfly10服务器进行ejb-remote调用时,它将无法工作。

我唯一能使用的是以下错误:

I'm currently migrating our code from Jboss7 to Wildfly10.
The Server itself starts up totaly fine. When trying to connect our client with the working new wildfly10 server for ejb-remote calls it just won't work.
The only thing I get to work with is the following error:


org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector setupEJBReceivers
WARN:无法注册EJB接收器以连接到remote-ip :8080
java.lang.RuntimeException:操作失败,状态为WAITING
org.jboss.ejb.client.remoting.IoFutureHelper.get(IoFutureHelper.java:94)
at
org.jboss.ejb.client.remoting.ConnectionPool.getConnection(ConnectionPool.java:80)
at
org.jboss.ejb.client.remoting.RemotingConnectionManager.getConnection(RemotingConnectionManager.java:51)
at
org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector.setupEJBReceivers(ConfigBasedEJBClientContextSelector.java:161)
at
org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSele ctor.getCurrent(ConfigBasedEJBClientContextSelector.java:118)
at
org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector.getCurrent(ConfigBasedEJBClientContextSelector.java:47)
at
org。 jboss.ejb.client.EJBClientContext.getCurrent(EJBClientContext.java:281)
at
org.jboss.ejb.client.EJBClientContext.requireCurrent(EJBClientContext.java:291)
at
org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:178)
at
org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:146)
at com.sun.proxy。$ Proxy2.connect(未知来源)at
de.cinovo.rcp.test.RemoteEJBClient.invokeStatelessBean(RemoteEJBClient.java:39)
at de.cinovo.rcp。 test.RemoteEJBClient.main(RemoteEJBClient.java:25)

org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector setupEJBReceivers WARN: Could not register a EJB receiver for connection to remote-ip:8080 java.lang.RuntimeException: Operation failed with status WAITING at org.jboss.ejb.client.remoting.IoFutureHelper.get(IoFutureHelper.java:94) at org.jboss.ejb.client.remoting.ConnectionPool.getConnection(ConnectionPool.java:80) at org.jboss.ejb.client.remoting.RemotingConnectionManager.getConnection(RemotingConnectionManager.java:51) at org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector.setupEJBReceivers(ConfigBasedEJBClientContextSelector.java:161) at org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector.getCurrent(ConfigBasedEJBClientContextSelector.java:118) at org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector.getCurrent(ConfigBasedEJBClientContextSelector.java:47) at org.jboss.ejb.client.EJBClientContext.getCurrent(EJBClientContext.java:281) at org.jboss.ejb.client.EJBClientContext.requireCurrent(EJBClientContext.java:291) at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:178) at org.jboss.ejb.client.EJBInvocationHandler.invoke(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)

线程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.EJBClientInvocationContext@180542f at
org.jboss.ejb.client.EJBClientContext.requireEJBReceiver(EJBClientContext.java:798)
at
org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:128)
at
org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:186)
at
org.jboss.ejb.client.EJBInvocationHandler.sendRequestWithPossibleRetries(EJBInvocationHandler。 java:255)
at
org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:200)
at
org.jboss.ejb.client.EJBInvocationHandler。 doInvoke(EJBInvocationHandler.java:183)
at
org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:146)
at com.sun.proxy。$ Proxy2.connect (未知来源)
de.cinovo.rcp.test.RemoteEJBClient.invokeStatelessBean(RemoteEJBClient.java:39)
at de.cinovo.rcp.test.RemoteEJBClient.main(RemoteEJBClient.java:25)

Exception in thread "main" java.lang.IllegalStateException: EJBCLIENT000025: No EJB receiver available for handling [appName:de.cinovo.tcc.server-ear, moduleName:de-cinovo-tcc-server-ejb-6.0-SNAPSHOT, distinctName:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@180542f at org.jboss.ejb.client.EJBClientContext.requireEJBReceiver(EJBClientContext.java:798) at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:128) at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:186) at org.jboss.ejb.client.EJBInvocationHandler.sendRequestWithPossibleRetries(EJBInvocationHandler.java:255) at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:200) at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:183) at org.jboss.ejb.client.EJBInvocationHandler.invoke(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进行通话。

There is no error, warning, info or anything showing up in the server log, while trying to connect.
There is some action on the port via tcp while watching during a call attempt.

真正有趣的部分是:

如果我在本地机器上使用相同的wildfly设置,完全相同的连接方法有效,但仅在使用 localhost 作为 jboss-ejb-client.properties 中的IP地址时。
一旦我将ip更改为 127.0.0.1 或我当前的IP地址,它将失败并出现与上述相同的错误。

The realy funny part is:
If I use the same wildfly setup on my local machine, the exact same connection method works, but only while using localhost as the ip address within the jboss-ejb-client.properties. As soon as I change the ip into 127.0.0.1 or my current ip address, it will fail with the same error as above.

相关信息:


  • 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>


  • 我的jboss-ejb-client.properties

  • My 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>
    


  • 客户代码

  • Client-Code

    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);
    


  • EJB-Client-Maven-Dependency:

  • 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>
    


  • 任何有相同问题的人知道我做错了什么?

    Anyone out there who had the same problem and knows what I'm doing wrong?

    推荐答案

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

    So for everybody interested, here is the solution to my problem: based on the comment by Steve C and the help of a friend, we figured out that the problem is not server based.

    似乎有一些防病毒程序,只要HTTP升级就会对你的HTTP消息做一些事情。与Wildfly /服务器的协商已经完成。他们似乎操纵发送/接收的包,这导致客户端的问题,因为它不再能够理解答案。
    因此它永远不会反应,因为包看起来已经丢失 - 因此找不到 IoFuture 异常和EJB接收器。

    It appears that there are some antivirus programs, which do something with your HTTP messages, as soon as the HTTP-upgrade negotiations with the Wildfly/server are done. They seem to manipulate the sent/received packages, which leads to the problem in the client, as it is no longer able to understand the answers. Therefore it never gets to react, since the package appears to have been lost - hence the IoFuture exception and EJB receiver not found.

    长话短说:从我们的系统中移除防病毒程序(在我们的案例中为Bitdefender)会导致一切按预期工作......

    Long story short: removing the antivirus program from our systems (in our case Bitdefender) leads to everything working as intended...

    这篇关于Wildfly10 - EJB-Remote Client - 没有响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆