2 Replies Latest reply on Oct 16, 2014 3:52 PM by Manoj Agarwal

    Jboss application not able to make TCP connection

    Manoj Agarwal Newbie

      Hi,

       

      I have a webapp running on Jboss EAP 6.3 on my Windows machine. This webapp is not able to make a TCP connection to the coherence cache running on the same machine. When I execute the same code as a standalone java program outside of JBoss on the same machine, I am able to connect to the cache. I am also able to open a raw telnet connection using the same IP and port.

       

      I am using IntelliJ to run both JBoss and my standalone program.

       

      Any ideas what can be causing this?

        • 1. Re: Jboss application not able to make TCP connection
          jaikiran pai Master

          Please post the relevant code, configurations and the exception stacktrace(s).

          • 2. Re: Jboss application not able to make TCP connection
            Manoj Agarwal Newbie


            Cache config:

                <proxy-scheme>

                  <service-name>ExtendTcpProxyService1</service-name>

                  <thread-count>5</thread-count>

                  <acceptor-config>

              <serializer>

               <!--

               <class-name>com.company.research.analytics.tse.gts.coherence.node.PassThroughPofContext</class-name>

               -->

               <class-name>com.tangosol.io.pof.ConfigurablePofContext</class-name>

               <init-params>

              <init-param>

              <param-type>string</param-type>

              <param-value>tse-pof-config.xml</param-value>

                </init-param>

               </init-params>

                    </serializer>

                    <tcp-acceptor>

                      <local-address>

                        <address>localhost</address>

                        <port>15060</port>

                      </local-address>

                    </tcp-acceptor>

                  </acceptor-config>

                  <autostart>true</autostart>

                </proxy-scheme>

             


            Client config:

                <remote-invocation-scheme>

                  <scheme-name>extend-invocation</scheme-name>

                  <service-name>ExtendTcpInvocationService</service-name>

                  <initiator-config>

                    <tcp-initiator>

                      <remote-addresses>

                        <socket-address>

                          <address>localhost</address>

                          <port>15060</port>

                        </socket-address>

                      </remote-addresses>

                      <connect-timeout>600s</connect-timeout>

                    </tcp-initiator>

                    <outgoing-message-handler>

                    <!--

                      <heartbeat-interval>4s</heartbeat-interval>

                      <heartbeat-timeout>2s</heartbeat-timeout>

                    -->

                      <request-timeout>480s</request-timeout>

                    </outgoing-message-handler>

                  </initiator-config>

                </remote-invocation-scheme>

             

            Client code:

            InvocationService is = (InvocationService) factory.ensureService("ExtendTcpInvocationService");


            TcpAcceptor running. Cache log:

            2014-10-16 14:15:45.984/3.688 Oracle Coherence GE 3.7.1.6 <Info> (thread=Proxy:ExtendTcpProxyService1:TcpAcceptor, member=6): TcpAcceptor now listening for connections on 10.173.77.48:15060

             

             

            The stack-trace on jboss client is :

            com.tangosol.net.messaging.ConnectionException: could not establish a connection to one of the following addresses: [10.173.77.48:15060]; make sure the "remote-addresses" configuration element contains an address and port of a running TcpAcceptor

            14:18:19,099 ERROR [stderr] (http-/0.0.0.0:8080-2) at com.tangosol.coherence.component.util.daemon.queueProcessor.service.peer.initiator.TcpInitiator.openConnection(TcpInitiator.CDB:120)

            14:18:19,099 ERROR [stderr] (http-/0.0.0.0:8080-2) at com.tangosol.coherence.component.util.daemon.queueProcessor.service.peer.Initiator.ensureConnection(Initiator.CDB:11)

            14:18:19,099 ERROR [stderr] (http-/0.0.0.0:8080-2) at com.tangosol.coherence.component.net.extend.remoteService.RemoteInvocationService.openChannel(RemoteInvocationService.CDB:5)

            14:18:19,099 ERROR [stderr] (http-/0.0.0.0:8080-2) at com.tangosol.coherence.component.net.extend.RemoteService.doStart(RemoteService.CDB:11)

            14:18:19,099 ERROR [stderr] (http-/0.0.0.0:8080-2) at com.tangosol.coherence.component.net.extend.RemoteService.start(RemoteService.CDB:5)

            14:18:19,099 ERROR [stderr] (http-/0.0.0.0:8080-2) at com.tangosol.coherence.component.util.SafeService.startService(SafeService.CDB:39)

            14:18:19,099 ERROR [stderr] (http-/0.0.0.0:8080-2) at com.tangosol.coherence.component.util.SafeService.ensureRunningService(SafeService.CDB:27)

            14:18:19,099 ERROR [stderr] (http-/0.0.0.0:8080-2) at com.tangosol.coherence.component.util.SafeService.start(SafeService.CDB:14)

            14:18:19,099 ERROR [stderr] (http-/0.0.0.0:8080-2) at com.tangosol.net.DefaultConfigurableCacheFactory.ensureServiceInternal(DefaultConfigurableCacheFactory.java:1105)

            14:18:19,099 ERROR [stderr] (http-/0.0.0.0:8080-2) at com.tangosol.net.DefaultConfigurableCacheFactory.ensureService(DefaultConfigurableCacheFactory.java:937)

            14:18:19,099 ERROR [stderr] (http-/0.0.0.0:8080-2) at com.tangosol.net.DefaultConfigurableCacheFactory.ensureService(DefaultConfigurableCacheFactory.java:337)