Well it proves connectivity on port 4444 which is not what you were using. This is pedantic but important. To prove that you can connect to isfe:3333 you actually need to connect to isfe:3333. You don't need a script, just telnet will do. You will either see it flip to a blank screen (or a header message in some cases but not this one) or give you a connection timed out message. You can open or firewall any port so it is an important sanity check.
Anyway assuming that all is connective on 3333 the it is time to RTFS. If you grok the RPC::PlClient source around the line noted or just for the error message you will see it comes from the new() function.
sub new ($@) { my $proto = shift; my $self = {@_}; bless($self, (ref($proto) || $proto)); my $comm = $self->{'comm'} = RPC::PlClient::Comm->new($self); my $app = $self->{'application'} or $self->Fatal("Missing application name"); my $version = $self->{'version'} or $self->Fatal("Missing version number"); my $user = $self->{'user'} || ''; my $password = $self->{'password'} || ''; my $socket; if (!($socket = $self->{'socket'})) { $self->Fatal("Missing peer address") unless $self->{'peeraddr' +}; $self->Fatal("Missing peer port") unless ($self->{'peerport'} || index($self->{'peeraddr'}, ':') != -1); $socket = $self->{'socket'} = IO::Socket::INET->new ('PeerAddr' => $self->{'peeraddr'}, 'PeerPort' => $self->{'peerport'}, 'Proto' => $self->{'socket_proto'}, 'Type' => $self->{'socket_type'}, 'Timeout' => $self->{'timeout'}); $self->Fatal("Cannot connect: $!") unless $socket; } $self->Debug("Connected to %s, port %s", $socket->peerhost(), $socket->peerport()); $self->Debug("Sending login message: %s, %s, %s, %s", $app, $version, $user, "x" x length($password)); $comm->Write($socket, [$app, $version, $user, $password]); $self->Debug("Waiting for server's response ..."); my $reply = $comm->Read($socket); die "Unexpected EOF from server" unless defined($reply); # <---- +--- Here is where your error is die "Expected server to return an array ref" unless ref($reply) eq + 'ARRAY'; my $msg = defined($reply->[1]) ? $reply->[1] : ''; die "Refused by server: $msg" unless $reply->[0]; $self->Debug("Logged in, server replies: $msg"); return ($self, $msg) if wantarray; $self; }
The self->Debug, self->Fatal.... messages are using Net::Daemon::Log. I can't be bothered to trace how DBI eventally gets to call this code or how to get the Debug output to STDERR where we can read it. I would just make a backup copy of this module and directly hack the source so it prints all its messages to STDERR where they can be read. It looks like you must be getting a socket, and then the login is failing as you are getting a null read.
cheers
tachyon
In reply to Re^3: DBI Proxy connection prob
by tachyon
in thread DBI Proxy connection prob
by mifflin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |