Layer 7 API Management

Expand all | Collapse all

Replication Issue

Jump to Best Answer
  • 1.  Replication Issue

    Posted 08-22-2019 06:14 AM
    Edited by Pratyush Singh 08-22-2019 06:16 AM
    Hi Team,

    I am trying to build a fresh GW in replication so I started with replication of Primary and Secondary Gateway. While running the script ./create-slave.sh -v I am facing below error. Could you please help me on what could be the issue, although everything looks good to me:


    [root@Gateway1bin]# ./create_slave.sh -v
    Enter hostname or IP for the MASTER: IPofGateway1
    Enter replication user: [repluser]
    Enter replication password: [replpass]
    Enter MySQL root user: [root]
    Enter MySQL root password: []
    Do you want to clone a database from IPofGateway2 (yes or no)? [no]
    --> MASTER = IPofGateway2
    --> DBUSER = repluser
    --> DBPWD = replpass
    --> ROOT = root
    --> ROOT_PWD = 7layer
    --> CLONE_DB = no
    --> DB = ssg
    --> Stopping slave
    --> File = ssgbin-log.000001
    --> Position = 502
    --> Changing MASTER settings
    --> Starting slave
    --> Confirming slave startup
    --> Slave_IO_Running = Connecting
    --> Slave_SQL_Running = Yes

    ==> Error: Slave not started

    Confirm your settings in ./create_slave.sh

    Result of SLAVE STATUS:

    *************************** 1. row ***************************
    Slave_IO_State: Connecting to master
    Master_Host: IPofGateway2
    Master_User: repluser
    Master_Port: 3307
    Connect_Retry: 100
    Master_Log_File: ssgbin-log.000001
    Read_Master_Log_Pos: 502
    Relay_Log_File: ssgrelay-bin.000001
    Relay_Log_Pos: 4
    Relay_Master_Log_File: ssgbin-log.000001
    Slave_IO_Running: Connecting
    Slave_SQL_Running: Yes
    Replicate_Do_DB:
    Replicate_Ignore_DB:
    Replicate_Do_Table:
    Replicate_Ignore_Table:
    Replicate_Wild_Do_Table:
    Replicate_Wild_Ignore_Table:
    Last_Errno: 0
    Last_Error:
    Skip_Counter: 0
    Exec_Master_Log_Pos: 502
    Relay_Log_Space: 154
    Until_Condition: None
    Until_Log_File:
    Until_Log_Pos: 0
    Master_SSL_Allowed: No
    Master_SSL_CA_File:
    Master_SSL_CA_Path:
    Master_SSL_Cert:
    Master_SSL_Cipher:
    Master_SSL_Key:
    Seconds_Behind_Master: NULL
    Master_SSL_Verify_Server_Cert: No
    Last_IO_Errno: 2003
    Last_IO_Error: error connecting to master 'repluser@IPofGateway2:3307' - retry-time: 100 retries: 1
    Last_SQL_Errno: 0
    Last_SQL_Error:
    Replicate_Ignore_Server_Ids:
    Master_Server_Id: 0
    Master_UUID:
    Master_Info_File: /var/lib/mysql/master.info
    SQL_Delay: 0
    SQL_Remaining_Delay: NULL
    Slave_SQL_Running_State: Slave has read all relay log; waiting for more updates
    Master_Retry_Count: 86400
    Master_Bind:
    Last_IO_Error_Timestamp: 190822 02:35:02
    Last_SQL_Error_Timestamp:
    Master_SSL_Crl:
    Master_SSL_Crlpath:
    Retrieved_Gtid_Set:
    Executed_Gtid_Set:
    Auto_Position: 0
    Replicate_Rewrite_DB:
    Channel_Name:
    Master_TLS_Version:


    Please help.

    Thanks
    Praty


  • 2.  RE: Replication Issue
    Best Answer

    Posted 08-22-2019 08:57 PM
    Dear Praty,
    It seems it cannot connect to IPofGateway2.
    Is the mysql on IPofGateway2 up and running?
    Is there any DNS issue, or the firewall blocking the mysql connection?

    you may run command below to test connection to the IPofGateway2,
    mysql -h IPofGateway2 -u repluser -p

    Regards,
    Mark