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

Insufficient Error Info: CRITICAL [Errno 2] No such file or directory #32

Open
zzdjk6 opened this issue May 28, 2018 · 0 comments
Open

Comments

@zzdjk6
Copy link

zzdjk6 commented May 28, 2018

I try to use it with docker (ubuntu 16.04), but met a problem without a good explain. I suggest to not only print e.errmsg, but add print(traceback.format_exc()) for more error details.

The cmd I execute is:

mysqlfailover --master=root:[email protected]:3306 --discover-slaves-login=root:root health

The log I have is:

2018-05-28 01:05:11 AM INFO MySQL Utilities mysqlfailover version 1.6.4.
2018-05-28 01:05:11 AM INFO Server '172.17.0.2:3306' is using MySQL version 5.7.22-log.
2018-05-28 01:05:11 AM INFO Discovering slaves for master at 172.17.0.2:3306
2018-05-28 01:05:11 AM INFO Discovering slave at 172.17.0.3:3306
2018-05-28 01:05:11 AM INFO Found slave: 172.17.0.3:3306
2018-05-28 01:05:11 AM INFO Server '172.17.0.3:3306' is using MySQL version 5.7.22-log.
2018-05-28 01:05:11 AM INFO Checking privileges.
2018-05-28 01:05:11 AM INFO Unregistering existing instances from slaves.
2018-05-28 01:05:11 AM INFO Registering instance on master.
2018-05-28 01:05:11 AM INFO Failover console started.
2018-05-28 01:05:11 AM INFO Failover mode = auto.
2018-05-28 01:05:11 AM INFO Unregistering instance on master.
2018-05-28 01:05:11 AM CRITICAL [Errno 2] No such file or directory

It doesn't tell me WHAT file is missing.

After I modified the mysqlfailover to show the traceback, I finally figured out the problem: it point out to /usr/local/lib/python2.7/dist-packages/mysql/utilities/common/tools.py and line 242, which means I didn't have ping installed!!!

After install inetutils-ping, It works fine.

I think print("ERROR: %s" % e.errmsg) is not enough to debug the problem. Adding print(traceback.format_exc()) after that would give user a better explaination.

zzdjk6 added a commit to zzdjk6/mysql-utilities that referenced this issue May 28, 2018
Include traceback output when error occurs.
MithrandirD pushed a commit to MithrandirD/mysql-utilities that referenced this issue May 13, 2019
Fix mysql#32, Include traceback output when error occurs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant