I'm running Metabase locally on my Mac (Intel) and trying to connect to MariaDB that I have setup on a Raspberry Pi.
I keep getting a "Timed out after 10.0 s" error in Metabase and can't for the life of me figure out why.
I can connect from my Mac via the command line with the following command (and the connection happens instantly):
$ mariadb --host={host IP that I'd rather not share} --port={port that I'd rather not share} -u {username I'd rather not share} -p
What have I tried?
I tried going into the server and increasing the global connection timeout. This didn't make a difference. Not only did this not make a difference, but I got the same "Timed out after 10.0 s" error, so I would think that would indicate this is a client side issue.
Useful Info :
MariaDB version: Server version: 10.3.31-MariaDB-0+deb10u1 Raspbian 10
Diagnostic Info:
{
"browser-info": {
"language": "en-US",
"platform": "MacIntel",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36",
"vendor": "Google Inc."
},
"system-info": {
"file.encoding": "UTF-8",
"java.runtime.name": "OpenJDK Runtime Environment",
"java.runtime.version": "11.0.21+9",
"java.vendor": "Eclipse Adoptium",
"java.vendor.url": "https://adoptium.net/",
"java.version": "11.0.21",
"java.vm.name": "OpenJDK 64-Bit Server VM",
"java.vm.version": "11.0.21+9",
"os.name": "Linux",
"os.version": "5.10.76-linuxkit",
"user.language": "en",
"user.timezone": "GMT"
},
"metabase-info": {
"databases": [
"h2"
],
"hosting-env": "unknown",
"application-database": "h2",
"application-database-details": {
"database": {
"name": "H2",
"version": "2.1.214 (2022-06-13)"
},
"jdbc-driver": {
"name": "H2 JDBC Driver",
"version": "2.1.214 (2022-06-13)"
}
},
"run-mode": "prod",
"version": {
"date": "2024-01-05",
"tag": "v0.48.2",
"hash": "e66c075"
},
"settings": {
"report-timezone": null
}
}
}
Any help greatly appreciated
Luiggi
January 15, 2024, 12:20pm
2
is MariaDB open to Metabase along your mac?
also, is the firewall open?
Is MariaDB open to metabase along you mac?
What do you mean by this?
And yes the firewall is open; I can login via the command line with the same connection info
I'm seeing a similar thing:
Metabase
Docker version 27.4.1, build b9d17ea
"JAVA_HOME=/opt/java/openjdk"
JAVA_VERSION=jdk-21.0.5+11
"RepoTags": [ "metabase/metabase:latest" ]
"Comment": "buildkit.dockerfile.v0",
"Created": "2024-12-23T08:01:45.593912004Z"
"Os": "linux"
IP Address: 172.17.0.3
Db Config
Hostname: 172.17.0.1
Port: 3306
User: metabase_user
Password: *********
Host server
Ubuntu 20.04.6 LTS
IP Address: 172.17.0.1
Database
Server version: 10.3.39-MariaDB
User: 'metabase_user'@'172.17.0.3'
Permissions: GRANT SELECT ON . TO 'metabase_user'@'172.17.0.3';
I've tried adding jdbc options "connectTimeout=30000&socketTimeout=60000&loginTimeout=30000"
Several attempts I still see the same TimeOut error.
On the docker container, I have tested with nc:
$ nc -zv 172.17.0.1 3306
172.17.0.1 (172.17.0.1:3306) open
Access to the DB via mysql works fine, just not via Metabase.
Here's a trace of the connection, which shows the connection is starting then sometime timing out ... the jdbc options don't seem to be affecting the timeout duration:
1 0.000000000 172.17.0.3 → 172.17.0.1 TCP 76 46728 → 3306 [SYN] Seq=0 Win=64240 Len=0 MSS=1460 SACK_PERM=1 TSval=2606731115 TSecr=0 WS=128
2 0.000000000 172.17.0.3 → 172.17.0.1 TCP 76 [TCP Out-Of-Order] 46728 → 3306 [SYN] Seq=0 Win=64240 Len=0 MSS=1460 SACK_PERM=1 TSval=2606731115 TSecr=0 WS=128
3 0.000038800 172.17.0.1 → 172.17.0.3 TCP 76 3306 → 46728 [SYN, ACK] Seq=0 Ack=1 Win=65160 Len=0 MSS=1460 SACK_PERM=1 TSval=2218534993 TSecr=2606731115 WS=128
4 0.000041292 172.17.0.1 → 172.17.0.3 TCP 76 [TCP Out-Of-Order] 3306 → 46728 [SYN, ACK] Seq=0 Ack=1 Win=65160 Len=0 MSS=1460 SACK_PERM=1 TSval=2218534993 TSecr=2606731115 WS=128
5 0.000057523 172.17.0.3 → 172.17.0.1 TCP 68 46728 → 3306 [ACK] Seq=1 Ack=1 Win=64256 Len=0 TSval=2606731115 TSecr=2218534993
6 0.000057523 172.17.0.3 → 172.17.0.1 TCP 68 [TCP Dup ACK 5#1] 46728 → 3306 [ACK] Seq=1 Ack=1 Win=64256 Len=0 TSval=2606731115 TSecr=2218534993
7 8.147823643 172.17.0.1 → 172.17.0.3 MySQL 178 Server Greeting proto=10 version=5.5.5-10.3.39-MariaDB-0ubuntu0.20.04.2
8 8.147837755 172.17.0.1 → 172.17.0.3 TCP 178 [TCP Retransmission] 3306 → 46728 [PSH, ACK] Seq=1 Ack=1 Win=65280 Len=110 TSval=2218543141 TSecr=2606731115
9 8.147900383 172.17.0.3 → 172.17.0.1 TCP 68 46728 → 3306 [ACK] Seq=1 Ack=111 Win=64256 Len=0 TSval=2606739263 TSecr=2218543141
10 8.147900383 172.17.0.3 → 172.17.0.1 TCP 68 [TCP Dup ACK 9#1] 46728 → 3306 [ACK] Seq=1 Ack=111 Win=64256 Len=0 TSval=2606739263 TSecr=2218543141
11 8.148746159 172.17.0.3 → 172.17.0.1 MySQL 409 Login Request user=metabase_user db=metabase_db001
12 8.148746159 172.17.0.3 → 172.17.0.1 TCP 409 [TCP Retransmission] 46728 → 3306 [PSH, ACK] Seq=1 Ack=111 Win=64256 Len=341 TSval=2606739264 TSecr=2218543141
13 8.148803126 172.17.0.1 → 172.17.0.3 TCP 68 3306 → 46728 [ACK] Seq=111 Ack=342 Win=65024 Len=0 TSval=2218543142 TSecr=2606739264
14 8.148807953 172.17.0.1 → 172.17.0.3 TCP 68 [TCP Dup ACK 13#1] 3306 → 46728 [ACK] Seq=111 Ack=342 Win=65024 Len=0 TSval=2218543142 TSecr=2606739264
15 8.149075401 172.17.0.1 → 172.17.0.3 MySQL 101 Response OK
16 8.149082157 172.17.0.1 → 172.17.0.3 TCP 101 [TCP Retransmission] 3306 → 46728 [PSH, ACK] Seq=111 Ack=342 Win=65024 Len=33 TSval=2218543142 TSecr=2606739264
17 8.149095627 172.17.0.3 → 172.17.0.1 TCP 68 46728 → 3306 [ACK] Seq=342 Ack=144 Win=64256 Len=0 TSval=2606739264 TSecr=2218543142
18 8.149095627 172.17.0.3 → 172.17.0.1 TCP 68 [TCP Dup ACK 17#1] 46728 → 3306 [ACK] Seq=342 Ack=144 Win=64256 Len=0 TSval=2606739264 TSecr=2218543142
19 8.149219417 172.17.0.3 → 172.17.0.1 TCP 75 46728 → 3306 [PSH, ACK] Seq=342 Ack=144 Win=64256 Len=7 TSval=2606739264 TSecr=2218543142 [TCP segment of a reassembled PDU]
20 8.149219417 172.17.0.3 → 172.17.0.1 TCP 75 [TCP Retransmission] 46728 → 3306 [PSH, ACK] Seq=342 Ack=144 Win=64256 Len=7 TSval=2606739264 TSecr=2218543142
21 8.149238859 172.17.0.1 → 172.17.0.3 TCP 68 3306 → 46728 [ACK] Seq=144 Ack=349 Win=65024 Len=0 TSval=2218543142 TSecr=2606739264
22 8.149240982 172.17.0.1 → 172.17.0.3 TCP 68 [TCP Dup ACK 21#1] 3306 → 46728 [ACK] Seq=144 Ack=349 Win=65024 Len=0 TSval=2218543142 TSecr=2606739264
23 8.149267550 172.17.0.3 → 172.17.0.1 TCP 72 46728 → 3306 [PSH, ACK] Seq=349 Ack=144 Win=64256 Len=4 TSval=2606739264 TSecr=2218543142 [TCP segment of a reassembled PDU]
24 8.149267550 172.17.0.3 → 172.17.0.1 TCP 72 [TCP Retransmission] 46728 → 3306 [PSH, ACK] Seq=349 Ack=144 Win=64256 Len=4 TSval=2606739264 TSecr=2218543142
25 8.149279607 172.17.0.1 → 172.17.0.3 TCP 68 3306 → 46728 [ACK] Seq=144 Ack=353 Win=65024 Len=0 TSval=2218543142 TSecr=2606739264
26 8.149281339 172.17.0.1 → 172.17.0.3 TCP 68 [TCP Dup ACK 25#1] 3306 → 46728 [ACK] Seq=144 Ack=353 Win=65024 Len=0 TSval=2218543142 TSecr=2606739264
27 8.149299750 172.17.0.3 → 172.17.0.1 MySQL 139 Request Query