Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discovery broken out of the box #30

Open
ghost opened this issue Nov 12, 2013 · 7 comments
Open

Discovery broken out of the box #30

ghost opened this issue Nov 12, 2013 · 7 comments

Comments

@ghost
Copy link

ghost commented Nov 12, 2013

From golgo...@gmail.com on December 29, 2012 23:19:58

What steps will reproduce the problem?

  1. Download the latest .zip
  2. Using the all jar.
  3. Just run the discovery code copy pasted from the front page of this project. First run server, then run client. The client immediately throws an exception.

    What is the expected output? What do you see instead?
    This code should work out of the Box

    What version of the product are you using? On what operating system?
    Kronet 2.20
    Mac OSx 10.8

    Please provide any additional information below.
    Immediately get this error on the client.

    00:00 ERROR: [kryonet] Host discovery failed.
    java.io.IOException: Invalid argument
    at java.net.PlainDatagramSocketImpl.send(Native Method)
    at java.net.DatagramSocket.send(DatagramSocket.java:625)
    at com.esotericsoftware.kryonet.Client.broadcast(Client.java:412)
    at com.esotericsoftware.kryonet.Client.discoverHost(Client.java:428)
    at DiscoveryClient.main(DiscoveryClient.java:15)
    null

Original issue: http://code.google.com/p/kryonet/issues/detail?id=29

@ghost
Copy link
Author

ghost commented Nov 12, 2013

From golgo...@gmail.com on December 29, 2012 14:24:47

Ah, fixed it. You need to require ipv4 like this.
System.setProperty("java.net.preferIPv4Stack" , "true");

@ghost
Copy link
Author

ghost commented Nov 12, 2013

From golgo...@gmail.com on December 29, 2012 15:21:34

This actually fails as a client in Android though, with or without that property. The stack trace is as follows.

12-29 18:07:57.619: I/System.out(8041): 00:00 ERROR: [kryonet] Host discovery failed.
12-29 18:07:57.619: I/System.out(8041): java.net.SocketException: sendto failed: ENETUNREACH (Network is unreachable)
12-29 18:07:57.619: I/System.out(8041): at libcore.io.IoBridge.maybeThrowAfterSendto(IoBridge.java:506)
12-29 18:07:57.619: I/System.out(8041): at libcore.io.IoBridge.sendto(IoBridge.java:475)
12-29 18:07:57.619: I/System.out(8041): at java.net.PlainDatagramSocketImpl.send(PlainDatagramSocketImpl.java:182)
12-29 18:07:57.619: I/System.out(8041): at java.net.DatagramSocket.send(DatagramSocket.java:284)
12-29 18:07:57.619: I/System.out(8041): at com.esotericsoftware.kryonet.Client.broadcast(Client.java:412)
12-29 18:07:57.619: I/System.out(8041): at com.esotericsoftware.kryonet.Client.discoverHost(Client.java:428)
12-29 18:07:57.619: I/System.out(8041): at jibo.networking.MainActivity$1.run(MainActivity.java:60)

@ghost
Copy link
Author

ghost commented Nov 12, 2013

From maximili...@gmail.com on February 26, 2013 14:20:00

I can confirm that this is broken on both Desktop and Android. Setting
System.setProperty("java.net.preferIPv4Stack" , "true");
didn't help on either system.
Would be awesome if you can fix this! :)

@ghost
Copy link
Author

ghost commented Nov 12, 2013

From nathan.s...@gmail.com on February 26, 2013 14:41:45

Not sure what the deal is with this. Android networking is notoriously bad...

@ghost
Copy link
Author

ghost commented Nov 12, 2013

From JedyDe...@gmail.com on February 26, 2013 15:04:29

I have the same issue.

here "doomtoo on: 22-09-12" claims to have an fix to the problem: https://groups.google.com/forum/?fromgroups=#!topic/kryonet-users/UO8B9jzV5Bo

I think he is right about the issue but I'm quite a noob with .jars and can't get his fix working (I get a whole bunch of other errors due to lib related stuff)

maybe one of you guys can get his fix working?

@ghost
Copy link
Author

ghost commented Nov 12, 2013

From JedyDe...@gmail.com on February 27, 2013 03:16:42

My project works now again look at this conversation:

doomtoo, on 22-09-12:
https://groups.google.com/forum/?fromgroups=#!topic/kryonet-users/UO8B9jzV5Bo

@ghost
Copy link
Author

ghost commented Nov 12, 2013

From naar...@gmail.com on September 14, 2013 13:55:44

same problem, same solution (on KindleFire HD and on other Android devices)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

0 participants