That does look like a proper configuration of MaxScale. I hope this is just a small issue with your setup and that you will get it fixed. I'll take a closer look at the way the tutorial configures the servers.
Markus On Mar 9, 2015 10:47 PM, "sriram patil" <spsrirampa...@gmail.com> wrote: > Hi, > > I have set up the replication. I have also confirmed that is works fine. > The maxadmin also displays that there are two servers. But, Master ID = -1. > Here's the output from maxadmin > > "show servers" > Server 0x39c3520 (srv1) > Server: localhost > Status: Running > Protocol: MySQLBackend > Port: 3306 > Server Version: 5.5.41-MariaDB-1ubuntu0.14.04.1 > Node Id: 0 > Master Id: -1 > Slave Ids: > Repl Depth: -1 > Number of connections: 0 > Current no. of conns: 0 > Current no. of operations:0 > Server 0x39c3410 (srv2) > Server: localhost > Status: Running > Protocol: MySQLBackend > Port: 3307 > Server Version: 5.5.41-MariaDB-1ubuntu0.14.04.1 > Node Id: 0 > Master Id: -1 > Slave Ids: > Repl Depth: -1 > Number of connections:0 > Current no. of conns: 0 > Current no. of operations:0 > > "show monitors" > Name: MariaDB10 Monitor > Monitor running > Sampling interval: 10000 milliseconds > MaxScale MonitorId: 77358052 > Replication lag: disabled > Detect Stale Master: disabled > Connect Timeout: 3 seconds > Read Timeout: 1 seconds > Write Timeout: 2 seconds > Monitored servers: localhost:3306, localhost:3307 > > > I will try to set this up from the beginning again, let's see if I have > any luck this time. > > Thanks, > Sriram > > > > > On Tue, Mar 10, 2015 at 2:05 AM, Markus Mäkelä <markus.mak...@mariadb.com> > wrote: > >> Hi, >> >> Is the cluster set with replication? The readwritesplit needs at least >> one master and one slave to work. Using the maxadmin interface should >> verify this. The client binary can be found in the same folder as the >> maxscale binary. Default user name is admin and the password is skysql. >> >> Markus >> On Mar 9, 2015 10:29 PM, "sriram patil" <spsrirampa...@gmail.com> wrote: >> >>> Hi Markus, >>> >>> I got an error. It says "Error : No Master can be determined". >>> >>> Here's how my config file looks like >>> >>> [maxscale] >>> threads=1 >>> log_trace=1 >>> >>> [srv1] >>> type=server >>> address=localhost >>> port=3306 >>> protocol=MySQLBackend >>> >>> [srv2] >>> type=server >>> address=localhost >>> port=3307 >>> protocol=MySQLBackend >>> >>> [MariaDB10 Monitor] >>> type=monitor >>> module=mysqlmon >>> servers=srv1,srv2 >>> user=maxmon >>> passwd=maxpwd >>> >>> [RW Split Router] >>> type=service >>> router=readwritesplit >>> servers=srv1,srv2 >>> user=maxuser >>> passwd=maxpwd >>> >>> [RW Split Listener] >>> type=listener >>> service=RW Split Router >>> protocol=MySQLClient >>> port=4006 >>> >>> [CLI] >>> type=service >>> router=cli >>> >>> [CLI listener] >>> type=listener >>> service=CLI >>> protocol=maxscaled >>> address=localhost >>> port=6603 >>> >>> I have granted all privileges to "maxmon". Does it help in pin pointing >>> the error? >>> >>> Thanks, >>> Sriram >>> >>> >>> On Tue, Mar 10, 2015 at 1:22 AM, Markus Mäkelä < >>> markus.mak...@mariadb.com> wrote: >>> >>>> Hi, >>>> >>>> The first step would be to inspect the state the servers are in. The >>>> easiest way to do is to use the maxadmin interface. To enable this, >>>> configure the following into MaxScale's config file >>>> >>>> [CLI] >>>> type=service >>>> router=cli >>>> >>>> [CLI Listener] >>>> type=listener >>>> service=CLI >>>> protocol=maxscaled >>>> port=6603 >>>> >>>> Executing the 'show servers' should give you a list of the servers and >>>> their states. If this doesn't give any clues the next step would be to >>>> enable MaxScale's tracelog. The log can be enabled by adding >>>> 'log_trace=1' under the [maxscale] section. Here you can see the routing >>>> logic of the router and the reasons why the queries are routed to the >>>> master. >>>> >>>> Markus >>>> >>>> On Tue, 2015-03-10 at 00:57 +0530, sriram patil wrote: >>>> > Hi All, >>>> > >>>> > >>>> > I tried running 2 MariaDB servers and MaxScale on my laptop. I gave >>>> > different configurations to both MariaDB servers with separate data >>>> > and log directories. Referred this for it. >>>> > >>>> > >>>> > Also have set up MaxScale from "MaxScale for rest of us" series on >>>> > MariaDB blog. >>>> > 1. https://mariadb.com/blog/maxscale-rest-us-part-1 >>>> > 2. https://mariadb.com/blog/maxscale-rest-us-part-2 >>>> > 3. https://mariadb.com/blog/maxscale-rest-us-part-3 >>>> > 4. https://mariadb.com/blog/maxscale-rest-us-part-4 >>>> > >>>> > >>>> > So, i tried to set up the readwritesplit router with 1 master and 1 >>>> > slave. Here, the replication mechanism worked fine but the queries are >>>> > always executed on the master server. >>>> > >>>> > >>>> > Example output for a read query: >>>> > >>>> > mysql -h localhost -u maxuser -p test -e "select c1, @@server_id from >>>> > t1" >>>> > >>>> > Enter password: >>>> > +------+-------------+ >>>> > | c1 | @@server_id | >>>> > +------+-------------+ >>>> > | 1 | 1 | >>>> > +------+-------------+ >>>> > >>>> > >>>> > server_id for master is 1 whereas for slave it is 11, which is never >>>> > displayed in the output. >>>> > >>>> > >>>> > Can someone help me with this? Should I try the same config with one >>>> > more slave? Are there any better resources for setting up MaxScale? >>>> > >>>> > >>>> > Thanks, >>>> > >>>> > Sriram >>>> > >>>> > >>>> > >>>> > >>>> > _______________________________________________ >>>> > Mailing list: https://launchpad.net/~maria-developers >>>> > Post to : maria-developers@lists.launchpad.net >>>> > Unsubscribe : https://launchpad.net/~maria-developers >>>> > More help : https://help.launchpad.net/ListHelp >>>> >>>> -- >>>> Markus Mäkelä, Software Engineer >>>> MariaDB Corporation >>>> t: +358 40 7740484 | Skype: markus.j.makela >>>> >>>> >>> >
_______________________________________________ Mailing list: https://launchpad.net/~maria-developers Post to : maria-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-developers More help : https://help.launchpad.net/ListHelp