[MISC] CraftProxy 0.2.0 - Reduce bandwidth use by caching chunk data [1.6]

Discussion in 'Archived: Plugin Releases' started by Raphfrk, May 1, 2011.

  1. Offline

    Raphfrk

    CraftProxy - Reduce bandwidth use by caching chunk data
    Version: 0.2.0

    Description

    This plugin and local client allows chunk data to be cached locally by players. This reduces the bandwidth required for hosting the server. It also helps users who are on slower connections.

    I am not sure what the status of this system is. It doesn't count as a plugin, since it has 2 parts.

    Even when running the plugin, players who don't use the client proxy can still connect. However, they will use the full bandwidth.

    The system can reduce bandwidth by 70-90% (after the 2nd login).

    Setup

    Server

    Add the plugin file to the plugins folder

    Client

    Start minecraft client and login
    Double click on the client jar file
    Enter login details
    Enter the server location/port in the GUI
    Press start on the GUI
    Connect to localhost on the minecraft client

    Stable Builds

    None yet

    Dev Builds

    Warning: These may not be stable

    Client
    Plugin

    Had it get the compress/decompression gain backwards.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 14, 2016
    Jushy, Martin1704, Nathan C and 24 others like this.
  2. Offline

    LEOcab

    Microsoft y u so noob?

    Also: Netscape Navigator
    Also: iCab
     
  3. Offline

    Raphfrk

    So, you want something like

    Player <-high bandwidth -> Proxy on VPS <- low bandwidth -> Proxy Lock <-> Server

    ?

    That would give you the benefits of the caching, but players wouldn't need to run the local proxy. Hmm, the proxy tends to have a lower load. You would set both servers to auth_off, so that they hand off the login to the next server in the chain.

    Can you try waiting 10 seconds after the login window appears. I wonder if the ping is causing issues with the flood protection. Also, can you see what happens if you run the server in offline mode and what happens with people who connect directly.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 17, 2016
  4. Offline

    Glen

    Waiting 10 seconds after client pings to then attempt login made no difference in the outcome I have been having. running server and proxy both in off-line mode did not resolve the error either. connecting directly from client to server I did not have any issues. About the only non standard config setting I can think of is I'm running server on the standard port and proxy on 25567.

    Love the plugin and proxy have used it in the past with minimal issues back when the proxy and server-port plug-in where all on the same plugin page. Just came back from admin retirement and since I don't see anyone else reporting issues I'm wondering if its something I have set-up wrong been quite a few changes in the 4 months I been gone so I'm a bit rusty. Hopefully a solution can be found to get the proxy working for me.

    Edit also tested running proxy on 25565 and server on 25567 and still had buffer miscalculation for length errors.
     
  5. Offline

    dominixise

    I am also having trouble with craftproxyliter. There is lengh errors and some none readable packets I guess.
    says [info] unknown packet Id fc
    [severe] lists a whole bunch of packet numbers
    I cannot paste in the error, sadly my paste command is not working. I've tried I think everything from changing the ip address to my firewall and router nat settings and I still cannot connect through craftproxyliter. Disconnects me after i login with Xauth plugin.
    To list how i have my server connected is:
    Serverport
    server: freebuild 192.168.0.16:50941 portnum:25464
    server: war 192.168.0.16:50942 portnum:25465
    craftproxy: 25565,192.168.0.16:50942
    listen:25565
    i have all firewalls and portforwarding enabled properly too.
    Thanks, can't wait to get my servers going again after the update timeout from bukkit
     
  6. Offline

    The_Wrecker

    I've stopped using this for now,

    The reason I used this in the past was to prevent disconnects, but with 1.0.1 I dont have any anymore. Would install it again though if it gets updated.
     
  7. Offline

    Raphfrk

    It would be really great if you could print those numbers. They are the data stream and it lets me look to try to track down the problem.

    So, you have forwarding:

    External 25464 -> 192.168.0.16:50941 (server - freebuild) -> not really needed, unless you also want direct connections as an option
    External 25465 -> 192.168.0.16:50942 (server - war) -> not really needed, unless you also want direct connections as an option

    External 25565 -> <proxy-server>:25565 (proxy)

    I think "25565,192.168.0.16:50942" is more complex than needed. Just set it to connect to 192.168.0.16:59042.

    I might add more debug code. Login packets are handled "manually", so don't have proper error messages.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 17, 2016
  8. Offline

    dominixise

    Thanks Raphfrk, I have to use 25565,192.168.0.16:50942 in my proxylite.txt or else i can't even connect. I did get that error packets and stuff though.
    12:07:48 [INFO] [xAuth] Player 'nescar' has authenticated
    12:07:50 [INFO] Unknown packet Id a9
    12:07:50 [SEVERE] Unknown packet Id a9
    12:07:50 [SEVERE] 4b f8 ae 9 f0 c6 cf 7a 41 8b 80 c3 b4 0 6d 68 8c 28 ff 42 90 3
    7 0 c3 e1 64 82 eb 6f 62 23 9e fe 3b f3 7f f 4b 98 31 62 e9 bf b 7f b0 64 fd b7
    e9 ef a2 ec bc 44 fd 37 ac fe 14 d3 b 5f 82 e7 f8 bc f3 1f f8 a 62 61 aa 49 e6 f
    d 3f 82 b5 *a9* ff c 7c b7 fe 13 f2 ff c8 a3 3 35 f9 6d 3b ff 77 e1 67 c8 15 fd
    af fc 5d c1 17 a4 67 e0 82 2f d d1 55 18 ce f2 5f 32 be a3 d1 d2 6 c0 fd 93 ad e
    3 2f 5f ff 79 fa 6b c0 f7 85 2d 8f bf ad f0 93 c5 4 b2 fe b2 ca c 3a 1b b1 f4 3f
    a9 ff
    12:07:50 [INFO] [12:07:50 PM] 174.3.114.194/49328 (nescar): Downstream link
    12:07:50 [INFO] [12:07:50 PM] 174.3.114.194/49328 (nescar): Unable to read pack
    et
    12:07:50 [INFO] [12:07:50 PM] 174.3.114.194/49328 (nescar): Packets: [50, 50, 50
    , 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 13, 51, -126, 51, 103, 103, 103]
    12:07:51 [INFO] Connection reset
    12:07:51 [INFO] [12:07:51 PM] 174.3.114.194/49328 (nescar): Closed connection to
    server
    12:07:51 [SEVERE] java.net.SocketException: Connection reset by peer: socket wri
    te error
    12:07:51 [INFO] [12:07:51 PM] 174.3.114.194/49328 (nescar): Closed connection to
    client
    12:07:51 [SEVERE] at java.net.SocketOutputStream.socketWrite0(Native Metho
    d)
    12:07:51 [SEVERE] at java.net.SocketOutputStream.socketWrite(Unknown Sourc
    e)
    12:07:51 [SEVERE] at java.net.SocketOutputStream.write(Unknown Source)
    12:07:51 [SEVERE] at java.io.BufferedOutputStream.flushBuffer(Unknown Sour
    ce)
    12:07:51 [SEVERE] at java.io.BufferedOutputStream.flush(Unknown Source)
    12:07:51 [INFO] nescar lost connection: disconnect.endOfStream
    12:07:51 [SEVERE] at java.io.DataOutputStream.flush(Unknown Source)
    12:07:51 [SEVERE] at net.minecraft.server.NetworkWriterThread.run(SourceFi
    le:104)
    12:07:51 [SEVERE] java.net.SocketException: Connection reset by peer: socket wri
    te error
    12:07:51 [SEVERE] at java.net.SocketOutputStream.socketWrite0(Native Metho
    d)
    12:07:51 [SEVERE] at java.net.SocketOutputStream.socketWrite(Unknown Sourc
    e)
    12:07:51 [SEVERE] at java.net.SocketOutputStream.write(Unknown Source)
    12:07:51 [SEVERE] at java.io.BufferedOutputStream.flushBuffer(Unknown Sour
    ce)
    12:07:51 [SEVERE] at java.io.BufferedOutputStream.flush(Unknown Source)
    12:07:51 [SEVERE] at java.io.DataOutputStream.flush(Unknown Source)
    12:07:51 [SEVERE] at net.minecraft.server.NetworkWriterThread.run(SourceFi
    le:104)
    12:07:52 [INFO] Freed 55.017 MB.
     
  9. Offline

    Glen

    Not sure if relevant but while testing yesterday got unusual output from craftproxyliter when one of my players tried to connect i recall it happening before but it does seem rare.
    [3:03:56 PM] 24.47.103.11/49625: Forwarding ping
    Connection from 24.47.103.11/49628
    [3:03:58 PM] 24.47.103.11/49628 (nail200): Connecting to : localhost 25567
    [3:03:58 PM] 24.47.103.11/49628 (nail200): Attempting to connect to: localhost:25567
    [3:03:58 PM] 24.47.103.11/49628 (nail200): Connecting to: localhost:25567 from 127.0.10.11
    [3:03:58 PM] 24.47.103.11/49628 (nail200): Connection successful
    [3:03:58 PM] 24.47.103.11/49628 (nail200): Connecting using proxy to server connection format
    [3:03:59 PM] 24.47.103.11/49628 (nail200): Server login successful
    Connection from 142.162.188.37/61033
    [3:04:02 PM] 142.162.188.37/61033: Forwarding ping
    [3:04:28 PM] 24.47.103.11/49628 (nail200): Chunk initialise packet sent for already initialised chunk -1, 6
    [3:04:28 PM] 24.47.103.11/49628 (nail200): Chunk initialise packet sent for already initialised chunk -1, 7
    [3:04:28 PM] 24.47.103.11/49628 (nail200): Chunk initialise packet sent for already initialised chunk 0, 6
    [3:04:28 PM] 24.47.103.11/49628 (nail200): Chunk initialise packet sent for already initialised chunk 0, 7
    [3:04:28 PM] 24.47.103.11/49628 (nail200): Chunk initialise packet sent for already initialised chunk -1, 5
    [3:04:28 PM] 24.47.103.11/49628 (nail200): Chunk initialise packet sent for already initialised chunk 0, 5
    [3:04:28 PM] 24.47.103.11/49628 (nail200): Chunk initialise packet sent for already initialised chunk 1, 5
    [3:04:28 PM] 24.47.103.11/49628 (nail200): Chunk initialise packet sent for already initialised chunk 1, 6
    [3:04:28 PM] 24.47.103.11/49628 (nail200): Chunk initialise packet sent for already initialised chunk 1, 7
    [3:04:28 PM] 24.47.103.11/49628 (nail200): Chunk initialise packet sent for already initialised chunk -1, 4
    [3:04:28 PM] 24.47.103.11/49628 (nail200): Chunk initialise packet sent for already initialised chunk 0, 4
    [3:04:28 PM] 24.47.103.11/49628 (nail200): Chunk initialise packet sent for already initialised chunk 1, 4
    [3:04:28 PM] 24.47.103.11/49628 (nail200): Chunk initialise packet sent for already initialised chunk 2, 4
    [3:04:28 PM] 24.47.103.11/49628 (nail200): Chunk initialise packet sent for already initialised chunk 2, 5
    [3:04:28 PM] 24.47.103.11/49628 (nail200): Chunk initialise packet sent for already initialised chunk 2, 6
    [3:04:28 PM] 24.47.103.11/49628 (nail200): Chunk initialise packet sent for already initialised chunk 2, 7
    [3:04:28 PM] 24.47.103.11/49628 (nail200): Chunk initialise packet sent for already initialised chunk -1, 3
    [3:04:28 PM] 24.47.103.11/49628 (nail200): Chunk initialise packet sent for already initialised chunk 0, 3
    [3:04:28 PM] 24.47.103.11/49628 (nail200): Chunk initialise packet sent for already initialised chunk 1, 3
    [3:04:28 PM] 24.47.103.11/49628 (nail200): Chunk initialise packet sent for already initialised chunk 2, 3
    [3:04:28 PM] 24.47.103.11/49628 (nail200): Chunk initialise packet sent for already initialised chunk 3, 3
    [3:04:28 PM] 24.47.103.11/49628 (nail200): Chunk initialise packet sent for already initialised chunk 3, 4
    [3:04:28 PM] 24.47.103.11/49628 (nail200): Chunk initialise packet sent for already initialised chunk 3, 5
    [3:04:28 PM] 24.47.103.11/49628 (nail200): Chunk initialise packet sent for already initialised chunk 3, 6
    [3:04:28 PM] 24.47.103.11/49628 (nail200): Chunk initialise packet sent for already initialised chunk 3, 7
    Connection from 66.31.12.60/56928
    [3:04:41 PM] 66.31.12.60/56928: Forwarding ping
    Connection from 121.218.231.151/3691
    [3:04:52 PM] 121.218.231.151/3691: Forwarding ping
    Connection from 66.31.12.60/56935
    [3:05:11 PM] 66.31.12.60/56935: Unable to send Kick packet: IO Error reading client handshake
    [3:06:21 PM] 24.47.103.11/49628 (nail200): Chunk update packet sent for unallocated chunk 7, 18 adding fake init packet
     
  10. Offline

    dominixise

    hmm strange but my rental server at servercraft.co killerskingdom.servercraft.co:25564 and i have it running the same craftproxyliter as on my home server and there is not any errors connected with it. Hmmm I wonder if its my router or something fishy on my home network.
     
  11. Offline

    Raphfrk

    I am not sure what is happening, I think I need to increase the window of packet data that is displays.
     
  12. Offline

    LEOcab

    I'm getting the same error as @dominixise . I don't know when it started happening or why. :(
    [edit] Hold on... I think it's gone in the latest RB. Let me test it a bit longer. [/edit]

    Btw the VPS idea I mentioned in an earlier post was working GREAT until we started getting that error - lots of players confirmed a much better connection on it. I hope you update this soon. :D
     
  13. Offline

    Raphfrk

    So is it gone with the latest RB ?
     
  14. Offline

    dominixise

    I don't think so, i am using it 1597rb ever since it came out. I wonder why my home lan cannot accept proxy packets but my serverhost cannot too now it seems. It says Received string length is less than zero! Weird
     
  15. Offline

    dafluf

    Got a bit of an issue here.
    I keep getting an error.

    These are the steps I perform:
    - Connect to the craftproxy server
    - Craft golden boots
    - Put golden boots in inventory
    -OR-
    -/give player 317

    Result:
    - Dropped from server
    - Error message from minecraft: Internal exception: java.net.SocketException: Software caused connection abort: recv failed.
    - Message from console: 00:18:35 [INFO] player: Giving player some 317 (GOLD_BOOTS)
    00:18:41 [SEVERE] Buffer mis-calculation for length??
    00:18:41 [INFO] Buffer mis-calculation for length??
    - Unable to log in again. (Java.lang.nullpointerexception)

    When i connect to the server directly, (without using Craftproxy) everything works fine. The golden boots are sitting in my inventory

    Does anyone else see this issue?
    Is it possible to fix this?

    EDIT:
    I've been fiddling with the code myself, and it seems that I found a fix.
    @Raphfrk: I've sent you a PM on what I did to solve the problem. (in case you are interested :))
     
  16. Offline

    Raphfrk

    Thanks for finding the typo, hopefully, it will be more stable for people now.

    To everyone else, version 128 has Dafluf's fix.
     
  17. Offline

    d00ba

    Very interesting. Shame it requires client download though
     
  18. Offline

    Raphfrk

    It is an extra program on the player's computer. However, there is no way around that, the default client can't decompress.
     
  19. Offline

    Pantheis

    @Raphfrk I see in the change log that adding modloaderMP support was attempted a couple of versions back. Does this work?

    I have a RedPower based server that I'd like to use CraftProxy with, but I need to make sure that it'll pass anything through that RedPower / Modloader/ModloaderMP needs.

    Thanks!

    [edit]
    I went ahead and tried to test it. I get connected, as far as my client is concerned, but no world data loads, I fall to about -128 and then disconnect. Checking the server.log file shows that I connected, but failed to announce that I had any of the required client mods installed. Other players saw me connect and immediately disconnect.
     
  20. Offline

    Raphfrk

    Hmm, not sure. There were issues with it and maybe the changed the protocol since.

    If you could get the Modloader people to state the protocol, then I can have a look.
     
  21. Offline

    Pantheis

    I'll see what I can do. Thanks! :)
     
  22. Offline

    flud

    i think it possible for clients, instead start another jar just use it like a mod_craftproxy ?
     
  23. Offline

    Raphfrk

    Maybe, the issue is that I don't have the time to keep updating a mod.
     
  24. Offline

    strontkever

    old post but..
    Ohh i want that!!

    im trying to get my players using this

    the limit on my server is 16 players normally with 17+ people drop off +lagg

    now we got a couple of players using craftproxy, and it holds 20 players without people saying lagg etc.

    i have a 1mb upload connection, do u know any (eg) tcp tweaks or other settings i could try to make the connection more stable?

    people do still drop off and timeout with 23+ players

    old post i know, i am running this together with spout..

    i think i read its not a problem, is it?

    another stacking post (wonder where the [edit] button is ;))

    players using the proxy tell me when they teleport/warp, it takes a long time until the chunk is loaded
    they skeep falling they say, (could be because 22+ players is just too much) but thought i'd let u know

    Code:
    2012-01-04 23:24:09 [INFO] IO ERROR
    2012-01-04 23:24:09 [INFO] 173.77.134.155/55880 (legaltalent112): Unable to flush output stream
    2012-01-04 23:24:09 [INFO] 173.77.134.155/55880 (legaltalent112): Closed connection to server
    2012-01-04 23:24:09 [INFO] 173.77.134.155/55880 (legaltalent112): Closed connection to client
    
    --------------------------and-----------------------
    
    2012-01-04 23:24:10 [INFO] [Mod]xXAlphaOmegaXx: with craftproxy i fall through the world more when i tp or warp somewhere
    
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 17, 2016
  25. Offline

    Raphfrk

    Dunno, it could be that the steam is ending due to timeouts or something. Was there any other errors?
     
  26. Offline

    strontkever

    its a common error i had without the proxy, people having timeouts when 16+ people were playing

    is there anything i can do about it?
    i gues my upload is just to slow
     
  27. Offline

    Raphfrk

    I guess, if the server doesn't can't send timeouts to all players once a minute then it will disconnect.
     
  28. Offline

    Coelho

    I am currently running this on a server with 300 people online at once with Server Port to distribute the load between multiple servers (vaultcraft.com), however I am currently having an issue which has been making this quite annoying. For note, I am running CraftProxyLiter dedicated, and not as a plugin. Each individual server (using Server Port) is on a different machine all together as well.​
    My first issue is simply that sometimes CraftProxy after running for approximately an hour continuously spams the error message:​
    It sometimes stops, but more than likely continues until the server is really bogged down.​
    My second issue is that CraftProxy sometimes stops accepting connections stating:​
    I have somewhat fixed this issue by increasing my max files, however I shouldn't really have to, and this is probably a design flaw. I actually received this error when my max open files was 4096.​
    If these problems could get resolved, I would be grateful. Thanks, - Coelho​
     
  29. Offline

    Raphfrk

    You may have things configured wrongly. There should be no caching on the server, so no files opened.

    Can you check if you have a CPL_cache directory and what is the total size of all files there. Have you set the "local_cache" parameter to true? It should be false for the server, since you don't want it caching.

    The fairness manager shouldn't exists anymore so dunno what is causing that, it could be related to other exceptions that have crashed threads.
     
  30. Offline

    Coelho

    The opened files are the sockets. I have local_cache turned off, so my CPL_cache directory is empty. On another note, what I am currently using to run CraftProxy is:
     
  31. Offline

    Raphfrk

    That looks ok. I am not sure it is worth doing anything other than java -jar <etc>. It should be small enough that it doesn't matter. I am not sure why it is causing a problem with sockets though.
     

Share This Page