[MXS-2864] Maxctrl Not Responding CentOS 7 Created: 2020-02-03 Updated: 2020-02-10 Resolved: 2020-02-10 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | maxctrl |
| Affects Version/s: | 2.4.5 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Critical |
| Reporter: | Aaron Chamberlain | Assignee: | markus makela |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | network | ||
| Environment: |
CentOS 7.7 x86_64 in VMWare |
||
| Attachments: |
|
| Description |
|
I'm working on setting up a MariaDB 3 Node Cluster and using Maxscale as the proxy. I had set up a practice config on some local KVM machines, worked without a hitch. So I went to spin up the production servers and I'm getting an error I can't make sense of. If I run any command in maxctrl at all it throws the same error:
Ok so it sounds like something was using port 8989 before Maxscale, let's check with lsof -i -P -n | grep 89:
SELinux is set to Permissive for testing, Firewalld is off for testing. Someone suggested it might be an IPv6 issue since it says connection to ::1 but I can't see what the difference would be between my test and pro machines as they both have the same default loopback adapter settings in `lo` and both have the same aliases in `/etc/hosts` Suggestions for debugging? Some other steps I performed:
2) curl localhost:8989/v1/maxscale returns the 99 error code as above. If I do curl 127.0.0.1:8989/v1/maxscale it returns a different 111 error.
3) tcpdump shows that absolutely nothing is coming across the wire, which is really weird. I tried `tcpdump -v -i ens192 'port 8989'` and `tcpdump -v -i lo 'port 8989'` and then both curl methods as above, and get the same result:
Finally I have attached the MariaDB and Maxscale config files (with obfuscation) to aid in finding out what the issue is. |
| Comments |
| Comment by markus makela [ 2020-02-03 ] | |||||||||||||||||||||||||||||
|
Can you try to adding admin_host=127.0.0.1 in the [maxscale] section to see if that resolves it? Maybe for some reason it fails to bind to the IPv6 loopbak address and setting it explicitly to the IPv4 would solve it. | |||||||||||||||||||||||||||||
| Comment by Aaron Chamberlain [ 2020-02-03 ] | |||||||||||||||||||||||||||||
|
Doesn't appear to have worked. Steps taken: 1) In /etc/maxscale.cnf set admin_host=127.0.0.1 Since the error mentions it trying to query http://localhost:8989 I tried the steps above with admin_host=localhost. Recieved the same error but did get an interesting result from the lsof command above, the listener only bound to IPv6.
With admin_host=127.0.0.1 lsof returns
So is that the issue? Maxscale is trying to run on the IPv4 but the query defaults to "localhost" which on my system is actually the IPv6 address? It's weird the curl also returns these same errors. | |||||||||||||||||||||||||||||
| Comment by Aaron Chamberlain [ 2020-02-03 ] | |||||||||||||||||||||||||||||
|
Following that logic, I checked to see if there was anything in /etc/hosts to arouse suspicion:
So I commented out that second line and it didn't change anything either. | |||||||||||||||||||||||||||||
| Comment by markus makela [ 2020-02-03 ] | |||||||||||||||||||||||||||||
|
Does curl 127.0.0.1:8989/v1/maxscale with admin_host=127.0.0.1 work? That should explicitly use the IPv4 stack and if that doesn't work, something else is going on. | |||||||||||||||||||||||||||||
| Comment by Aaron Chamberlain [ 2020-02-03 ] | |||||||||||||||||||||||||||||
|
With admin_host=127.0.0.1 I tried curl http://127.0.0.1:8989/v1/maxscale and this was the error (same as in the original post):
| |||||||||||||||||||||||||||||
| Comment by markus makela [ 2020-02-03 ] | |||||||||||||||||||||||||||||
|
That's definitely Maxscale that created the error. Are you using some sort of a HTTP proxy on port 8989? | |||||||||||||||||||||||||||||
| Comment by Aaron Chamberlain [ 2020-02-03 ] | |||||||||||||||||||||||||||||
|
Bingo. I had the following in /etc/environment:
I removed that, shut down my ssh session and jumped back in (so the env variables could be loaded again) and now maxctrl list servers shows the expected output. The question though is: how should I set up my proxy then? I do need those to be able to reach the internet, perform OS updates, etc. | |||||||||||||||||||||||||||||
| Comment by markus makela [ 2020-02-03 ] | |||||||||||||||||||||||||||||
|
Sadly, that is not my area of expertise. |