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

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

Hi, I'm trying to open UDP listener on local machine, but get this weird error :

Wed, 26/09/2012 04:59:15.728 CYBRO: ****** ERROR ******** Can't make +UDP socket listener: IO::Socket::INET: connect: Permission denied Wed, 26/09/2012 04:59:45.728 CYBRO: ****** ERROR ******** Can't make +UDP receiver on 192.168.0.255 and port 8442, retrying
Using nmap port is not used, so I really don't understand what is wrong. I'm running code as root :
$self->{Abus_udp_receiver}=IO::Socket::INET->new(Proto=>"udp",LocalPor +t=>$port,Reuse => 1, PeerAddr=>$udp_listen_url, PeerPort=>$port ) or +runlog ($self,"****** ERROR ******** Can't make UDP socket listener: +$@");
What is wrong ? Thanks in advance, Robert.

Replies are listed 'Best First'.
Re: IO::Socket::INET: connect: Permission denied
by Anonymous Monk on Sep 26, 2012 at 03:10 UTC
    Let me add, that this code worked on previous systems. I recently upgraded to Ubuntu 12.04 and maybe.... Regards, Robert.
      this code worked on previous systems. I recently upgraded to Ubuntu 12.04 and maybe
      seems to me machine configuration issue. try turning off firewall.
        Thanks for hint. I just disabled firewall with no success. Same code goes pass that point on Windows...
        Regards, Robert.
Re: IO::Socket::INET: connect: Permission denied
by Anonymous Monk on Sep 26, 2012 at 06:08 UTC

    permission denied is a weird error?

      permission denied is a weird error?
      Not weird but I suspect Security-enhanced Linux (SELinux) is enabled and affecting socket connection on this machine. Disable SELinux if enabled and give a try.