MySQL Forums
Forum List  »  Utilities

Issue connecting to Fabric node from remote machine
Posted by: Ron Finnerty
Date: February 19, 2016 10:03AM

Hello All,

I have started testing the newest version of Fabric for the high availability functionality. I have the Fabric node up and running and am able to run mysqlfabric commands locally with no issue. This is installed on a Centos 6 server.

I have a test python script I am running from a Windows server to verify the routing of queries based on server roles that has been set up in Fabric. I am receiving the following error when running the script and am stumped as to why this error is occurring. This appears to be a Python error, but I am not familiar with Python:

mysql fabric raise InterfaceError("Connection with Fabric failed: " + msg)
mysql.connector.errors.InterfaceError: Connection with Fabric failed: <urlopen e
rror [Errno 10061] No connection could be made because the target machine active
ly refused it>

I have turned off iptables on the Fabric server but did not fix this. Here is the configuration in fabric.cfg:

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

[statistics]
prune_time = 3600

[logging]
url = file:///var/log/fabric.log
level = INFO

[storage]
auth_plugin = mysql_native_password
database = fabric
user = fabricuser
address = localhost:3306
connection_delay = 1
connection_timeout = 6
password = password
connection_attempts = 6

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

[servers]
restore_user = fabricuser
unreachable_timeout = 5
backup_password = password
backup_user = fabricuser
user = fabricuser
restore_password = password
password = password

[connector]
ttl = 1

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

[executor]
executors = 5

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

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

Here is the Python script I am running (IP of Fabric server - 192.168.168.168):

import mysql.connector
from mysql.connector import fabric

conn = mysql.connector.connect(
fabric={"host" : "192.168.168.168", "port" : 32274, "username": "admin",
"password" : "admin"},
user="fabricuser", database="tester", password="password",
autocommit=True
)

conn.set_property(mode=fabric.MODE_READWRITE, group="mysql-ha-group")
cur = conn.cursor()
cur.execute(
"CREATE TABLE IF NOT EXISTS mycustomer ("
" custid MEDIUMINT NOT NULL AUTO_INCREMENT, "
" first_name CHAR(40), "
" last_name CHAR(40),"
" PRIMARY KEY (custid)"
")"
)

This is the complete output when executing the above script:

Traceback (most recent call last):
File "C:\Users\Alt_admin\Documents\setup_table_ha.py", line 8, in <module>
autocommit=True
File "C:\Python27\lib\site-packages\mysql\connector\__init__.py", line 153, in
connect
return fabric_connect(*args, **kwargs)
File "C:\Python27\lib\site-packages\mysql\connector\fabric\__init__.py", line
54, in connect
return MySQLFabricConnection(**kwargs)
File "C:\Python27\lib\site-packages\mysql\connector\fabric\connection.py", lin
e 1264, in __init__
self.store_config(**kwargs)
File "C:\Python27\lib\site-packages\mysql\connector\fabric\connection.py", lin
e 1408, in store_config
self._configure_fabric(config['fabric'])
File "C:\Python27\lib\site-packages\mysql\connector\fabric\connection.py", lin
e 1389, in _configure_fabric
self._fabric.seed()
File "C:\Python27\lib\site-packages\mysql\connector\fabric\connection.py", lin
e 627, in seed
connect_delay=self._connect_delay)
File "C:\Python27\lib\site-packages\mysql\connector\fabric\connection.py", lin
e 248, in __init__
self.handler.connect()
File "C:\Python27\lib\site-packages\mysql\connector\fabric\connection.py", lin
e 1144, in connect
self._proxy = self._xmlrpc_get_proxy()
File "C:\Python27\lib\site-packages\mysql\connector\fabric\connection.py", lin
e 1128, in _xmlrpc_get_proxy
proxy._some_nonexisting_method() # pylint: disable=W0212
File "C:\Python27\lib\xmlrpclib.py", line 1240, in __call__
return self.__send(self.__name, args)
File "C:\Python27\lib\xmlrpclib.py", line 1599, in __request
verbose=self.__verbose
File "C:\Python27\lib\site-packages\mysql\connector\fabric\connection.py", lin
e 552, in request
raise InterfaceError("Connection with Fabric failed: " + msg)
mysql.connector.errors.InterfaceError: Connection with Fabric failed: <urlopen e
rror [Errno 10061] No connection could be made because the target machine active
ly refused it>


Thanks in advance for your assistance

Ron

Options: ReplyQuote


Subject
Views
Written By
Posted
Issue connecting to Fabric node from remote machine
1722
February 19, 2016 10:03AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.