Continuent Developer Community
Welcome, Guest
Please Login or Register.    Lost Password?
Re:How can i Integrating SQL Router with connector? (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 2
TOPIC: Re:How can i Integrating SQL Router with connector?
#308
free4machine (User)
Fresh Boarder
Posts: 12
graphgraph
User Offline Click here to see the profile of this user
How can i Integrating SQL Router with connector? 1 Year, 1 Month ago Karma: 0  
I've read docs , but can't find how to set it up.

Any suggestion will be applicate.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#309
Gilles Rayrat (User)
Senior Boarder
Posts: 45
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Location: Grenoble, France
Re:How can i Integrating SQL Router with connector? 1 Year, 1 Month ago Karma: 2  
Hello, and welcome to Tungsten!

As you probably understood by reading the docs, the SQL Router is a bit particular compared to other components since it is not really "started" by any script.

The router is a thin wrapper around the dbms original jdbc driver, so it starts as soon as you load the sql router driver in your application.

In the case of the connector, the router starts together with the connector, since the connector loads the specified jdbc driver at startup.

So, in order to integrate both components, all you need to do is to specify the router as the jdbc driver used by the connector. In config terms, that looks like the following

(in the connector uconnector.properties):
jdbc.driver = com.continuent.tungsten.router.jdbc.TSRDriver
jdbc.driver.options = ?qos=RW_STRICT
(in user.map)
<user> <pass> <db> <service name>
(if you didn't change anything in the router conf, the service name will be "default" without quotes)

Optionally, you can use the direct connections feature:
jdbc.direct-connection.driver = com.continuent.tungsten.router.jdbc.TSRDriver
and set a read-only connection url to the sql-router in user.map:
@direct <user> <db> jdbc:t-router://<service name>/<real db>?qos=RO_RELAXED&user=<real user>&password=<real password>

Please don't hesitate to report here if you see any further issue.

Regards,
Gilles.
 
Report to moderator   Logged Logged  
 
Gilles.
  The administrator has disabled public write access.
#312
free4machine (User)
Fresh Boarder
Posts: 12
graphgraph
User Offline Click here to see the profile of this user
Re:How can i Integrating SQL Router with connector? 1 Year, 1 Month ago Karma: 0  
Thanks for the reply.


Now I understand How sql router works.

Fllow the docs,

i want to setup the datasource, i try
Code:

bin/rmctl -setup
, i got this error:
Code:

Error while loading configuration
try
Code:

bin/rmctl
, got this:
Code:

INFO [com.continuent.tungsten.router.client.RouterManagerCtrl] - Successfully connected to router at serviceName=sql-router-mgr, host=localhost, port=10999 Exiting as the result of an exception com.continuent.tungsten.router.manager.RouterException: Connection to policy manager at host=localhost, port=10011 failed:com.continuent.tungsten.commons.jmx.ServerRuntimeException: Unable to connect to RMI server at host=localhost, port=10011, serviceName=cluster-policy-mgr, reason=java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is: java.net.ConnectException: Connection refused] at com.continuent.tungsten.router.client.RouterManagerCtrl.connectToPolicyManager(R outerManagerCtrl.java:161) at com.continuent.tungsten.router.client.RouterManagerCtrl.<init> (RouterManagerCtrl.java:357) at com.continuent.tungsten.router.client.RouterManagerCtrl.main(RouterManagerCtrl.j ava:319)
and the log/ is empty So i can not find out what is happen. Thanks
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#750
proximity 4 (User)
Fresh Boarder
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
Re:How can i Integrating SQL Router with connector? 1 Month, 3 Weeks ago Karma: 0  
I shall await with eager anticipation to watch your times tumble
Good luck with the new pedals I am sure that they will make racing more pleasurable
________________________________________________________________________________ __________

[URL=http://www.officechairsuk.com/acatalog/Herman_Miller_Products.html] Herman Miller[/url]| Herman Miller Chairs
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop