Git Product home page Git Product logo

asynckeepalive's Introduction

The future of AsyncKeepAlive

In 1.16, Paper has made a lot of changes to networking that caused this plugin is NOT working properly. And there is NO way to make it work properly again. Fixing these things isn't easy or fun and takes a lot of time and energy that I don't have. I have no plans to continue updating AsyncKeepAlive and no alternatives is present. AsyncKeepAlive will still works just fine from 1.7 to 1.11. I have no plans to continue fixing inconsistencies on 1.12+.

AsyncKeepAlive

Build Status

This is a plugin that reduce the probability of disconnects

Warning: This plugin is currently not stable. I didn't update it due to lack to time.

Compatibility

  • API Version: 1.14-R0.1-SNAPSHOT
  • Dependencies: ProtocolLib
  • Requirements: Java 7 or above

How it works

  • Open an asynchronous thread timing (every 4 seconds) to send a KeepAlive (heartbeat packet) to the online players, reducing the probability of players disconnect due to low TPS, instant stuck and network packet loss. This plugin can only reduce the probability of disconnects and cannot increase the network transmission speed.
  • Open an asynchronous thread receive all KeepAlive (heartbeat packet) and filter the KeepAlives. Cancel the packet whick is sent by the plugin and let the others go. This is required on 1.12+, and a bug fix on older versions (The latency is displayed as invaild).

Some Information

  • The server itself will send a KeepAlive to all clients every 20 seconds. The client must reply to the heartbeat packet within 30 seconds. Otherwise, the server is offline and the connection is displayed as dropped. If the server suddenly gets stuck, it will inevitably cause some players to disconnect. If It stucks more than 20 seconds, all the players will be disconnected. Because the heartbeat packet is sent in the main thread in a synchronous manner, the low TPS will cause the packet to be sent. Speed and response speed are slowing down. This plugin opens up a new asynchronous thread (not affected by TPS) and sends a heartbeat packet every 4 seconds, thus reducing the probability of players falling offline due to poor network conditions and low server TPS and instant card conditions.

This plugin uses bStats.

bStats sends the following data:

  • Your server's randomly generated UUID
  • The amount of players on your server
  • The online mode of your server
  • The bukkit version of your server (It seems like it doesn't send this)
  • The java version of your system (e.g. Java 8)
  • The name of your OS (e.g. Windows)
  • The version of your OS
  • The architecture of your OS (e.g. amd64)
  • The system cores of your OS (e.g. 8)
  • bStats-supported plugins
  • Plugin version of bStats-supported plugins

Tested versions

  • Spigot 1.14
  • Paperspigot 1.13.2 with ProtocolLib 4.4.0
  • Paperspigot 1.12.2 with ProtocolLib 4.4.0
  • Paperspigot 1.11.2 with ProtocolLib 4.4.0
  • Bukkit 1.7.10 with ProtocolLib unknown by Chinese MCBBS 夜夜夜、

Known issues

Nope

Development builds:

https://ci.ishland.com/job/AsyncKeepAlive/ (Take the first jar)

Sorry for my poor English, I am Chinese.

asynckeepalive's People

Contributors

ishland avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

asynckeepalive's Issues

Kick players with "Timed out"

This issue is reported on the community. But I does not have this issue.
I will keep looking.
All comments are welcome.

AsyncKeepAlive #52 failed

Build 'AsyncKeepAlive' is failing!

Last 50 lines of build output:

[...truncated 5.68 KB...]
[INFO] Downloading from dmulloy2-repo: http://repo.dmulloy2.net/nexus/repository/public/com/comphenix/executors/BukkitExecutors/1.1-SNAPSHOT/maven-metadata.xml
[INFO] Downloading from placeholderapi-repo: http://repo.extendedclip.com/content/repositories/placeholderapi/com/comphenix/executors/BukkitExecutors/1.1-SNAPSHOT/maven-metadata.xml
[INFO] Downloaded from dmulloy2-repo: http://repo.dmulloy2.net/nexus/repository/public/com/comphenix/executors/BukkitExecutors/1.1-SNAPSHOT/maven-metadata.xml (782 B at 686 B/s)
[INFO] Downloading from spigot-repo: https://hub.spigotmc.org/nexus/content/repositories/snapshots/org/spigotmc/spigot-api/1.14-R0.1-SNAPSHOT/spigot-api-1.14-R0.1-20190513.225337-106.jar
[INFO] Downloaded from spigot-repo: https://hub.spigotmc.org/nexus/content/repositories/snapshots/org/spigotmc/spigot-api/1.14-R0.1-SNAPSHOT/spigot-api-1.14-R0.1-20190513.225337-106.jar (1.2 MB at 429 kB/s)
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ AsyncKeepAlive ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 2 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) @ AsyncKeepAlive ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 16 source files to /var/lib/jenkins/workspace/AsyncKeepAlive/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /var/lib/jenkins/workspace/AsyncKeepAlive/src/main/java/com/ishland/bukkit/AsyncKeepAlive/main/Launcher.java:[17,49] package com.ishland.bukkit.AsyncKeepAlive.command does not exist
[ERROR] /var/lib/jenkins/workspace/AsyncKeepAlive/src/main/java/com/ishland/bukkit/AsyncKeepAlive/main/Launcher.java:[58,13] cannot find symbol
  symbol:   class CommandHandler
  location: class com.ishland.bukkit.AsyncKeepAlive.main.Launcher
[INFO] 2 errors 
[INFO] -------------------------------------------------------------
Started calculate disk usage of build
Finished Calculation of disk usage of build in 0 seconds
Started calculate disk usage of workspace
Finished Calculation of disk usage of workspace in 0 seconds
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  24.194 s
[INFO] Finished at: 2019-05-18T20:39:42+08:00
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project AsyncKeepAlive: Compilation failure: Compilation failure:
[ERROR] /var/lib/jenkins/workspace/AsyncKeepAlive/src/main/java/com/ishland/bukkit/AsyncKeepAlive/main/Launcher.java:[17,49] package com.ishland.bukkit.AsyncKeepAlive.command does not exist
[ERROR] /var/lib/jenkins/workspace/AsyncKeepAlive/src/main/java/com/ishland/bukkit/AsyncKeepAlive/main/Launcher.java:[58,13] cannot find symbol
[ERROR] symbol:   class CommandHandler
[ERROR] location: class com.ishland.bukkit.AsyncKeepAlive.main.Launcher
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[JENKINS] Archiving /var/lib/jenkins/workspace/AsyncKeepAlive/pom.xml to com.ishland.bukkit.AsyncKeepAlive/AsyncKeepAlive/0.4-SNAPSHOT/AsyncKeepAlive-0.4-SNAPSHOT.pom
channel stopped
Skipped archiving because build is not successful

Changes since last successful build:

  • [ishland] e572070 - Added commands

View full output

AsyncKeepAlive #5 failed

Build 'AsyncKeepAlive' is failing!

Last 50 lines of build output:

[...truncated 7.13 KB...]
[INFO] Downloaded from codemc-repo: https://repo.codemc.org/repository/maven-public/net/md-5/bungeecord-parent/1.13-SNAPSHOT/maven-metadata.xml (604 B at 1.2 kB/s)
[INFO] Downloaded from spigotmc-public: https://hub.spigotmc.org/nexus/content/groups/public/net/md-5/bungeecord-parent/1.13-SNAPSHOT/maven-metadata.xml (602 B at 534 B/s)
[INFO] Downloading from spigot-repo: https://hub.spigotmc.org/nexus/content/repositories/snapshots/com/comphenix/executors/BukkitExecutors/1.1-SNAPSHOT/maven-metadata.xml
[INFO] Downloading from codemc-repo: https://repo.codemc.org/repository/maven-public/com/comphenix/executors/BukkitExecutors/1.1-SNAPSHOT/maven-metadata.xml
[INFO] Downloading from dmulloy2-repo: http://repo.dmulloy2.net/nexus/repository/public/com/comphenix/executors/BukkitExecutors/1.1-SNAPSHOT/maven-metadata.xml
[INFO] Downloading from placeholderapi-repo: http://repo.extendedclip.com/content/repositories/placeholderapi/com/comphenix/executors/BukkitExecutors/1.1-SNAPSHOT/maven-metadata.xml
[INFO] Downloaded from dmulloy2-repo: http://repo.dmulloy2.net/nexus/repository/public/com/comphenix/executors/BukkitExecutors/1.1-SNAPSHOT/maven-metadata.xml (782 B at 992 B/s)
[INFO] Downloading from spigot-repo: https://hub.spigotmc.org/nexus/content/repositories/snapshots/org/spigotmc/spigot-api/1.13.2-R0.1-SNAPSHOT/spigot-api-1.13.2-R0.1-20190208.070653-151.jar
[INFO] Downloaded from spigot-repo: https://hub.spigotmc.org/nexus/content/repositories/snapshots/org/spigotmc/spigot-api/1.13.2-R0.1-SNAPSHOT/spigot-api-1.13.2-R0.1-20190208.070653-151.jar (1.1 MB at 605 kB/s)
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ AsyncKeepAlive ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ AsyncKeepAlive ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 2 source files to /var/lib/jenkins/workspace/AsyncKeepAlive/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /var/lib/jenkins/workspace/AsyncKeepAlive/src/main/java/com/ishland/bukkit/AsyncKeepAlive/main/AsyncKeepAlive.java:[52,29] cannot find symbol
  symbol: class PacketContainer
[INFO] 1 error
[INFO] -------------------------------------------------------------
Started calculate disk usage of build
Finished Calculation of disk usage of build in 0 seconds
Started calculate disk usage of workspace
Finished Calculation of disk usage of workspace in 0 seconds
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  03:30 min
[INFO] Finished at: 2019-02-08T15:33:10+08:00
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[JENKINS] Archiving /var/lib/jenkins/workspace/AsyncKeepAlive/pom.xml to com.ishland.bukkit.AsyncKeepAlive/AsyncKeepAlive/0.0.1/AsyncKeepAlive-0.0.1.pom
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project AsyncKeepAlive: Compilation failure
[ERROR] /var/lib/jenkins/workspace/AsyncKeepAlive/src/main/java/com/ishland/bukkit/AsyncKeepAlive/main/AsyncKeepAlive.java:[52,29] cannot find symbol
[ERROR] symbol: class PacketContainer
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
channel stopped
Skipped archiving because build is not successful

Changes since last successful build:

  • [ishland] debe8bc - Can it crash the client?

  • [ishland] c097e8f - Try to fliter packets

View full output

AsyncKeepAlive #3 failed

Build 'AsyncKeepAlive' is failing!

Last 50 lines of build output:

[...truncated 33.81 KB...]
[INFO] Downloading from codemc-repo: https://repo.codemc.org/repository/maven-public/cglib/cglib-nodep/3.2.5/cglib-nodep-3.2.5.jar
[INFO] Downloaded from codemc-repo: https://repo.codemc.org/repository/maven-public/org/bstats/bstats-bukkit/1.4/bstats-bukkit-1.4.jar (20 kB at 7.1 kB/s)
[INFO] Downloading from dmulloy2-repo: http://repo.dmulloy2.net/nexus/repository/public/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
[INFO] Downloading from dmulloy2-repo: http://repo.dmulloy2.net/nexus/repository/public/com/googlecode/json-simple/json-simple/1.1.1/json-simple-1.1.1.jar
[INFO] Downloading from dmulloy2-repo: http://repo.dmulloy2.net/nexus/repository/public/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1.jar
[INFO] Downloading from dmulloy2-repo: http://repo.dmulloy2.net/nexus/repository/public/com/google/guava/guava/21.0/guava-21.0.jar
[INFO] Downloading from dmulloy2-repo: http://repo.dmulloy2.net/nexus/repository/public/junit/junit/4.10/junit-4.10.jar
[INFO] Downloaded from dmulloy2-repo: http://repo.dmulloy2.net/nexus/repository/public/com/googlecode/json-simple/json-simple/1.1.1/json-simple-1.1.1.jar (24 kB at 22 kB/s)
[INFO] Downloading from dmulloy2-repo: http://repo.dmulloy2.net/nexus/repository/public/com/google/code/gson/gson/2.8.0/gson-2.8.0.jar
[INFO] Downloaded from dmulloy2-repo: http://repo.dmulloy2.net/nexus/repository/public/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1.jar (77 kB at 42 kB/s)
[INFO] Downloading from dmulloy2-repo: http://repo.dmulloy2.net/nexus/repository/public/org/yaml/snakeyaml/1.23/snakeyaml-1.23.jar
[INFO] Downloaded from dmulloy2-repo: http://repo.dmulloy2.net/nexus/repository/public/commons-lang/commons-lang/2.6/commons-lang-2.6.jar (284 kB at 144 kB/s)
[INFO] Downloading from dmulloy2-repo: http://repo.dmulloy2.net/nexus/repository/public/me/clip/placeholderapi/2.9.2/placeholderapi-2.9.2.jar
[INFO] Downloaded from dmulloy2-repo: http://repo.dmulloy2.net/nexus/repository/public/junit/junit/4.10/junit-4.10.jar (253 kB at 128 kB/s)
[INFO] Downloading from dmulloy2-repo: http://repo.dmulloy2.net/nexus/repository/public/org/eclipse/jdt/org.eclipse.jdt.annotation/2.2.200/org.eclipse.jdt.annotation-2.2.200.jar
[INFO] Downloading from dmulloy2-repo: http://repo.dmulloy2.net/nexus/repository/public/com/comphenix/protocol/ProtocolLib/4.4.0/ProtocolLib-4.4.0.jar
[INFO] Downloaded from dmulloy2-repo: http://repo.dmulloy2.net/nexus/repository/public/org/eclipse/jdt/org.eclipse.jdt.annotation/2.2.200/org.eclipse.jdt.annotation-2.2.200.jar (26 kB at 10 kB/s)
[INFO] Downloading from dmulloy2-repo: http://repo.dmulloy2.net/nexus/repository/public/com/comphenix/protocol/ProtocolLib-API/4.4.0/ProtocolLib-API-4.4.0.jar
[INFO] Downloaded from dmulloy2-repo: http://repo.dmulloy2.net/nexus/repository/public/com/comphenix/protocol/ProtocolLib-API/4.4.0/ProtocolLib-API-4.4.0.jar (745 kB at 183 kB/s)
[INFO] Downloading from dmulloy2-repo: http://repo.dmulloy2.net/nexus/repository/public/cglib/cglib-nodep/3.2.5/cglib-nodep-3.2.5.jar
[INFO] Downloaded from dmulloy2-repo: http://repo.dmulloy2.net/nexus/repository/public/com/google/code/gson/gson/2.8.0/gson-2.8.0.jar (232 kB at 55 kB/s)
[INFO] Downloading from dmulloy2-repo: http://repo.dmulloy2.net/nexus/repository/public/com/comphenix/executors/BukkitExecutors/1.1-SNAPSHOT/BukkitExecutors-1.1-20170429.151522-2.jar
[INFO] Downloaded from dmulloy2-repo: http://repo.dmulloy2.net/nexus/repository/public/org/yaml/snakeyaml/1.23/snakeyaml-1.23.jar (301 kB at 68 kB/s)
[INFO] Downloaded from dmulloy2-repo: http://repo.dmulloy2.net/nexus/repository/public/cglib/cglib-nodep/3.2.5/cglib-nodep-3.2.5.jar (353 kB at 73 kB/s)
[INFO] Downloaded from dmulloy2-repo: http://repo.dmulloy2.net/nexus/repository/public/com/comphenix/executors/BukkitExecutors/1.1-SNAPSHOT/BukkitExecutors-1.1-20170429.151522-2.jar (28 kB at 5.7 kB/s)
[INFO] Downloaded from dmulloy2-repo: http://repo.dmulloy2.net/nexus/repository/public/com/google/guava/guava/21.0/guava-21.0.jar (2.5 MB at 503 kB/s)
[INFO] Downloaded from dmulloy2-repo: http://repo.dmulloy2.net/nexus/repository/public/com/comphenix/protocol/ProtocolLib/4.4.0/ProtocolLib-4.4.0.jar (1.5 MB at 72 kB/s)
[INFO] Downloading from placeholderapi-repo: http://repo.extendedclip.com/content/repositories/placeholderapi/me/clip/placeholderapi/2.9.2/placeholderapi-2.9.2.jar
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/me/clip/placeholderapi/2.9.2/placeholderapi-2.9.2.jar
Started calculate disk usage of build
Finished Calculation of disk usage of build in 0 seconds
Started calculate disk usage of workspace
Finished Calculation of disk usage of workspace in 0 seconds
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  05:05 min
[INFO] Finished at: 2019-02-07T21:51:58+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project AsyncKeepAlive: Could not resolve dependencies for project com.ishland.bukkit.AsyncKeepAlive:AsyncKeepAlive:jar:0.0.1: Could not transfer artifact me.clip:placeholderapi:jar:2.9.2 from/to placeholderapi-repo (http://repo.extendedclip.com/content/repositories/placeholderapi/): Connect to repo.extendedclip.com:80 [repo.extendedclip.com/192.99.55.90] failed: Connection timed out (Connection timed out) -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
Waiting for Jenkins to finish collecting data[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

[JENKINS] Archiving /var/lib/jenkins/workspace/AsyncKeepAlive/pom.xml to com.ishland.bukkit.AsyncKeepAlive/AsyncKeepAlive/0.0.1/AsyncKeepAlive-0.0.1.pom
channel stopped

Changes since last successful build:
No changes
No changes
No changes

View full output

新的构建?

你好,我看您的仓库中1个月前做了变动,但是没有发布出来是吗?
目前我个人用CatServer最新的稳定版,用了这个插件
我想问一下怎么才能确定这个插件有效果?
目前后台未发现报错。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.