Hi multicast:// handling is not in tomcat and shouldn't be considered as McastService which is another feature, please see http://tomee.apache.org/multicast-discovery.html for a detailed configuration.
Romain Manni-Bucau @rmannibucau <https://twitter.com/rmannibucau> | Blog <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> | LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber <http://www.tomitribe.com> | JavaEE Factory <https://javaeefactory-rmannibucau.rhcloud.com> 2016-05-18 14:07 GMT+02:00 Dignesh <dgo...@opentext.com>: > Hello team, > > I have configured my tomee in cluster. > > I have added below xml element in server.xml file for two nodes. > > <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster" > channelSendOptions="8"> > > <Manager className="org.apache.catalina.ha.session.DeltaManager" > expireSessionsOnShutdown="false" > notifyListenersOnReplication="true"/> > > <Channel > className="org.apache.catalina.tribes.group.GroupChannel"> > <Membership > className="org.apache.catalina.tribes.membership.McastService" > address="228.0.0.4" > port="45564" > frequency="500" > dropTime="3000"/> > <Receiver > className="org.apache.catalina.tribes.transport.nio.NioReceiver" > address="auto" > port="4000" > autoBind="100" > selectorTimeout="5000" > maxThreads="6"/> > > <Sender > className="org.apache.catalina.tribes.transport.ReplicationTransmitter"> > <Transport > className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"/> > </Sender> > <Interceptor > > className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"/> > <Interceptor > > className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor"/> > </Channel> > > <Valve className="org.apache.catalina.ha.tcp.ReplicationValve" > filter=""/> > <Valve > className="org.apache.catalina.ha.session.JvmRouteBinderValve"/> > > <Deployer > className="org.apache.catalina.ha.deploy.FarmWarDeployer" > tempDir="/tmp/war-temp/" > deployDir="/tmp/war-deploy/" > watchDir="/tmp/war-listen/" > watchEnabled="false"/> > > <ClusterListener > className="org.apache.catalina.ha.session.ClusterSessionListener"/> > </Cluster> > > I also created multicast.properties file in conf folder as per > documentation > for multicast (UDP) discovery with below content > > server = org.apache.openejb.server.discovery.MulticastDiscoveryAgent > bind = 228.0.0.4 > port = 45564 > disabled = false > group = default > > I am trying to do the ejb look up using below configuration and I am seeing > exceptions. > > Properties p = new Properties(); > p.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY, > "org.apache.openejb.client.RemoteInitialContextFactory"); > > p.put(javax.naming.Context.PROVIDER_URL, > "multicast://228.0.0.4:45564?group=default"); > > Can anyone please help me on this issue. > > Below is the exception stack trace : - > > May 18, 2016 6:12:30 PM org.apache.openejb.client.EventLogger log > INFO: > RemoteInitialContextCreated{providerUri=multicast:// > 228.0.0.4:45564?group=default} > May 18, 2016 6:12:31 PM org.apache.openejb.client.EventLogger log > WARNING: ConnectionFailed{uri=multicast://228.0.0.4:45564?group=default > cause=java.lang.IllegalArgumentException: Unable to find a public ejb > server > via the multicast URI: multicast://228.0.0.4:45564?group=default} > May 18, 2016 6:12:31 PM org.apache.openejb.client.EventLogger log > WARNING: > BootstrappingConnection{provider=multicast://228.0.0.4:45564?group=default > } > May 18, 2016 6:12:33 PM org.apache.openejb.client.EventLogger log > WARNING: ConnectionFailed{uri=multicast://228.0.0.4:45564?group=default > cause=java.lang.IllegalArgumentException: Unable to find a public ejb > server > via the multicast URI: multicast://228.0.0.4:45564?group=default} > May 18, 2016 6:12:33 PM org.apache.openejb.client.EventLogger log > SEVERE: ConnectionStrategyFailed{strategy=StickyConnectionStrategy, > cluster=org.apache.openejb.client.ClusterMetaData@15eb9b0d, > server=multicast://228.0.0.4:45564?group=default} > Exception in thread "main" javax.naming.NamingException: Cannot lookup > > '/global/artesia/artesia-ejb/StockBean!dignesh.learning.tomee.StockServiceRemote'. > [Root exception is java.rmi.RemoteException: Unable to connect; nested > exception is: > java.io.IOException: java.lang.IllegalArgumentException: Unable to > find a > public ejb server via the multicast URI: > multicast://228.0.0.4:45564?group=default] > at > org.apache.openejb.client.JNDIContext.lookup(JNDIContext.java:405) > at javax.naming.InitialContext.lookup(InitialContext.java:411) > at RemoteEjbClientExample.main(RemoteEjbClientExample.java:23) > Caused by: java.rmi.RemoteException: Unable to connect; nested exception > is: > java.io.IOException: java.lang.IllegalArgumentException: Unable to > find a > public ejb server via the multicast URI: > multicast://228.0.0.4:45564?group=default > at org.apache.openejb.client.Client.processRequest(Client.java:165) > at org.apache.openejb.client.Client.request(Client.java:139) > at > org.apache.openejb.client.JNDIContext.request(JNDIContext.java:211) > at > org.apache.openejb.client.JNDIContext.lookup(JNDIContext.java:399) > ... 2 more > Caused by: java.io.IOException: java.lang.IllegalArgumentException: Unable > to find a public ejb server via the multicast URI: > multicast://228.0.0.4:45564?group=default > at > > org.apache.openejb.client.ConnectionManager.getConnection(ConnectionManager.java:119) > at > > org.apache.openejb.client.AbstractConnectionStrategy.connect(AbstractConnectionStrategy.java:105) > at > > org.apache.openejb.client.AbstractConnectionStrategy.connect(AbstractConnectionStrategy.java:81) > at > > org.apache.openejb.client.ConnectionManager.getConnection(ConnectionManager.java:88) > at org.apache.openejb.client.Client.processRequest(Client.java:163) > ... 5 more > Caused by: java.lang.IllegalArgumentException: Unable to find a public ejb > server via the multicast URI: multicast://228.0.0.4:45564?group=default > at > > org.apache.openejb.client.MulticastConnectionFactory.getConnection(MulticastConnectionFactory.java:68) > at > > org.apache.openejb.client.ConnectionManager.getConnection(ConnectionManager.java:112) > ... 9 more > > > > > -- > View this message in context: > http://tomee-openejb.979440.n4.nabble.com/Unable-to-find-a-public-ejb-server-via-the-multicast-URI-during-remote-ejb-look-up-tp4678491.html > Sent from the TomEE Dev mailing list archive at Nabble.com. >