Score:0

Can't connect to MariaDB from internal VM Structure

ps flag

S1

Virtual Machine 1: Ubuntu app server

Virtual Machine 2: MariaDB 1

S2

Virtual Machine 3: Ubuntu app server

Virtual Machine 4: MariaDB 2

from vm04 and 03 I can connect to DB1 with connection string with port 3306 but I can't connect DB2 from vm01 and 02

telnet can connect from 3306 to DB2

both of DB's MariaDB 10.6 and all of the VM's has got same configuration. VM03 can connect to DB2.

When I listening to DB2 traffic with tcpdump I can see that the requests are arriving to DB but what happens after that I do not know exactly.

Any idea:

netstat -tulpn | grep LISTEN | grep 3306

tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN      5145/mariadbd
tcp6       0      0 :::3306                 :::*                    LISTEN      5145/mariadbd

edit:

error message of DB1

2023-02-27 12:32:17 5771 [Warning] Aborted connection 5771 to db: 'testdev' user: 'testuser' host: 'vm02' (Got timeout reading communication packets)

route -n (db2)

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         PublicIP        0.0.0.0         UG    0      0        0 eth0
0.0.0.0         192.168.1.151   0.0.0.0         UG    0      0        0 eth0
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0

s1 192.168.2.0/24
s2 192.168.1.0/24

iptables

iptables -A FORWARD -p tcp --source 192.168.2.1/24 --dport 3306 -j ACCEPT
iptables -A FORWARD -p tcp --source 192.168.2.1/24 --dport 3307 -j ACCEPT
iptables -A INPUT -p tcp --source 192.168.2.1/24 --dport 3306 -j ACCEPT
iptables -A INPUT -p tcp --source 192.168.2.1/24 --dport 3307 -j ACCEPT

same for 1.1./24 subnets
in flag
Please provide actual error messages you encounter.
cn flag
And the routing tables and firewall configurations?
gegentierversuche avatar
ps flag
added route and iptables rules
gegentierversuche avatar
ps flag
another information: When use -A parameter on query I can login to server but I cannot see tables with "show tables". It is hanging but I can execute basic queries.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.