[Cialug] Port forward problem

L. V. Lammert lvl at omnitec.net
Thu Mar 5 11:29:27 CST 2015


Running into an intersting problem setting up a tunnel to a remote mysql
server. It has worked in the past, .. but it has not been used for months.
Now it is refusing to connect.

Started over with a new connection:

ssh -f -n -N -X -R 3306:127.0.0.1:3306 wcore -vv

The logs on wcore shows "Address already in use":

Mar  5 11:09:17 XH-Webcore sshd[9740]: Accepted publickey for lvl from 127.0.0.1 port 56840 ssh2
Mar  5 11:09:17 XH-Webcore systemd-logind[479]: New session 111935 of user lvl.
Mar  5 11:09:17 XH-Webcore sshd[9783]: error: bind: Address already in use
Mar  5 11:09:17 XH-Webcore sshd[9783]: error: channel_setup_fwd_listener: cannot listen to port: 3306

**BUT** this has worked in the past, .. there are no connections to 3306
showing in netstat:

# netstat -an | grep 3306
tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN
tcp        0      0 ::1:3306                :::*                    LISTEN

Nor any processes:

# ps ax | grep 3306
10302 pts/1    S+     0:00 grep --color=auto 3306

It seems like there is one or more hung connections may be blocking the
connection (located some others, unrelated, and killed them)? How would
oneactually identify it/them?

This is a production server, so I would prefer to avoid rebooting.

	Thanks!

	Lee


More information about the Cialug mailing list