Giter VIP home page Giter VIP logo

redisbungee's Introduction

RedisBungee

RedisBungee bridges Redis and BungeeCord together. This is the solution deployed on The Chunk to make sure our multi-Bungee setup flows smoothly together.

Compiling

RedisBungee is distributed as a maven project. To compile it and install it in your local Maven repository:

git clone https://github.com/minecrafter/RedisBungee.git
cd RedisBungee
mvn clean install

Configuration

REDISBUNGEE REQUIRES A REDIS SERVER, preferably with reasonably low latency. The default config is saved when the plugin first starts.

redisbungee's People

Contributors

alphartdev avatar alw3ys avatar chnkr avatar fuzzybot avatar itsjh avatar md-5 avatar minecrafter avatar punkeel avatar regaw-leinad avatar tobgen avatar

Stargazers

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

Watchers

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

redisbungee's Issues

Possible imposter instance!

Hello.

I restart one of my BungeeCord instances and get this error.

03:03:58 [SEVERE] [RedisBungee] You have launched a possible imposter BungeeCord instance. Another instance is already running.
03:03:58 [SEVERE] [RedisBungee] For data consistency reasons, RedisBungee will now disable itself.
03:03:58 [SEVERE] [RedisBungee] If this instance is coming up from a crash, create a file in your RedisBungee plugins directory with the name 'restarted_from_crash.txt' and RedisBungee will not perform this check.
03:03:58 [WARNING] Exception encountered when loading plugin: RedisBungee
java.lang.RuntimeException: Possible imposter instance!
    at com.imaginarycode.minecraft.redisbungee.RedisBungee.loadConfig(RedisBungee.java:425)
    at com.imaginarycode.minecraft.redisbungee.RedisBungee.onEnable(RedisBungee.java:228)
    at net.md_5.bungee.api.plugin.PluginManager.enablePlugins(PluginManager.java:220)
    at net.md_5.bungee.BungeeCord.start(BungeeCord.java:250)
    at net.md_5.bungee.BungeeCordLauncher.main(BungeeCordLauncher.java:54)
    at net.md_5.bungee.Bootstrap.main(Bootstrap.java:15)

Also RedisBungee isn't working after that. I have to restart my BungeeCord instance a second time.

RedisBungeeAPI is null

It appears that the RedisBungee.getApi() is returning null. (Running latest version from Spigot resources)
Log output:

11:34:18 [INFO] Enabled BungeeCord version git:BungeeCord-Bootstrap:1.8-SNAPSHOT:"54c9ade":1032
11:34:18 [INFO] Discovered module: ModuleSpec(name=reconnect_yaml, file=modules/reconnect_yaml.jar, provider=JenkinsModuleSource())
11:34:18 [INFO] Loaded plugin RedisBungee version 0.3.4 by tuxed
11:34:18 [INFO] Loaded plugin reconnect_yaml version git:reconnect_yaml:1.8-SNAPSHOT:"54c9ade":1032 by SpigotMC
11:34:18 [INFO] Loaded plugin Bongee version 1.0.0 by null
11:34:18 [INFO] [RedisBungee] Successfully connected to Redis.
11:34:18 [INFO] Enabled plugin RedisBungee version 0.3.4 by tuxed
11:34:18 [INFO] Enabled plugin reconnect_yaml version git:reconnect_yaml:1.8-SNAPSHOT:"54c9ade":1032 by SpigotMC
11:34:18 [INFO] Enabled plugin Bongee version 1.0.0 by null
11:34:18 [INFO] Listening on /0.0.0.0:25568
11:34:19 [INFO] §aCreated Mongo instance
11:34:19 [INFO] §aFound 8 servers
11:34:19 [INFO] §aDetected 2 servers as hub.

As you can see it connects to Redis fine, but whenever I do RedisBungee.getApi() it returns null
I have also tried using the latest Jenkins build, but still not working.

Feature request: players per bungee

I would like to see a command for use ingame where I can see the number of players per bungee. I need this for when I pull a bungee out of my DNS based load balance to see when it has emptied out. :)

Problem with server connection.

Hello!
I have a problem connecting to the server through a proxy server.
I currently have two BungeeCord servers, which are interconnected via RedisBungee.

If you try to teleport from one server (HUB_1) to the second server (TTL_1), a message is sent to the player:
You are already connected to this server!

I tried to remove the RedisBungee plugin and try it.
And everything works fine.
The problem is in RedisBungee.

Proxy1 - config.yml: https://hastebin.com/zolovedopu.php
Proxy2 - config.yml: https://hastebin.com/gowiteresa.makefile
RedisBungee1 - config.yml: https://hastebin.com/ehuzupobus.makefile
RedisBungee2 - config.yml: https://hastebin.com/ugazoveyew.makefile

Thanks for any help!

Issue while updating to 0.3.6 : unexpected NPE

Hi Tux,
some of my users started to have errors after updating to 0.3.6, so I investigated and managed to replicate bugs on my side. There may be several, but for now I just reproduced one :
The bug reported was an NPE at line 105 of BAT in the Lookup formatter (https://github.com/alphartdev/BungeeAdminTools/blob/master/src/main/java/fr/Alphart/BAT/Modules/Core/LookupFormatter.java#L105).
You'll see that before this line of code there was a condition : if the player whose UUID is pUUID is online, then so that means that if the line 105 is reached this player is online. Then I checked which variable was null and it appears that this code RedisBungee.getApi().getServerFor(pUUID) returned null, which then triggered an NPE as I was trying to call getName() on a null ServerInfo.
And that's the problem, the player is considered online (isPlayerOnline(pUUID)) but it doesn't have a server (RedisBungee.getApi().getServerFor(pUUID) returns null).
Any ideas what might be causing that ?

PubSubMessage.getChannel() does not work

I get an error when I want to ask for the channel via pEvent[This is my PubSubMessage Event].getChannel(). It throws this error:
20:27:28 [SCHWERWIEGEND] Dez 09, 2015 8:27:28 PM net.md_5.bungee.event.EventBus post
WARNUNG: Error dispatching event PubSubMessageEvent(channel=redisbungee-data, message={"target":"3940d785-6497-4098-b240-78542d84c8af","source":"test1","action":"LEAVE","payload":{"timestamp":1449689248547}}) to listener de.simonsator.partyandfriends.redisconnection.BungeeCommunicate@5d534f5d
java.lang.NoSuchMethodError: com.imaginarycode.minecraft.redisbungee.events.PubSubMessageEvent.getChannel()Ljava/lang/Object;
at de.simonsator.partyandfriends.redisconnection.BungeeCommunicate.onMessageReceive(BungeeCommunicate.java:34)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.md_5.bungee.event.EventHandlerMethod.invoke(EventHandlerMethod.java:19)
at net.md_5.bungee.event.EventBus.post(EventBus.java:46)
at net.md_5.bungee.api.plugin.PluginManager.callEvent(PluginManager.java:374)
at com.imaginarycode.minecraft.redisbungee.RedisBungee$JedisPubSubHandler$1.run(RedisBungee.java:523)
at net.md_5.bungee.scheduler.BungeeTask.run(BungeeTask.java:63)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Surviving *short* Redis Timeouts

Hello,
it happens to us sometimes that a connection to the redis server breaks - and there are some problems we have encountered so far:

First, look at this file:
https://github.com/minecrafter/RedisBungee/blob/master/src/main/java/com/imaginarycode/minecraft/redisbungee/util/RedisCallable.java#L37

Shouldn't there be a return run(true); ? Because right now, a retry will throw a RuntimeException if successfull, and if not successfull a JedisConnectionException which is not handled.

Second problem is this:
https://github.com/minecrafter/RedisBungee/blob/master/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungee.java#L280

When failing one of these two tasks, not only the task is stopped, but there won't be any error in the console - and so the server will be offline to every other instance, but still allows players to join, resulting in players marked offline - just with the "problem" of them being online.
More Information here.

Thank you for your time, if you want me to I can put these two suggested changes in a PR.

ProxyPingEvent

Hey
Can u add to api method to register own plugin which modify ping respone?

Exception

Spam like those

警告: Error dispatching event PluginMessageEvent(super=TargetedEvent(sender=net.md_5.bungee.ServerConnection@4ad20a5c, receiver=wwwwwweeeeew), cancelled=false, tag=RedisBungee, data=[0, 11, 80, 108, 97, 121, 101, 114, 67, 111, 117, 110, 116, 0, 5, 85, 72, 67, 45, 51]) to listener com.imaginarycode.minecraft.redisbungee.RedisBungeeListener@72bdd7c7
java.util.concurrent.RejectedExecutionException: Task BungeeTask(sched=net.md_5.bungee.scheduler.BungeeScheduler@53e76c11, id=2007334, owner=com.imaginarycode.minecraft.redisbungee.RedisBungee@2fd64b11, task=com.imaginarycode.minecraft.redisbungee.RedisBungeeListener$5@378c753e, delay=0, period=0, running=true) rejected from java.util.concurrent.ThreadPoolExecutor@6f44a450[Running, pool size = 32, active threads = 31, queued tasks = 0, completed tasks = 1807226]
    at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2047)
    at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:823)
    at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1369)
    at net.md_5.bungee.scheduler.BungeeScheduler.schedule(BungeeScheduler.java:101)
    at net.md_5.bungee.scheduler.BungeeScheduler.schedule(BungeeScheduler.java:85)
    at net.md_5.bungee.scheduler.BungeeScheduler.runAsync(BungeeScheduler.java:79)
    at com.imaginarycode.minecraft.redisbungee.RedisBungeeListener.onPluginMessage(RedisBungeeListener.java:153)
    at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at net.md_5.bungee.event.EventHandlerMethod.invoke(EventHandlerMethod.java:19)
    at net.md_5.bungee.event.EventBus.post(EventBus.java:46)
    at net.md_5.bungee.api.plugin.PluginManager.callEvent(PluginManager.java:377)
    at net.md_5.bungee.connection.DownstreamBridge.handle(DownstreamBridge.java:226)
    at net.md_5.bungee.protocol.packet.PluginMessage.handle(PluginMessage.java:51)
    at net.md_5.bungee.netty.HandlerBoss.channelRead(HandlerBoss.java:77)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304)
    at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304)
    at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304)
    at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:276)
    at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:354)
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:244)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304)
    at io.netty.handler.timeout.ReadTimeoutHandler.channelRead(ReadTimeoutHandler.java:152)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304)
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:846)
    at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:823)
    at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:339)
    at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:255)
    at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112)
    at java.lang.Thread.run(Thread.java:745)


11:06:11 [严重] 六月 26, 2016 11:06:11 上午 net.md_5.bungee.event.EventBus post
警告: Error dispatching event PluginMessageEvent(super=TargetedEvent(sender=net.md_5.bungee.ServerConnection@29ca0999, receiver=1xiao1xx), cancelled=false, tag=RedisBungee, data=[0, 11, 80, 108, 97, 121, 101, 114, 67, 111, 117, 110, 116, 0, 16, 77, 97, 115, 116, 101, 114, 66, 117, 105, 108, 100, 101, 114, 45, 49, 57]) to listener com.imaginarycode.minecraft.redisbungee.RedisBungeeListener@72bdd7c7
java.util.concurrent.RejectedExecutionException: Task BungeeTask(sched=net.md_5.bungee.scheduler.BungeeScheduler@53e76c11, id=2007322, owner=com.imaginarycode.minecraft.redisbungee.RedisBungee@2fd64b11, task=com.imaginarycode.minecraft.redisbungee.RedisBungeeListener$5@42f965b, delay=0, period=0, running=true) rejected from java.util.concurrent.ThreadPoolExecutor@6f44a450[Running, pool size = 32, active threads = 31, queued tasks = 0, completed tasks = 1807226]
    at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2047)
    at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:823)
    at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1369)
    at net.md_5.bungee.scheduler.BungeeScheduler.schedule(BungeeScheduler.java:101)
    at net.md_5.bungee.scheduler.BungeeScheduler.schedule(BungeeScheduler.java:85)
    at net.md_5.bungee.scheduler.BungeeScheduler.runAsync(BungeeScheduler.java:79)
    at com.imaginarycode.minecraft.redisbungee.RedisBungeeListener.onPluginMessage(RedisBungeeListener.java:153)
    at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at net.md_5.bungee.event.EventHandlerMethod.invoke(EventHandlerMethod.java:19)
    at net.md_5.bungee.event.EventBus.post(EventBus.java:46)
    at net.md_5.bungee.api.plugin.PluginManager.callEvent(PluginManager.java:377)
    at net.md_5.bungee.connection.DownstreamBridge.handle(DownstreamBridge.java:226)
    at net.md_5.bungee.protocol.packet.PluginMessage.handle(PluginMessage.java:51)
    at net.md_5.bungee.netty.HandlerBoss.channelRead(HandlerBoss.java:77)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304)
    at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304)
    at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304)
    at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:276)
    at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:354)
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:244)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304)
    at io.netty.handler.timeout.ReadTimeoutHandler.channelRead(ReadTimeoutHandler.java:152)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304)
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:846)
    at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:823)
    at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:339)
    at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:255)
    at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112)
    at java.lang.Thread.run(Thread.java:745)

redisbungee and placeholderapi issues

I get errors when I use redisbungee.

I am using the Expansion-RedisBungee of the PlaceholderAPI and I get this error.

[05:53:12] [Server thread / ERROR]: [PlaceholderAPI] Failed to init placeholder expansion from class: com.extendedclip.expansion.redisbungee.RedisBungeeExpansion
[05:53:12] [Server thread / ERROR]: [PlaceholderAPI] Channel must contain: separator (attempted to use RedisBungee)

How can I fix this problem?

I have a 1.13.2, 1.12.2, and 1.7.10 server.

Channel register & listening mistake

Hi, you did small mistake in your main/listener class.
You have registered:

getProxy().registerChannel("legacy:redisbungee");

But listening to:
if ((event.getTag().equals("legacy:RedisBungee") || event.getTag().equals("RedisBungee")) && event.getSender() instanceof Server) {

Here is solution to fix it:
if ((event.getTag().equals("legacy:redisbungee") || event.getTag().equals("RedisBungee")) && event.getSender() instanceof Server) {

I am reporting it because I can not use RedisBungee channel due to this error while registering channel into spigot:
Channel must contain : separator (attempted to use RedisBungee)

Build it on ci.nixium.com

if you sign up for an account I'll give you the ability to add your own plugins to the ci if you'd like. No charge just because I like the plugin and would like to offer this.

getUUIDFromName(String) doesn't always work

getUUIDFromName(String) returns null even if the player is online on another proxy. I'm not sure if this was intended or a bug, but it would be logical for it to work if the player is actually online on the server.

It is rather significant for the plugin that I'm making that this actually works. Any chance this could be fixed?

Organizational Changes

I've lost track of this project a few times over the past year or so, this is mainly due to a lot of stress and deadlines at my current job, but also due to the fact that i rarely ever log in to this account, and most of the emails tend to go missing from time to time.

I'd like to move the RedisBungee project into it's own organization so that i can better keep track of things, as well as start grouping up some other relevant projects into the same organization.

  • I'll need to get @astei / @minecrafter to transfer the project to the new organization
  • I'll need to update all of the wiki, and documentation links on both spigot, as well as the codebase.
  • I'll need to warn users that run their own CI to look at the new repository

If anyone has any questions, suggestions or general comments please leave them on this ticket :)

Get all servers to send data to

Hello!

I am facing a difficulty when finding a way on how to (easier) send data from one server to another. The only way I found is very obscure through getting ServerInfo for each player on the network.

This is my code that I am currently using:

a

Any help would be appreciated.

Error in bungee cord stop

Hello,

I have 2 bungee cords (1 its premium and the other is no premium) with redis and redissbungee.

when the bungee cord (no premium) stop get a error in console:

[SEVERE] Exception disabling plugin RedisBungee com.imaginarycode.minecraft.redisbungee.internal.jedis.exceptions.JedisConnectionException: JedisPubSub was not subscribed to a Jedis instance. at com.imaginarycode.minecraft.redisbungee.internal.jedis.JedisPubSub.unsubscribe(JedisPubSub.java:41) at com.imaginarycode.minecraft.redisbungee.RedisBungee$PubSubListener.poison(RedisBungee.java:541) at com.imaginarycode.minecraft.redisbungee.RedisBungee.onDisable(RedisBungee.java:378) at net.md_5.bungee.BungeeCord$4.run(BungeeCord.java:415)

getPlayersOnServer(String::server name) seems to return Strings

It seems that getApi().getPlayersOnServer(String::server name) does not return a real UUID Set. Iterating through the Set causes an java.lang.ClassCastException: java.lang.String cannot be cast to java.util.UUID Exception.

Code example:

List<UUID> playerstosend = new ArrayList<>();  playerstosend.addAll(Main.getInstance().getProxy().getApi().getPlayersOnServer(player.getServer().getInfo().getName()));

for (UUID tosend : playerstosend) { //and here we get our exception
...

It's also interesting that getApi().getPlayersOnline() does work perfectly fine, so the workaround iterating through all players and removing which serverInfo does not match to the requested one.

Time discrepancy between machines

I've been investigating an issue we've been having regarding one Bungee instance reporting the other Bungees' clocks are behind (Relevant code here). My first reaction was that the time was not synchronized. After doing a few more checks, I realized the clocks are indeed synchronized.

It appears the issue we're having was introduced here (when heartbeats started using nanoseconds instead of milliseconds). Quoting the javadocs (seen here),

This method can only be used to measure elapsed time and is not related to any other notion of system or wall-clock time. The value returned represents nanoseconds since some fixed but arbitrary origin time (perhaps in the future, so values may be negative). The same origin is used by all invocations of this method in an instance of a Java virtual machine; other virtual machine instances are likely to use a different origin.

As stated by the javadocs, System.nanoTime() should not be used for comparing time across multiple machines (or even JVMs, for that matter). Because of this behavior, milliseconds (instead of nanoseconds) should be used in the RedisBungee heartbeat.

This issue should be resolved by reverting commits 195857a and 7c76b24.

w

Fuck you and fuck your plugin asshole. Youre plugin fucked my server. My cpu always %100 . My players left the game because of you. Fuck you and fuck your plguin ASSHOLE !

Add kick function

Hello,

could you please add a function to kick a player from all bungees?

Thank you.

PlayerChangedServerNetworkEvent : get origin and target

Hi,
I wanted to know if it was possible to include the server on which was the player before the switch, what is currently impossible due to the serversCache.put ocuring before you call the PlayerChangedServerNetwork event. (see https://github.com/thechunknetwork/RedisBungee/blob/47fc9792b0937d54c74a8a957329aa50747c3faf/src/main/java/com/imaginarycode/minecraft/redisbungee/DataManager.java#L268 )

In a way, this would mimick the ServerSwitchEvent, as we have access to this information via the ProxiedPlayer.getServer.
By the way, couldn't this be a Multimap instead of a ConcurrentHashmap ? This way, you would have a list of players per server, and Multimap are already thread safe, I assume.

Thanks in advance, and thanks for all !

Redisbungee is showing players as online and they are not.

Redis is showing me some players online in certain servers, and they aren't, I'm using a friends system (UltimateFriends) and it's showing many of my list online, if I use /find they are online too.

With /pproxy they are not, nor with /glist.

Tried to restart the proxies, nothing happens.

JedisException: Could not return the resource to the pool

23:47:22 [SEVERE] Task BungeeTask(sched=net.md_5.bungee.scheduler.BungeeScheduler@2ed7b66b, id=792051, owner=com.imaginarycode.minecraft.redisbungee.RedisBungee@2f109238, task=com.imaginarycode.minecraft.redisbungee.RedisBungeeListener$5@2681e430, delay=0, period=0, running=true) encountered an exception
com.imaginarycode.minecraft.redisbungee.internal.jedis.exceptions.JedisException: Could not return the resource to the pool
at com.imaginarycode.minecraft.redisbungee.internal.jedisutil.Pool.returnResourceObject(Pool.java:54)
at com.imaginarycode.minecraft.redisbungee.internal.jedis.JedisPool.returnResource(JedisPool.java:98)
at com.imaginarycode.minecraft.redisbungee.RedisBungee.getPlayers(RedisBungee.java:182)
at com.imaginarycode.minecraft.redisbungee.RedisBungee.serversToPlayers(RedisBungee.java:114)
at com.imaginarycode.minecraft.redisbungee.RedisBungee.getPlayersOnServer(RedisBungee.java:190)
at com.imaginarycode.minecraft.redisbungee.RedisBungeeListener$5.run(RedisBungeeListener.java:158)
at net.md_5.bungee.scheduler.BungeeTask.run(BungeeTask.java:58)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException: Returned object not currently part of this pool
at com.imaginarycode.minecraft.redisbungee.internal.commonspool2.impl.GenericObjectPool.returnObject(GenericObjectPool.java:534)
at com.imaginarycode.minecraft.redisbungee.internal.jedisutil.Pool.returnResourceObject(Pool.java:52)
... 9 more

Specific issue with domains

So on the current server I am on we are running into an issue where depending on the domain you use it will transfer you to a different server because of how this plugins handles server location based on domain connectivity. Can you help me out in possibly pointing where I can look to change this behavior, I am capable of making the changes myself.

So like the intended behavior would want to be server1.mc.com and server2.mc.com connecting would take you to the last server you were on regardless of the domain you used.

Redis PubSub disconnecting resets channels

The RedisBungee API offers an API for plugins to register their own channels and then use the PubSubMessageEvent however if the pubsub throws an error, it won't register what channels external plugins did and doesn't provide a way for plugins to know of an error that caused its channel to be unregistered.

I propose that channels registered by plugins are stored in a set that can be used to register those channels when the PubSub recovers

You are already logged on to this server.

Sometimes, players will see this message even though they are not logged on. When it happened to myself, it took about four retries before login finally succeeded.

upload_2016-1-5_11-41-1

glist showall throws NullPointerException

10:34:26 [SEVERE] Task BungeeTask(sched=net.md_5.bungee.scheduler.BungeeScheduler@51c693d, id=16757, owner=com.imaginarycode.minecraft.redisbungee.RedisBungee@11d8ae8b, task=com.imaginarycode.minecraft.redisbungee.RedisBungeeCommands$GlistCommand$1@43aaf813, delay=0, period=0, running=true) encountered an exception java.lang.NullPointerException at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:770) at com.google.common.base.Joiner.toString(Joiner.java:454) at com.google.common.base.Joiner.appendTo(Joiner.java:106) at com.google.common.base.Joiner.appendTo(Joiner.java:154) at com.google.common.base.Joiner.join(Joiner.java:197) at com.google.common.base.Joiner.join(Joiner.java:187) at com.imaginarycode.minecraft.redisbungee.RedisBungeeCommands$GlistCommand$1.run(RedisBungeeCommands.java:72) at net.md_5.bungee.scheduler.BungeeTask.run(BungeeTask.java:63) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:748)
and it doesn't show player list of 3 of my servers.

Performance issue

Hi. There is a cluster handle >5000 players with 5 bungeecord instance, redis-server process hit near 100% usage some often, led player count shown on ping-list very unstable.
I do profiling with redis-faina and got those output,

Overall Stats
========================================
Lines Processed         6130745
Commands/Sec            77283.89

Top Prefixes
========================================
player          1376    (0.02%)
proxy           791     (0.01%)

Top Keys
========================================
82353fd280c66f12cbb97bcee9742436bc12eaff        3724    (0.06%)
redisbungee-data                                1182    (0.02%)
proxy:bungee-1:usersOnline                      445     (0.01%)
proxy:bungee-2:usersOnline                      240     (0.00%)
uuid-cache                                      165     (0.00%)
proxy:bungee-3:usersOnline                      106     (0.00%)
heartbeats                                      93      (0.00%)
cd3e910d736fd9b688896f2ab014943c64ed9c94        45      (0.00%)

Top Commands
========================================
EVALSHA         3769    (0.06%)
PUBLISH         1182    (0.02%)
HSET            1075    (0.02%)
SISMEMBER       440     (0.01%)
HMSET           330     (0.01%)
SREM            181     (0.00%)
HDEL            181     (0.00%)
SADD            165     (0.00%)

Command Time (microsecs)
========================================
Median          9410.0
75%             15512.0
90%             31177.0
99%             35909.25

Heaviest Commands (microsecs)
========================================
EVALSHA         78011941.5
PUBLISH         1053010.75
HSET            121188.0
SISMEMBER       50740.0
HMSET           32968.75
PING            21658.0
SREM            7867.0
HGETALL         7761.5

Slowest Calls
========================================
160504.25       "PUBLISH" "redisbungee-data" "{\"target\":\"8689c20f-7fdb-3777-b                                                                                        2b5-7a19e97d1604\",\"source\":\"bungee-1\",\"action\":\"SERVER_CHANGE\",\"payloa                                                                                        d\":{\"server\":\"BW-Lobby2\",\"oldServer\":\"Lobby11\"}}"
114051.0        "PUBLISH" "redisbungee-data" "{\"target\":\"4ab12c36-aabe-38ad-b                                                                                        4f1-f9f0144c312d\",\"source\":\"bungee-1\",\"action\":\"SERVER_CHANGE\",\"payloa                                                                                        d\":{\"server\":\"Lobby3\"}}"
109571.25       "EVALSHA" "82353fd280c66f12cbb97bcee9742436bc12eaff" "0" "Skywar                                                                                        s-10"
109020.25       "EVALSHA" "82353fd280c66f12cbb97bcee9742436bc12eaff" "0" "SG-9"
93490.75        "PUBLISH" "redisbungee-data" "{\"target\":\"1277fcc1-8d09-30e7-a                                                                                        3fe-111bae852c7e\",\"source\":\"bungee-1\",\"action\":\"SERVER_CHANGE\",\"payloa                                                                                        d\":{\"server\":\"BedWars-16-37\",\"oldServer\":\"BW-Lobby3\"}}"
92390.0         "EVALSHA" "82353fd280c66f12cbb97bcee9742436bc12eaff" "0" "Master                                                                                        Builder-14"
92299.25        "EVALSHA" "82353fd280c66f12cbb97bcee9742436bc12eaff" "0" "TheWal                                                                                        ls-14"
88056.0         "EVALSHA" "82353fd280c66f12cbb97bcee9742436bc12eaff" "0" "BedWar                                                                                        s-16-8"

Players are always online

Hello,

I have noticed that players appear to be always online even after they have logged out. I have seen this bug on the latest version of RedisBungee.

This bug is making other bungee plugins think players are online when they really are not.

Thanks for any help!

Exception occasionally while player connect, after resume from an unstable Redis connection

Exception occasionally while player connect to BungeeCord. Notice that /glist can display player list with no issue.

14:33:46 [SEVERE] [RedisBungee] Unable to fix up stored player data
com.imaginarycode.minecraft.redisbungee.internal.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
    at com.imaginarycode.minecraft.redisbungee.internal.jedisutil.Pool.getResource(Pool.java:50)
    at com.imaginarycode.minecraft.redisbungee.internal.jedis.JedisPool.getResource(JedisPool.java:99)
    at com.imaginarycode.minecraft.redisbungee.RedisBungee$3.run(RedisBungee.java:310)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:748)
Caused by: com.imaginarycode.minecraft.redisbungee.internal.jedis.exceptions.JedisConnectionException: java.net.ConnectException: Connection timed out (Connection timed out)
    at com.imaginarycode.minecraft.redisbungee.internal.jedis.Connection.connect(Connection.java:164)
    at com.imaginarycode.minecraft.redisbungee.internal.jedis.BinaryClient.connect(BinaryClient.java:80)
    at com.imaginarycode.minecraft.redisbungee.internal.jedis.BinaryJedis.connect(BinaryJedis.java:1676)
    at com.imaginarycode.minecraft.redisbungee.internal.jedis.JedisFactory.makeObject(JedisFactory.java:87)
    at com.imaginarycode.minecraft.redisbungee.internal.commonspool2.impl.GenericObjectPool.create(GenericObjectPool.java:868)
    at com.imaginarycode.minecraft.redisbungee.internal.commonspool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:435)
    at com.imaginarycode.minecraft.redisbungee.internal.commonspool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:363)
    at com.imaginarycode.minecraft.redisbungee.internal.jedisutil.Pool.getResource(Pool.java:48)
    ... 9 more
Caused by: java.net.ConnectException: Connection timed out (Connection timed out)
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    at java.net.Socket.connect(Socket.java:589)
    at com.imaginarycode.minecraft.redisbungee.internal.jedis.Connection.connect(Connection.java:158)
    ... 16 more

Tested on:
Waterfall build 134 https://ci.destroystokyo.com/job/Waterfall/
(same as BungeeCord build 1252)
RedisBungee 0.4

Getting ProxyName

I'm trying to obtain the Proxy's Name/ID via RedisBungee Messaging Channels however I can't seem it get it to work. Any information/pointers/examples on how to do this? What I have expected to receive via the MessageRecived etc. Thank you.

Redis timeout

I'm getting random timeouts along the day, the redis server is working with no problem, I have four proxies using redis and randomly, one of them gets a redis error and cleans all the players.

https://hastebin.com/zehoqidica.cs

Is there any way to increase the timeout value?

Shutting down one bungee node causes errors on the others

I have permanently shutdown some bungee nodes in my network.

On the others, I see this:
13:57:50 [SEVERE] [RedisBungee] REDACTED is 12087825835ms behind! (Time not synchronized or server down?)

Is there something I need to do after shutting down a bungee node to prevent the above error?

Question

Hiw can i remove 1 bungeecord to prevent the messger bungee1 is down?

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.