Kevin A. Burton - 2005-01-13

Hm... so I notice that tsocks doesn't work with Java. 

I'm trying to connect to a MySQL box in our cluster..,.. I can telnet to the machine on port 3306 and I get the mysql protocol preamble...  If I try to use Java it just spins.

Here's the output of strace:

stat64("/usr/lib/java/jdk-1.4.2-06/jre/lib/i386/libnet.so", {st_mode=S_IFREG|0775, st_size=67868, ...}) = 0
gettimeofday({1105650087, 542542}, NULL) = 0
socket(PF_INET6, SOCK_STREAM, IPPROTO_IP) = 12
listen(12, 1)                           = 0
getsockname(12, {sa_family=AF_INET6, sin6_port=htons(33007), inet_pton(AF_INET6, "::", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, [28]) = 0
socket(PF_INET6, SOCK_STREAM, IPPROTO_IP) = 13
getsockopt(13, SOL_SOCKET, SO_TYPE, [1], [4]) = 0
connect(13, {sa_family=AF_INET6, sin6_port=htons(33007), inet_pton(AF_INET6, "::1", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=3221205392}, 24) = 0
fcntl64(12, F_GETFL)                    = 0x2 (flags O_RDWR)
fcntl64(12, F_SETFL, O_RDWR|O_NONBLOCK) = 0
accept(12, {sa_family=AF_INET6, sin6_port=htons(33008), inet_pton(AF_INET6, "::1", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, [28]) = 14
shutdown(13, 2 /* send and receive */)  = 0
close(14)                               = 0
close(12)                               = 0
socket(PF_INET6, SOCK_STREAM, IPPROTO_IP) = 12
bind(12, {sa_family=AF_INET6, sin6_port=htons(0), inet_pton(AF_INET6, "::", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=1075255456}, 24) = 0
getsockname(12, {sa_family=AF_INET6, sin6_port=htons(33009), inet_pton(AF_INET6, "::", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=2497891032}, [28]) = 0
getsockopt(12, SOL_SOCKET, SO_TYPE, [1], [4]) = 0
connect(12, {sa_family=AF_INET6, sin6_port=htons(3306), inet_pton(AF_INET6, "::ffff:10.0.0.16", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=3221205904}, 24

I'm thinking it doesn't use LD_PRELOAD for these binaries...