[tpm] IO::Socket::INET listening on the 2nd ip address

rob at cryptic.org rob at cryptic.org
Tue Feb 8 10:40:59 PST 2011


Also make sure that your webserver is only bound to one IP address. By
default Apache binds to all IPs on the machine.


On Tue, 08 Feb 2011 13:21:42 -0500, "Uri Guttman" <uri at StemSystems.com>
wrote:
>>>>>> "AS" == Antonio Sun <antoniosun at lavabit.com> writes:
> 
>   AS> I assume it fails because my port 80 is currently used by web
server.
> 
>   AS> If I use
> 
>   AS>  $sock = new IO::Socket::INET (  LocalHost => '192.168.0.101',
> 
>   AS> I still get
> 
>   AS>  error : cannot bind : Address already in use exit
> 
> so find out what server is using that socket. maybe your web server is
> configured to use both ip addresses.
> 
>   AS> If I use 
> 
>   AS>  $sock = new IO::Socket::INET (  LocalHost => '192.168.0.104',
> 
>   AS> I'll get:
> 
>   AS>  error : cannot bind : Cannot assign requested address exit
> 
> well, that address doesn't exist so that error is expected.
> 
> you can't run two servers on the same address as you know. so you must
> delve into your box and see who is listening on that ip/port. or choose
> another port which is usually easy. there is no reason to require port
> 80 for a server. it is just the default one for http but you can use any
> free port you can find.
> 
> uri
> 
> -- 
> Uri Guttman  ------  uri at stemsystems.com  -------- 
http://www.sysarch.com
> --
> -----  Perl Code Review , Architecture, Development, Training, Support
> ------
> ---------  Gourmet Hot Cocoa Mix  -


More information about the toronto-pm mailing list