http://www.perlmonks.org?node_id=993694

prashantktyagi has asked for the wisdom of the Perl Monks concerning the following question:

My application create a db connection to sql server using dbi::proxy.
On server runs a proxy service (written in perl with conjuction to dbiproxy.exe) which listen incoming connection and create a socket.


my application is working fine on Redhat Linux( kernel 2.4) but when I run my app on SUSE 10 sp4 x86_64, this is the issue..

here is my apllication dbi script( client) which fails to connect and timeout..
my $sock = new IO::Socket::INET( PeerAddr => $server, PeerPort => 9000, Proto => 'tcp', ); print " error : $!, $@ ";

Gives output ...
error: Illegal seek, error: Connection refused, IO::Socket::INET: Timeout error: Connection refused, IO::Socket::INET: Timeout error: Connection refused, IO::Socket::INET: Timeout error: Illegal seek, IO::Socket::INET: Timeout Illegal seek,error: Illegal seek, IO::Socket::INET: Timeout
I have doubt on IO::Socket::INET module bundled within my application. Is this a module bug or system issue?
Please guide ..

Replies are listed 'Best First'.
Re: Perl DBI connection timeout on SLES 10 sp4 X86_64
by moritz (Cardinal) on Sep 14, 2012 at 11:23 UTC
    my application is working fine on Redhat Linux( kernel 2.4) but when I run my app on SUSE 10 sp4 x86_64, this is the issue..

    Are the two operating systems on the same machine? with the same IP? I ask because "Connection refused" could mean a firewall or a host filtering rule prevents you from accessing the port in question.

      These OS's are Virtual machines under same host but different IP. I will check about firewall rules.

        Hi all,

        I have checked the firewall setting and network domain. Everything is fine. But still I am not able to create a socket through IO::Socket::INET on Suse machine.

        Please help me to find the cause of this issue.
        Any other way to debug this thing ?