in reply to DBI Proxy connection prob

Any Idea's?

Firewall issue? Ping proves you can get to your remote box using ICMP, not make a TCP connection on port 3333. Try telnetting into 3333.

C:\> telnet isfe 3333

Replies are listed 'Best First'.
Re^2: DBI Proxy connection prob
by mifflin (Curate) on Oct 04, 2004 at 23:16 UTC
    I can run this small test server on my unix box
    #!/home/utils/perl/bin/perl use strict; use warnings; use IO::Socket; my $server = IO::Socket::INET->new(LocalPort => 4444, Reuse => 1, List +en => 10); die $@ unless $server; print "waiting for a connection\n"; while (my $client = $server->accept()) { my $line = <$client>; print $line; close($client); }
    And run this test client on my Win XP box...
    use strict; use warnings; use IO::Socket; my $socket = IO::Socket::INET->new(PeerAddr => 'isfe', PeerPort => 4444, Type => SOCK_STREAM); die $@ unless $socket; print $socket "hello\n"; close($socket);
    And successfully receive a message.
    erickn@isfe:/home/erickn> server1.pl waiting for a connection hello
    Does this prove I don't have a firewall issue?

    Update:
    this test shows me using port 4444 instead of 3333. However, I have also run it as 3333 and I get the same results.

      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.

Re^2: DBI Proxy connection prob
by mifflin (Curate) on Oct 04, 2004 at 23:20 UTC
    What does the Telnet test tell me?
    Here is the attempt...
    C:\erick>telnet isfe 3333 Connecting To isfe...Could not open a connection to host on port 3333 +: Connect failed
    If I don't have a telnet service accepting connections on 3333, how would this test ever work?

    Update:
    However, running the telnet command with out the port does work.
    SunOS 5.9 login: erickn Password: Last login: Mon Oct 4 16:30:59 from rmtislt054.csc. erickn@isfe:/home/erickn> exit Connection to host lost. C:\Documents and Settings\erickn>
    but doesn't that just test the default telnet port (whatever that is)?

      You are confusing telnet the client program and telnet the protocol/server. They are *different*. Telnet the program is just making a socket connection for you and displaying the IO in a shell type environment. You can't get a connection on 3333 which is the problem. Your script will fail to get a socket on 3333 as well. FIREWALL or DEAD DEAMON is the reason it does not work. Anyway telnet can connect to any socket server, You can telnet into your SMTP server on 25, HTTP server on 80, POP3 server on 110 or *any other socket server on any other port*. If you know the protocol you can talk to them. For example I can send myself email via telnet (the program, not the protocol/server) connecting to an SMTP server on port 25 because I know the protocol (I typed the HELO, MAIL FROM, RCPT TO, DATA, blah . , QUIT lines). Knowing basic SMTP and POP3 etc is often useful to debug connectivity issues FWIW. Rather than just ping you telnet into the server and say Gday.