Solution found; Append ";CLUSTER=''" to individual database URLs to be able to connect to it in isolation instead of connecting to the cluster.
On Nov 19, 10:52 am, Max Bridgewater <[email protected]> wrote: > Hi, > > I had some troubles testing a H2 cluster. Let's say I have two nodes running > on localhost ports 8000 and 8001. I can connect to the cluster as a whole > using the URL: tcp://localhost:8000,localhost:8001/test. > > What I couldn't figure out is a simple way to verify that each node in the > cluster properly executed an update query initiated from any of them. That > is, if I send an insert statement from localhost:8000, how do I check from a > test case that localhost:8001 also received and executed this insert > statement? > > Here are my attempts: > > 1) Tried to connect to each node separately using the URLs > tcp://localhost:8000 and tcp://localhost:8001. This doesn't work; the error > message is that the node is part of a cluster and I cannot connect to it in > isolation. > > 2) Tried to switch the node's addresses in the cluster URL; That is, using > the following URLs to query each database: > tcp://localhost:8000,localhost:8001/test and > tcp://localhost:8001,localhost:8000/test. The rational in this case is that > since read queries are performed on the first node of the URL, > tcp://localhost:8001,localhost:8000/test would in essence be equivalent to > tcp://localhost:8001/test and tcp://localhost:8000,localhost:8001/test would > be equivalent to tcp://localhost:8000/test. Unfortunately, it didn't work > either. I'm not allowed to connect to the cluster with one URL when I > already connected to it with the other one. > > Now my question: > 1) Is there something I am missing? > 1) Is there any solution/workaround to this problem? > 2) Why not allow connecting to a cluster member in isolation? > > Thanks, > Merkel -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/h2-database?hl=.
