Forum Stats

  • 3,780,931 Users
  • 2,254,456 Discussions
  • 7,879,498 Comments

Discussions

Mysql fabric and connector j

3009653
3009653 Member Posts: 4
edited Mar 28, 2016 3:58PM in MySQL Community Space

how to configure mysql  fabric with connector j:  mostly, how to direct the writes only to the read-write server and the reads to  the read-only server??

Tagged:

Best Answer

Answers

  • Dave Stokes-MySQL Community Team-Oracle
    Dave Stokes-MySQL Community Team-Oracle MySQL Community Manager TexasMember Posts: 369 Employee
    edited Mar 25, 2016 9:12AM Accepted Answer

    Fabric should do that automatically.  Check the status of you servers to make sure you have both a primary and then a secondary.

    Dave Stokes

    MySQL Community Manager

  • 3009653
    3009653 Member Posts: 4
    edited Mar 25, 2016 4:10PM

    although it is noted in the documentation that fabric does an automatic routing for reads and writes, I noticed some write connection getting routed to read-only(secondary server) and read-only connections getting routed to read-write(primary server).

    another issue that I am facing, is that, if there is a restart of "mysql fabric process", some of the server(if it's not all servers) are marked " FAULTY " , even though the servers are healthy and accessible??

  • Dave Stokes-MySQL Community Team-Oracle
    Dave Stokes-MySQL Community Team-Oracle MySQL Community Manager TexasMember Posts: 369 Employee
    edited Mar 25, 2016 7:36PM

    The read-only servers also need to be updated via replication as to the changes in the data from the master.

    And servers marked faulty should not be considered and healthy or accessible.

    Dave Stokes

    MySQL Community Manager

  • 3009653
    3009653 Member Posts: 4
    edited Mar 26, 2016 9:29PM

    so, why mysql fabric reports servers as FAULTY where there is nothing wrong with them?

  • 3009653
    3009653 Member Posts: 4
    edited Mar 28, 2016 3:58PM

    also I am seeing these errors within mysql error.log ( every 2 seconds)

    2016-03-28 19:48:49 4003 [Warning] Aborted connection 3705 to db: 'unconnected' user: 'fabric_server' host: 'fabric_host' (Got an error reading communication packets)

    2016-03-28 19:48:51 4003 [Warning] Aborted connection 3706 to db: 'unconnected' user: 'fabric_server' host: 'fabric_host' (Got an error reading communication packets)

    2016-03-28 19:48:53 4003 [Warning] Aborted connection 3707 to db: 'unconnected' user: 'fabric_server' host: 'fabric_host' (Got an error reading communication packets)

    2016-03-28 19:48:55 4003 [Warning] Aborted connection 3708 to db: 'unconnected' user: 'fabric_server' host: 'fabric_host' (Got an error reading communication packets)

    2016-03-28 19:48:57 4003 [Warning] Aborted connection 3709 to db: 'unconnected' user: 'fabric_server' host: 'fabric_host' (Got an error reading communication packets)

    2016-03-28 19:48:59 4003 [Warning] Aborted connection 3710 to db: 'unconnected' user: 'fabric_server' host: 'fabric_host' (Got an error reading communication packets)

    2016-03-28 19:49:01 4003 [Warning] Aborted connection 3711 to db: 'unconnected' user: 'fabric_server' host: 'fabric_host' (Got an error reading communication packets)

    2016-03-28 19:49:03 4003 [Warning] Aborted connection 3712 to db: 'unconnected' user: 'fabric_server' host: 'fabric_host' (Got an error reading communication packets)

    2016-03-28 19:49:05 4003 [Warning] Aborted connection 3714 to db: 'unconnected' user: 'fabric_server' host: 'fabric_host' (Got an error reading communication packets)

    2016-03-28 19:49:07 4003 [Warning] Aborted connection 3715 to db: 'unconnected' user: 'fabric_server' host: 'fabric_host' (Got an error reading communication packets)

    2016-03-28 19:49:09 4003 [Warning] Aborted connection 3716 to db: 'unconnected' user: 'fabric_server' host: 'fabric_host' (Got an error reading communication packets)


    @session.autocommit = ON ". tcpdump chowed open/closed connection properly without any warnings.

    I can't find what is the issue, and  couldn't locate the script that is running every 2seconds and how it gets triggered??

    any help would be appriciated.