Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#22 No connectivity on Linux

open
nobody
None
5
2006-02-04
2006-02-04
Scott Wolchok
No

When I start GIT on Debian testing (AMD64, though this
doesn't look like an arch-dependent problem), I can't
see any shared music. I have confirmed that there is in
fact shared music by using ourTunes. Here is the
console output from GIT:

scott@Earthbound:~/GIT$ ./git.sh
creating file...
creating FileMonitor...
adding file...
reading xml...
Error reading xml file; creating new structure.
creating xml...
creating file...
creating FileMonitor...
adding file...
Local!
Show Splash: true
javax.swing.plaf.basic.BasicSplitPaneDivider$MouseHandler@23000bcf
javax.swing.plaf.basic.BasicSplitPaneDivider$MouseHandler@23000bcf
javax.swing.plaf.basic.BasicSplitPaneDivider$MouseHandler@6e20f237
javax.swing.plaf.basic.BasicSplitPaneDivider$MouseHandler@6e20f237
javax.swing.plaf.basic.BasicSplitPaneDivider$MouseHandler@265a2eaa
javax.swing.plaf.basic.BasicSplitPaneDivider$MouseHandler@265a2eaa
New player: 0
adding local host: GIT Music
adding local host: iPod
adding local host: iTunes Music
java.net.SocketException: bad argument for
IP_MULTICAST_IF: address not bound to any interface
at
java.net.PlainDatagramSocketImpl.socketSetOption(Native
Method)
at
java.net.PlainDatagramSocketImpl.setOption(PlainDatagramSocketImpl.ja
va:299)
at
java.net.MulticastSocket.setInterface(MulticastSocket.java:420)
at javax.jmdns.JmDNS.init(JmDNS.java:83)
at javax.jmdns.JmDNS.<init>(JmDNS.java:69)
at
org.git.client.swing.GetItTogether.<init>(GetItTogether.java:790)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
at
java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at
org.git.client.swing.GITStartup.main(GITStartup.java:57)

Discussion

  • Lokimad
    Lokimad
    2006-02-24

    Logged In: YES
    user_id=1225191

    Hello man!!

    I've fixed it, take a look at the cvs or wait a release

     
  • Logged In: YES
    user_id=392994

    lokimad, your bugfix works, but what if you have multiple
    interfaces ?
    maybe we could have a list of interfaces on the settings
    dialog, and specify that interface on the git.xml ?

    Listing the interfaces is simple, and then you can use
    NetworkInterface.getByName() to recover that interface
    (supposing you store the interface's name on the config file)

    Maybe later it would be possible to listen on more than one
    interface ?

    Below is a sample code I wrote to list all interfaces and
    their addresses

    import java.util.Enumeration;
    import java.net.NetworkInterface;

    public class Network {

    public static void main (String args[]) {
    try {
    Enumeration cards =
    NetworkInterface.getNetworkInterfaces();
    while(cards.hasMoreElements() ) {
    NetworkInterface card =
    (NetworkInterface) cards.nextElement();
    Enumeration addrs =
    card.getInetAddresses();
    System.out.println("Card " +
    card.getDisplayName());

    while(addrs.hasMoreElements()) {

    System.out.println(addrs.nextElement());
    }
    }

    }
    catch(Exception e) {

    }

    }
    }

     
  • Lokimad
    Lokimad
    2006-03-31

    Logged In: YES
    user_id=1225191

    I've mind that.

    When the machine have 2 or more interfaces ask for the user
    about what interface to use.

    I'll work on that as soon as I've time.

    ...

     
  • Logged In: YES
    user_id=392994

    I hacked GITUtils.java so it would work on my wireless
    connection (it was getting the ip from tun0, my vpn interface)

    public static InetAddress getLocalInetAddress() {
    try {
    NetworkInterface eth =
    NetworkInterface.getByName("wlan0");
    Enumeration ethaddr = eth.getInetAddresses();
    return (InetAddress) ethaddr.nextElement();
    } catch (Exception e) {return null;}
    }

    Maybe this "wlan0" could be stored on the .xml file.
    Working fine here (can listen to my songs again).
    Love your software, if you need any help, just pm me.

     
  • Logged In: NO

    Works on my pc. Running puppy linux 1.0.8 + 1.0.9