[Clustering/JBoss] - Re: WAN Cluster setup
by jokum
The Jgroups config in cluster-service.xml on both nodes on the same machine is as follows :
<Config>
| <TUNNEL router_port="12001" router_host="localhost"/>
| <PING timeout="3000" gossip_refresh="10000" num_initial_members="2" gossip_host="localhost" gossip_port="12001"/>
| <MERGE2 max_interval="10000" min_interval="5000"/>
| <FD timeout="3000"/>
| <VERIFY_SUSPECT timeout="1500" down_thread="false" up_thread="false"/>
| <pbcast.NAKACK gc_lag="100" retransmit_timeout="600,1200,2400,4800"/>
| <pbcast.STABLE stability_delay="1000" desired_avg_gossip="20000" down_thread="false" max_bytes="0" up_thread="false"/>
| <pbcast.GMS print_local_addr="true" join_timeout="5000" join_retry_timeout="2000" shun="true"/>
| <pbcast.STATE_TRANSFER down_thread="false" up_thread="false"/>
| </Config>
This is a piece of the logging off the first node :
-------------------------------------------------------
| GMS: address is AWS00581:4770
| -------------------------------------------------------
| 16:26:00,889 INFO [TreeCache] viewAccepted(): [AWS00581:4770|0] [AWS00581:4770]
| 16:26:00,929 INFO [TreeCache] TreeCache local address is AWS00581:4770
| 16:26:00,939 INFO [TreeCache] State could not be retrieved (we are the first member in group)
| 16:26:00,939 INFO [TreeCache] parseConfig(): PojoCacheConfig is empty
| 16:26:01,820 INFO [DefaultPartition] Initializing
| 16:26:03,001 INFO [STDOUT]
| -------------------------------------------------------
| GMS: address is localhost:4772
| -------------------------------------------------------
| 16:26:06,555 INFO [DefaultPartition] Number of cluster members: 1
| 16:26:06,565 INFO [DefaultPartition] Other members: 0
| 16:26:06,565 WARN [DefaultPartition] No additional information has been found in the JavaGroup addr
| ess: make sure you are running with a correct version of JGroups and that the protocol you are usin
| g supports the 'additionalData' behaviour
| 16:26:06,565 INFO [DefaultPartition] Fetching state (will wait for 30000 milliseconds):
| 16:26:06,565 INFO [DefaultPartition] State could not be retrieved (we are the first member in group
| )
| 16:26:06,685 INFO [HANamingService] Started ha-jndi bootstrap jnpPort=1200, backlog=50, bindAddress
| =/0.0.0.0
| 16:26:06,795 INFO [DetachedHANamingService$AutomaticDiscovery] Listening on /0.0.0.0:1102, group=23
| 0.0.0.4, HA-JNDI address=10.16.180.47:1200
Second node :
-------------------------------------------------------
| GMS: address is AWS00581:4801
| -------------------------------------------------------
| 16:27:57,821 INFO [TreeCache] TreeCache local address is AWS00581:4801
| 16:27:57,831 INFO [TreeCache] viewAccepted(): [AWS00581:4770|1] [AWS00581:4770, AWS00581:4801]
| 16:27:57,921 INFO [TreeCache] received the state (size=1024 bytes)
| 16:27:57,951 INFO [TreeCache] state was retrieved successfully (in 120 milliseconds)
| 16:27:57,951 INFO [TreeCache] parseConfig(): PojoCacheConfig is empty
| 16:28:00,403 INFO [DefaultPartition] Initializing
| 16:28:01,494 INFO [STDOUT]
| -------------------------------------------------------
| GMS: address is localhost:4806
| -------------------------------------------------------
| 16:28:05,028 INFO [DefaultPartition] Number of cluster members: 2
| 16:28:05,028 INFO [DefaultPartition] Other members: 1
| 16:28:05,028 WARN [DefaultPartition] No additional information has been found in the JavaGroup addr
| ess: make sure you are running with a correct version of JGroups and that the protocol you are usin
| g supports the 'additionalData' behaviour
| 16:28:05,048 INFO [DefaultPartition] New cluster view for partition DefaultPartition: 1 ([127.0.0.1
| :4772, 127.0.0.1:4806] delta: 0)
| 16:28:05,088 ERROR [RouterStub] receive(): java.net.SocketException: Software caused connection abor
| t: recv failed
| at java.net.SocketInputStream.socketRead0(Native Method)
| at java.net.SocketInputStream.read(SocketInputStream.java:129)
| at java.net.SocketInputStream.read(SocketInputStream.java:182)
| at java.io.DataInputStream.readInt(DataInputStream.java:353)
| at org.jgroups.stack.RouterStub.receive(RouterStub.java:289)
| at org.jgroups.protocols.TUNNEL.run(TUNNEL.java:182)
| at java.lang.Thread.run(Thread.java:595)
|
| 16:28:05,108 INFO [STDOUT]
| -------------------------------------------------------
| GMS: address is null
| -------------------------------------------------------
| 16:28:05,118 WARN [ServiceController] Problem starting service jboss:service=DefaultPartition
| java.lang.NullPointerException
| at org.jboss.ha.framework.server.HAPartitionImpl.verifyNodeIsUnique(HAPartitionImpl.java:116
| 1)
| at org.jboss.ha.framework.server.HAPartitionImpl.startPartition(HAPartitionImpl.java:272)
| at org.jboss.ha.framework.server.ClusterPartition.startService(ClusterPartition.java:341)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
|
| at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
| at $Proxy0.start(Unknown Source)
| at org.jboss.system.ServiceController.start(ServiceController.java:417)
| at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
Logging in the GossipRouter console :
d:\software\jboss-4.0.5.GA\server\clustertest-node1\lib>java -cp commons-logging.jar;jgroups.jar org
| .jgroups.stack.GossipRouter -port 12001
| GossipRouter is starting...
| GossipRouter started at Mon Mar 12 16:25:17 CET 2007
| Listening on port 12001 bound on address 0.0.0.0/0.0.0.0
| <START STARTUP node1>
| <END STARTUP node1>
|
| <START STARTUP node2>
| 12-mrt-2007 16:28:05 org.jgroups.stack.GossipRouter$SocketThread run
| SEVERE: exception=java.net.SocketException: Connection reset
| 12-mrt-2007 16:28:07 org.jgroups.stack.GossipRouter route
| SEVERE: failed sending message to localhost:4806: Socket closed
| 12-mrt-2007 16:28:19 org.jgroups.stack.GossipRouter route
| SEVERE: cannot find address localhost:4806 in the routing table
| 12-mrt-2007 16:28:28 org.jgroups.stack.GossipRouter route
| SEVERE: cannot find address localhost:4806 in the routing table
| 12-mrt-2007 16:28:39 org.jgroups.stack.GossipRouter route
| SEVERE: cannot find address localhost:4806 in the routing table
| 12-mrt-2007 16:28:47 org.jgroups.stack.GossipRouter sweep
| INFO: Removed member addr=localhost:4806, timestamp=1173713281504 from group DefaultPartition(46365
| msecs old)
| 12-mrt-2007 16:28:47 org.jgroups.stack.GossipRouter sweep
| INFO: done (removed 1 entries)
| <END STARTUP node2>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4027207#4027207
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4027207
19Â years, 1Â month
[JBossWS] - advice needed
by andydale
Hi,
Let me first explain that i am a beginner when it come to jboss web services, so i am sorry if this is a stupid problem.
I installed jbossws-1.2.0.GA last week to an ejb3-clustered install of jboss4.0.5.GA. I then proceeded to follow the simple step listed here http://wiki.jboss.org/wiki/Wiki.jsp?page=JBWS181HelloWorld
I created an EJB3 (Stateless bean) like so:
@RemoteBinding(jndiBinding = "ws_remote")
| @Stateless
| @WebService
| @SOAPBinding(style = SOAPBinding.Style.RPC)
| public class WebServiceTestBean implements IWebServiceTestRemote {
|
|
| @WebMethod
| @WebResult(name = "res")
| public String echo(@WebParam(name = "input_string") String pInputString) {
| System.out.println(pInputString);
| return pInputString + " :: web serviced";
| }
|
| ............
| }
And the wsdl generation for it worked. So i am now trying to access it with a simple client. I created the client using the wsconsume.sh script (with -k option) provided with jbossws. This creates the following file:
/**
| * JBossWS Generated Source
| *
| * Generation Date: Mon Mar 12 14:55:35 CET 2007
| *
| * This generated source code represents a derivative work of the input to
| * the generator that produced it. Consult the input for the copyright and
| * terms of use that apply to this source code.
| *
| * JAX-WS Version: 2.0
| *
| */
| @WebServiceClient(name = "WebServiceTestBeanService", targetNamespace = "http://beans.test.com/", wsdlLocation = "http://172.16.26.83:8080/test/Echo?wsdl")
| public class WebServiceTestBeanService extends Service {
|
| private final static URL WEBSERVICETESTBEANSERVICE_WSDL_LOCATION;
|
| static {
| URL url = null;
| try {
| url = new URL("http://172.16.26.83:8080/test/Echo?wsdl");
| } catch (MalformedURLException e) {
| e.printStackTrace();
| }
| WEBSERVICETESTBEANSERVICE_WSDL_LOCATION = url;
| }
|
| public WebServiceTestBeanService(URL wsdlLocation, QName serviceName) {
| super(wsdlLocation, serviceName);
| }
|
| public WebServiceTestBeanService() {
| super(WEBSERVICETESTBEANSERVICE_WSDL_LOCATION, new QName("http://beans.test.com/", "WebServiceTestBeanService"));
| }
|
|
| /**
| *
| * @return
| * returns WebServiceTestBean
| */
| @WebEndpoint(name = "WebServiceTestBeanPort")
| public WebServiceTestBean getWebServiceTestBeanPort() {
| return (WebServiceTestBean)super.getPort(new QName("http://beans.test.com/", "WebServiceTestBeanPort"), WebServiceTestBean.class);
| }
|
| }
I then try to create a WebServiceTestBeanService object, and call the getWebServiceTestBeanPort method which should return a proxy to the web service which i can call the test method "echo" with.
I am running into trouble with creating the WebServiceTestBeanService object, as i get a noClassDefFound exception, the stack trace is:
Exception in thread "main" java.lang.NoClassDefFoundError: org/jboss/xb/binding/ObjectModelFactory
| at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.<init>(ServiceDelegateImpl.java:108)
| at org.jboss.ws.core.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:61)
| at javax.xml.ws.Service.<init>(Service.java:83)
| at com.test.beans.WebServiceTestBeanService.<init>(WebServiceTestBeanService.java:45)
| at com.test.beans.driver.main(driver.java:13)
|
can anybody tell me what i have done wrong.
Cheers,
Andy
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4027192#4027192
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4027192
19Â years, 1Â month