zxs / tungsten-replicator

Automatically exported from code.google.com/p/tungsten-replicator
0 stars 0 forks source link

Port check for Google Cloud SQL #987

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
(for everything below, hostnames in /etc/hosts:
tung0 = mysql master
tung1 = separate server running the replicator
tung2 = Google Cloud SQL instance public IP address)

What steps will reproduce the problem?

1. Follow steps at 
https://docs.continuent.com/tungsten-replicator-2.2/deployment-amazonrds-install
ation.html
2. `tungsten-installer` command fails with port check:
ERROR >> tung1 >> The port '3306' does not match the the port from 
tungsten@tung2:3306 (WITH PASSWORD) '0'

What is the expected output?

Some Warnings but no errors.

What do you see instead?

$ ./tools/tungsten-installer --master-slave    --cluster-hosts=tung1   
--master-host=tung0   --datasource-host=tung2   --datasource-user=tungsten    
--datasource-password=password    --service-name=alpha   
--slave-privileged-updates=false   --home-directory=/opt/continuent   
--skip-validation-check=InstallerMasterSlaveCheck   
--skip-validation-check=MySQLPermissionsCheck   
--skip-validation-check=MySQLBinaryLogsEnabledCheck   --start-and-report
WARN  >> This command has been DEPRECATED
WARN  >> Switch to the tpm script for managing installation and upgrade
WARN  >> tung1 >> Unable to check the MySQL config file '/etc/my.cnf'
WARN  >> tung1 >> Unable to compare the configured server-id to the one in 
'/etc/my.cnf'
ERROR >> tung1 >> The port '3306' does not match the the port from 
tungsten@tung2:3306 (WITH PASSWORD) '0'
WARN  >> tung1 >> Unable to compare the configured port to the one in 
'/etc/my.cnf'
WARN  >> tung1 >> The value of max_allowed_packet is too small for 
tungsten@tung2:3306 (WITH PASSWORD)
#####################################################################
# Validation failed
#####################################################################
#####################################################################
# Errors for tung1
#####################################################################
ERROR >> tung1 >> The port '3306' does not match the the port from 
tungsten@tung2:3306 (WITH PASSWORD) '0' (MySQLApplierServerPortCheck)

What version of the product are you using?

2.2.1-403

On what operating system?

CentOS 6

Please provide any additional information below.

Notes:

Google Cloud SQL's MySQL reports the port as 0, which is generally what happens 
when you have 'skip-networking' in my.cnf:

mysql> SHOW VARIABLES LIKE 'port';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| port          | 0     |
+---------------+-------+
1 row in set (0.00 sec)

But, I get it, I'm doing something not documented or not supported. So this 
isn't so much as a bug report as a notification. I was able to get around the 
installer warning by editing "class MySQLApplierServerPortCheck" in 
"tools/ruby/configure/dbms_types/mysql.rb" and commenting out "error("The port 
'#{port}' does not match the the port from 
#{get_applier_datasource.get_connection_summary()} '#{retrieved_port}'")". Not 
a great thing to do for every situation but it worked to get around this 
specific thing. And sure enough, replication seems to be working into Cloud SQL 
as I would expect for Amazon RDS. 

It's only been a few minutes so I have no clue how this will play out 
long-term, I'm only experimenting at the moment, but I figured you might like 
to know!

Original issue reported on code.google.com by alani...@gmail.com on 15 Aug 2014 at 3:17

GoogleCodeExporter commented 8 years ago
Try adding to the installation command:

--skip-validation-check=MySQLApplierServerPortCheck \
--datasource-port=3306

Please also note that in the 3.0 release, which is coming up, 
tungsten-installer is not supported anymore - it has been changed by tpm.

Original comment by linas.vi...@continuent.com on 18 Aug 2014 at 9:44

GoogleCodeExporter commented 8 years ago
Great, thanks for those options. I ended up getting things working with an ini 
file but I figured I'd let you all know that you can follow the documentation 
guide for RDS for Cloud SQL with minimal changes.

Original comment by alani...@gmail.com on 18 Aug 2014 at 2:52