0

I have three VMs running on Windows Azure. Two VMs running mysql database, the third VM running mysql fabric node. When I tried to use python connector to connect to fabric node, this problem happens: mysql.connector.errors.InterfaceError: Connection with Fabric failed: <urlopen error [Errno 111] Connection refused> I'm wondering what causes this problem.

I used this command to setup fabric environment:

mysqlfabric manage setup --param=storage.user=fabric_store --param=storage.password=password --config=/etc/mysql/fabric.cfg

python script:

import mysql.connector
from mysql.connector import fabric    
cnx = mysql.connector.connect(
            fabric={
            "host" : "myfabricnode.com",
            "port" : 32274,
            "username" : "admin",
            "password" : "secret"
                           }
            )

fabric.cfg:

[DEFAULT]
prefix =
sysconfdir = /etc
logdir = /var/log

[storage]
address = localhost:3307
user = fabric_store
password = password
database = mysql_fabric
auth_plugin = mysql_native_password
connection_timeout = 6
connection_attempts = 6
connection_delay = 1

[servers]
user = fabric_server
password = password
backup_user = fabric_backup
backup_password = password
restore_user = fabric_restore
restore_password = password
unreachable_timeout = 5

[protocol.xmlrpc]
#address = myfabricnode.com:32274
address = localhost:32274
threads = 5
user = admin
password = secret
disable_authentication = no
realm = MySQL Fabric
ssl_ca = 
ssl_cert = 
ssl_key = 

[protocol.mysql]
#address = myfabricnode.com:32275
address = localhost:32275
user = admin
password = secret
disable_authentication = no
ssl_ca = 
ssl_cert = 
ssl_key = 

[executor]
executors = 5

[logging]
#level = INFO
level = DEBUG
#url = /home/tester/fabric.log
url = file:///var/log/fabric.log

[sharding]
mysqldump_program = /usr/bin/mysqldump
mysqlclient_program = /usr/bin/mysql
prune_limit = 10000

[statistics]
prune_time = 3600

[failure_tracking]
notifications = 300
notification_clients = 50
notification_interval = 60
failover_interval = 0
detections = 3
detection_interval = 6
detection_timeout = 1
prune_time = 3600

[connector]
ttl = 1

BTW, I've opened the endpoint 32274 & 32275 on the fabric node(myfabricnode.con), but I can't telnet the 32274 port from the remote server, I also tried to use the private ip address and public ip address in fabric.cfg, but I still got the same error.

Can anyone help me with that?

technoob
  • 142
  • 1
  • 14
  • 1
    Why are you trying to connect to db3.com? I expect you don't own that domain, and it's someone else's server. They aren't running mysql fabric. Try connecting to the correct address. – Michael Hampton Nov 08 '16 at 13:15
  • I just use it for example, because I don't want to expose my real domain to public – technoob Nov 08 '16 at 19:03

0 Answers0