Re: Problem with Blitz on MacBook (MacOS_X)

Gregg Wonderly <[email protected]> Tue, 21 Nov 2006 07:57:42 -0600
Newsgroups gmane.comp.java.sun.javaspaces
Message-ID <[email protected]>
Christian Hager wrote:
> I'm trying to run the Blitz Javaspace on a MacBook running Mac OS X and I
> keep getting the following exception. I currently have no idea why because.
> I ran the same Code on a Windows XP machine and there it works.
> Blitz seems to start normally but when I try to instantiate LookupDiscovery
> in my application I get the below error.

>  at java.net.DatagramSocket.bind(DatagramSocket.java:368)
>  at java.net.MulticastSocket.<init>(MulticastSocket.java:147)
>  at java.net.MulticastSocket.<init>(MulticastSocket.java:112)
>  at net.jini.discovery.LookupDiscovery$AnnouncementListener.<init>(LookupDiscovery.java:1025)
>  at net.jini.discovery.LookupDiscovery$10.run(LookupDiscovery.java:3073)
>  at java.security.AccessController.doPrivileged(Native Method)
>  at net.jini.security.Security$5.run(Security.java:543)
>  at java.security.AccessController.doPrivileged(Native Method)
>  at net.jini.security.Security.doPrivileged(Security.java:540)
>  at net.jini.discovery.LookupDiscovery.beginDiscovery(LookupDiscovery.java:3071)
>  at net.jini.discovery.LookupDiscovery.<init>(LookupDiscovery.java:1884)

This stack trace indicates that a multicast lookup is being attempted and the
announcement listener is attempting to bind to the 4160 port, but can't.  It
appears that this port is already in use by another process on your computer.
Use 'netstat -an | grep :4160', when you aren't running the blitz and Jini stuff
that you've started.  You should not see any output.  If you do, then there is
something using that port.  That port number is reserverd with IANA.

See:
http://www.iana.org/assignments/multicast-addresses
http://www.iana.org/assignments/port-numbers

So, if that port is already in use, then there might already be an instance of
Reggie running for some reason.

Gregg Wonderly

===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff JAVASPACES-USERS".  For general help, send email to
[email protected] and include in the body of the message "help".

To view past JAVASPACES-USERS postings, please see:
http://archives.java.sun.com/archives/javaspaces-users.html