tabby icon indicating copy to clipboard operation
tabby copied to clipboard

SSH port forwarding MariaDB/MySQL Read timed out.

Open GeistFighter opened this issue 7 months ago • 3 comments

Hi, I'm testing a switch from PuTTY to Tabby to improve my workflow, and I ran into an issue that I’d like to report.

I'm connecting to my server via SSH on a custom port (not 22) using an SSH key, and I use local port forwarding to securely access services like SQL without exposing remote ports on the firewall.

In both PuTTY and Tabby, I configure:

  • Local port 3306 → Remote 127.0.0.1:3306 (MariaDB)
  • Local port 5432 → Remote 127.0.0.1:5432 (PostgreSQL)

Image

Image

✅ In PuTTY, everything works perfectly. (MariaDB and PostgreSQL) ✅ In Tabby, PostgreSQL works without any issues. -> ❌ But with MariaDB, I frequently get:

Socket timeout when connecting to localhost. Read timed out.

Image

This happens randomly, about 9 out of 10 connection attempts fail, and occasionally one will succeed.

Image

I've confirmed: The port forwarding rules are identical to PuTTY. MariaDB is listening correctly on 127.0.0.1:3306. My database uses 127.0.0.1:3306 locally. Everything works consistently in PuTTY.

It seems like Tabby has some instability or timing issue with port forwarding specifically for MariaDB, even though PostgreSQL works fine under the same conditions.

Thanks for your work!

GeistFighter avatar May 29 '25 19:05 GeistFighter

There is no error on Tabby console, but in my DB Tool : (Tried with DBeaver & DbVisualizer, same errror, with Putty no error)

An error occurred while establishing the connection:

Long Message: Socket timeout when connecting to localhost. Read timed out

Details:    Type: java.sql.SQLTimeoutException    SQL State: 08000

Stack Trace: java.net.SocketTimeoutException: Read timed out    at java.base/sun.nio.ch.NioSocketImpl.timedRead(NioSocketImpl.java:278)    at java.base/sun.nio.ch.NioSocketImpl.implRead(NioSocketImpl.java:304)    at java.base/sun.nio.ch.NioSocketImpl.read(NioSocketImpl.java:346)    at java.base/sun.nio.ch.NioSocketImpl$1.read(NioSocketImpl.java:796)    at java.base/java.net.Socket$SocketInputStream.read(Socket.java:1099)    at java.base/java.io.BufferedInputStream.fill(BufferedInputStream.java:291)    at java.base/java.io.BufferedInputStream.read1(BufferedInputStream.java:347)    at java.base/java.io.BufferedInputStream.implRead(BufferedInputStream.java:420)    at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:399)    at org.mariadb.jdbc.client.socket.impl.PacketReader.readReusablePacket(PacketReader.java:62)    at org.mariadb.jdbc.client.impl.StandardClient.handleServerHandshake(StandardClient.java:296)    at org.mariadb.jdbc.client.impl.StandardClient.setupConnection(StandardClient.java:146)    at org.mariadb.jdbc.client.impl.StandardClient.(StandardClient.java:127) [wrapped] java.sql.SQLTimeoutException: Socket timeout when connecting to localhost. Read timed out    at org.mariadb.jdbc.client.impl.StandardClient.handleTimeoutError(StandardClient.java:362)    at org.mariadb.jdbc.client.impl.StandardClient.(StandardClient.java:131)    at org.mariadb.jdbc.Driver.connect(Driver.java:75)    at org.mariadb.jdbc.Driver.connect(Driver.java:104)    at org.mariadb.jdbc.Driver.connect(Driver.java:29)    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)    at java.base/java.lang.reflect.Method.invoke(Method.java:580)    at com.onseven.dbvis.jdbc.b.e.b(Z:525)    at com.onseven.dbvis.jdbc.b.g$_b.call(Z:1481)    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)    at java.base/java.lang.Thread.run(Thread.java:1583)

GeistFighter avatar May 30 '25 10:05 GeistFighter

it looks like #10142

GeistFighter avatar May 30 '25 10:05 GeistFighter

Hi, no one have this problem ?

GeistFighter avatar Nov 01 '25 14:11 GeistFighter