Java Jboss 7 服务器的远程连接失败,代理异常

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/19093244/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-12 14:02:17  来源:igfitidea点击:

Remote connection of Jboss 7 server fails with Proxy exception

javadeploymentjbossejbjboss7.x

提问by rockstar

I have a Jboss 7 server running & accepting secure connections on port 443.

我有一个 Jboss 7 服务器在端口 443 上运行并接受安全连接。

All along i was testing locally which was working fine . However now when i make connection attempts i get a

一直以来,我都在本地测试,运行良好。但是现在当我尝试连接时,我得到一个

"javax.naming.NamingException: Failed to create proxy [Root exception is java.lang.IllegalStateException: ..." .

javax.naming.NamingException: Failed to create proxy [Root exception is java.lang.IllegalStateException: ...”。

I tried to follow what is written @ EJB invocations from a remote client using JNDI

我试图遵循使用 JNDI 的远程客户端的@EJB 调用

I guess my jndi.properties & jboss-ejb-client.properties file need changes . I think i got it right but still no success .

我想我的 jndi.properties & jboss-ejb-client.properties 文件需要更改。我想我做对了,但仍然没有成功。

1 ) jndi.properties

1) jndi.properties

java.naming.factory.url.pkgs=org.jboss.ejb.client.naming

2 ) jboss-ejb-client.properties

2) jboss-ejb-client.properties

remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED=false

remote.connections=default

remote.connection.default.host=10.160.148.61
remote.connection.default.port = 4447
remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false

Any suggestions anyone . Making the port 443 also doesnt help .

任何人的任何建议。使端口 443 也无济于事。

My ejb call from the client

我来自客户端的 ejb 调用

    InitialContext aJNDI = new InitialContext();
    Ppi handle = (Ppi) aJNDI
            .lookup("ejb:PPIEAR/PService/PConnect!com.gem.p.PConnection?stateful");

Posting Full stracktrace :

发布完整的跟踪记录:

log4j: Finished configuring.
- JBoss EJB Client version 1.0.5.Final
- XNIO Version 3.0.3.GA
- XNIO NIO Implementation Version 3.0.3.GA
- JBoss Remoting version 3.2.3.GA
- Could not register a EJB receiver for connection to remote://10.160.148.61:4447
java.lang.RuntimeException: Operation failed with status WAITING
    at org.jboss.ejb.client.remoting.IoFutureHelper.get(IoFutureHelper.java:93)
    at org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector.setupEJBReceivers(ConfigBasedEJBClientContextSelector.java:121)
    at org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector.<init>(ConfigBasedEJBClientContextSelector.java:78)
    at org.jboss.ejb.client.EJBClientContext.<clinit>(EJBClientContext.java:77)
    at org.jboss.ejb.client.EJBClient.createSession(EJBClient.java:160)
    at org.jboss.ejb.client.naming.ejb.EjbNamingContext.doCreateProxy(EjbNamingContext.java:135)
    at org.jboss.ejb.client.naming.ejb.EjbNamingContext.createEjbProxy(EjbNamingContext.java:113)
    at org.jboss.ejb.client.naming.ejb.EjbNamingContext.lookup(EjbNamingContext.java:96)
    at javax.naming.InitialContext.lookup(Unknown Source)
..

采纳答案by eis

Quoting this page:

引用此页面

WARN: Could not register a EJB receiver for connection to remote://10.160.148.61:4447 java.lang.RuntimeException: Operation failed with status WAITING

警告:无法注册 EJB 接收器以连接到 remote://10.160.148.61:4447 java.lang.RuntimeException:操作失败,状态为 WAITING

This is commonly caused by a wrong combination of IP or port in the file jboss-ejb-client.properties.

这通常是由文件 jboss-ejb-client.properties 中 IP 或端口的错误组合引起的。

  • You might be unable to reach that host address
  • Maybe you are using a port-offset on that server, so instead of port 4447 you should use 4447 + offset
  • 您可能无法访问该主机地址
  • 也许您正在该服务器上使用端口偏移量,因此您应该使用 4447 + 偏移量而不是端口 4447


You could start by testing if you can connect to your target using telnet:

您可以先测试是否可以使用 telnet 连接到目标:

telnet 10.160.148.61 4447