Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error connecting to master | cluster name longer than few chars #170

Closed
HBO2 opened this issue Nov 29, 2018 · 3 comments
Closed

Error connecting to master | cluster name longer than few chars #170

HBO2 opened this issue Nov 29, 2018 · 3 comments
Labels
Milestone

Comments

@HBO2
Copy link
Contributor

HBO2 commented Nov 29, 2018

@AMecea
I tested the new release and in essence everything is going ok. Also upgrading existing operator with cluster (only one replica, because of the old issue)
On dev K8s cluster . created also a total fresh and new operator with a new cluster (1 master and 2 slaves) from k8s perpective they seems healthy, but the orchestrator and the log show otherwise -> replication simply wont start after imported a copy of existing database. The error message is:

2018-11-29T07:32:11.464493Z 0 [Note] InnoDB: Buffer pool(s) load completed at 181129  7:32:11
2018-11-29T07:32:11.482593Z 11 [ERROR] Slave I/O for channel '': error connecting to master 'repl_1FULi@prod-ain-cluster-mysql-0.prod-ain-cluster-mysql-nodes.defaul:3306' - retry-time: 10  retries: 1, Error_code: 2005

Earlier in the log I see a warning:

2018-11-29T07:32:10.849587Z 8 [Warning] Neither --relay-log nor --relay-log-index were used; so replication may break when this MySQL server acts as a slave and has his hostname changed!! Please use '--relay-log=prod-ain-cluster-mysql-1-relay-bin' to avoid this problem.

Please find belwo the full log of one of the slaves:
logs-from-mysql-in-prod-ain-cluster-mysql-2.txt

helm ls shows this:
ain-mysql-operator 14 Wed Nov 28 21:57:22 2018 DEPLOYED mysql-operator-0.2.1 v0.2.1 default

To be complete please find below the full log of the orchestrator:

logs-from-orchestrator-in-ain-mysql-operator-orchestrator-0.txt

NB: please note the k8s is running on AKS (azure) 1.11.3

@AMecea
Copy link
Contributor

AMecea commented Nov 29, 2018

We figure it out that the problem is because of the hostname too long, the hostname is truncated at 60 characters.

Thanks @HBO2

Update: https://dev.mysql.com/doc/refman/5.7/en/change-master-to.html

@calind
Copy link
Member

calind commented Nov 29, 2018

There is a limit on the MySQL side to 60 characters for hostnames. https://bugs.mysql.com/bug.php?id=87243

We should look for a workaround for this issue, because this limitation leaves room for only 44 characters to (2*cluster_name + namespace).

@AMecea AMecea changed the title Error connecting to master | version 0.2.1 Error connecting to master | cluster name longer than few chars Nov 29, 2018
@calind calind added this to the 0.2.3 milestone Jan 7, 2019
@AMecea
Copy link
Contributor

AMecea commented Jan 29, 2019

We add some documentation about this in #215

There is nothing to do about this, it's a MySQL limitation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants