3 Replies Latest reply on Jan 9, 2018 3:43 AM by peter craddock

    remote ejb lookup over http using a proxy server

    peter craddock Novice

      I have recently found a couple of issues that have been fixed these are

       

      Problem with http invocation of ejb and wildfly 11 rmi over http  now I have the fixes in place I have tried to invoke the ejb's from behind a proxy server these requests are failing.

       

      I have set up the proxy server on ced12212 on port 3128 and this server can see the server hosting the ejbs on ghvh01.coa.local:4500

       

      If I invoke my client program from the proxy server all works as expected, now if I invoke the client program from another client machine that does not know how to connect to the server it fails as below.

       

      I have passed the proxy params as follows -Dhttp.proxyHost=ced12212 -Dhttp.proxyPort=3128

       

      14:31:21,538 INFO  [naming] WildFly Naming version 1.0.7.Final

      14:31:21,687 INFO  [security] ELY00001: WildFly Elytron version 1.1.6.Final

       

       

      junit.framework.AssertionFailedError

      at com.cedar.cp.tests.util.ConnectionTest.test001localConnection(ConnectionTest.java:64)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:86)

      at org.junit.runner.JUnitCore.run(JUnitCore.java:137)

      at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:68)

       

       

      javax.naming.CommunicationException: Connection timed out: no further information [Root exception is java.net.ConnectException: Connection timed out: no further information]

      at org.wildfly.httpclient.naming.HttpRootContext.performOperation(HttpRootContext.java:336)

      at org.wildfly.httpclient.naming.HttpRootContext.lambda$processInvocation$0(HttpRootContext.java:257)

      at org.wildfly.httpclient.naming.HttpRootContext.performWithRetry(HttpRootContext.java:173)

      at org.wildfly.httpclient.naming.HttpRootContext.processInvocation(HttpRootContext.java:234)

      at org.wildfly.httpclient.naming.HttpRootContext.processInvocation(HttpRootContext.java:228)

      at org.wildfly.httpclient.naming.HttpRootContext.lookupNative(HttpRootContext.java:110)

      at org.wildfly.naming.client.AbstractContext.lookup(AbstractContext.java:84)

      at org.wildfly.naming.client.WildFlyRootContext.lookup(WildFlyRootContext.java:144)

      at javax.naming.InitialContext.lookup(InitialContext.java:417)

       

      I get a permission issue if the client knows the server host but I turn on the firewall.

       

      jaikiran do I need to set different properties to get the xnio to use the proxy

        • 1. Re: remote ejb lookup over http using a proxy server
          jaikiran pai Master

          I haven't checked the code to see how that's dealt with. Maybe swd847 or dmlloyd might be able to tell.

          • 2. Re: remote ejb lookup over http using a proxy server
            Stuart Douglas Master

            Forward proxies are not currently supported, only reverse proxies (i.e. load balancers).

            • 3. Re: remote ejb lookup over http using a proxy server
              peter craddock Novice

              Thanks for the reply I have tailed the proxy logs and enabled the firewall on my local machine as you say no traffic is passed via the proxy and I have put the exception below in case its of any interest. If you let me know when this is implemented ill retest

               

              Collaborative Planning Error:

              Internal processing error

              Stack Trace:

              com.cedar.cp.api.base.CPException: Permission denied: no further information

                  at com.cedar.cp.ejb.api.base.AbstractSession.unravelException(AbstractSession.java:121)

                  at com.cedar.cp.ejb.api.logon.LogonServer.authenticateUser(LogonServer.java:130)

                  at com.cedar.cp.impl.base.CPConnectionImpl.<init>(CPConnectionImpl.java:237)

                  at com.cedar.cp.impl.base.ConnectionFactory.getConnection(ConnectionFactory.java:16)

                  at com.cedar.cp.api.base.DriverManager.getConnection(DriverManager.java:71)

                  at com.cedar.cp.api.base.DriverManager.getConnection(DriverManager.java:45)

                  at com.cedar.cp.tc.main.MainFrame$1.login(MainFrame.java:98)

                  at com.cedar.cp.tc.main.MainFrame.openConnection(MainFrame.java:947)

                  at com.cedar.cp.tc.main.MainFrame.splashInit(MainFrame.java:123)

                  at com.cedar.cp.tc.main.MainFrame$2.run(MainFrame.java:145)

                  at java.awt.event.InvocationEvent.dispatch(Unknown Source)

                  at java.awt.EventQueue.dispatchEventImpl(Unknown Source)

                  at java.awt.EventQueue.access$500(Unknown Source)

                  at java.awt.EventQueue$3.run(Unknown Source)

                  at java.awt.EventQueue$3.run(Unknown Source)

                  at java.security.AccessController.doPrivileged(Native Method)

                  at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)

                  at java.awt.EventQueue.dispatchEvent(Unknown Source)

                  at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)

                  at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)

                  at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)

                  at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

                  at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

                  at java.awt.EventDispatchThread.run(Unknown Source)

              Caused by: java.net.SocketException: Permission denied: no further information

                  at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)

                  at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source)

                  at org.xnio.nio.WorkerThread$ConnectHandle.handleReady(WorkerThread.java:327)

                  at org.xnio.nio.WorkerThread.run(WorkerThread.java:591)

                  at ...asynchronous invocation...(Unknown Source)

                  at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:570)

                  at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:536)

                  at org.jboss.remoting3.ConnectionInfo$None.getConnection(ConnectionInfo.java:82)

                  at org.jboss.remoting3.ConnectionInfo.getConnection(ConnectionInfo.java:55)

                  at org.jboss.remoting3.EndpointImpl.doGetConnection(EndpointImpl.java:487)

                  at org.jboss.remoting3.EndpointImpl.getConnectedIdentity(EndpointImpl.java:433)

                  at org.jboss.remoting3.UncloseableEndpoint.getConnectedIdentity(UncloseableEndpoint.java:51)

                  at org.wildfly.naming.client.remote.RemoteNamingProvider.getFuturePeerIdentityPrivileged(RemoteNamingProvider.java:151)

                  at org.wildfly.naming.client.remote.RemoteNamingProvider.lambda$getFuturePeerIdentity$0(RemoteNamingProvider.java:138)

                  at java.security.AccessController.doPrivileged(Native Method)

                  at org.wildfly.naming.client.remote.RemoteNamingProvider.getFuturePeerIdentity(RemoteNamingProvider.java:138)

                  at org.wildfly.naming.client.remote.RemoteNamingProvider.getPeerIdentity(RemoteNamingProvider.java:126)

                  at org.wildfly.naming.client.remote.RemoteNamingProvider.getPeerIdentityForNaming(RemoteNamingProvider.java:106)

                  at org.wildfly.naming.client.remote.RemoteNamingProvider.getPeerIdentityForNaming(RemoteNamingProvider.java:53)

                  at org.wildfly.naming.client.NamingProvider.getPeerIdentityForNamingUsingRetry(NamingProvider.java:105)

                  at org.wildfly.naming.client.remote.RemoteNamingProvider.getPeerIdentityForNamingUsingRetry(RemoteNamingProvider.java:91)

                  at org.wildfly.naming.client.remote.RemoteContext.lambda$lookupNative$0(RemoteContext.java:189)

                  at org.wildfly.naming.client.NamingProvider.performExceptionAction(NamingProvider.java:222)

                  at org.wildfly.naming.client.remote.RemoteContext.performWithRetry(RemoteContext.java:100)

                  at org.wildfly.naming.client.remote.RemoteContext.lookupNative(RemoteContext.java:188)

                  at org.wildfly.naming.client.AbstractFederatingContext.lookup(AbstractFederatingContext.java:74)

                  at org.wildfly.naming.client.AbstractFederatingContext.lookup(AbstractFederatingContext.java:60)

                  at org.wildfly.naming.client.WildFlyRootContext.lookup(WildFlyRootContext.java:144)

                  at javax.naming.InitialContext.lookup(Unknown Source)

                  at com.cedar.cp.ejb.api.logon.LogonServer.getRemote(LogonServer.java:52)

                  at com.cedar.cp.ejb.api.logon.LogonServer.authenticateUser(LogonServer.java:112)

                  ... 22 more