๐ฑ 20 y/o, attending university full time studying software engineering.
matt-mx / reconnectvelocity Goto Github PK
View Code? Open in Web Editor NEWReconnect your players to their last played servers
Reconnect your players to their last played servers
๐ฑ 20 y/o, attending university full time studying software engineering.
I believe you just need to add the autoReconnect=true
connection property to the end of your connection string to allow JDBC to stay connected long term.
[18:17:59 ERROR]: com.mysql.cj.jdbc.exceptions.CommunicationsException: The last packet successfully received from the server was 37,855,723 milliseconds ago. The last packet sent successfully to the server was 37,855,724 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.
[18:17:59 ERROR]: at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174)
[18:17:59 ERROR]: at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64)
[18:17:59 ERROR]: at com.mysql.cj.jdbc.StatementImpl.executeQuery(StatementImpl.java:1201)
[18:17:59 ERROR]: at com.mattmx.reconnect.util.storage.MySqlStorage.getLastServer(MySqlStorage.java:50)
[18:17:59 ERROR]: at com.mattmx.reconnect.listener.Listener.choose(Listener.java:28)
[18:17:59 ERROR]: at com.mattmx.reconnect.listener.Lmbda$44.execute(Unknown Source)
[18:17:59 ERROR]: at com.velocitypowered.proxy.event.UntargetedEventHandler$VoidHandler.lambda$buildHandler$0(UntargetedEventHandler.java:56)
[18:17:59 ERROR]: at com.velocitypowered.proxy.event.VelocityEventManager.fire(VelocityEventManager.java:597)
[18:17:59 ERROR]: at com.velocitypowered.proxy.event.VelocityEventManager.lambda$fire$5(VelocityEventManager.java:478)
[18:17:59 ERROR]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
[18:17:59 ERROR]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[18:17:59 ERROR]: at java.base/java.lang.Thread.run(Thread.java:840)
[18:17:59 ERROR]: Caused by: com.mysql.cj.exceptions.CJCommunicationsException: The last packet successfully received from the server was 37,855,723 milliseconds ago. The last packet sent successfully to the server was 37,855,724 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.
[18:17:59 ERROR]: at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[18:17:59 ERROR]: at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
[18:17:59 ERROR]: at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[18:17:59 ERROR]: at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
[18:17:59 ERROR]: at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
[18:17:59 ERROR]: at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61)
[18:17:59 ERROR]: at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105)
[18:17:59 ERROR]: at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151)
[18:17:59 ERROR]: at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactory.java:167)
[18:17:59 ERROR]: at com.mysql.cj.protocol.a.NativeProtocol.send(NativeProtocol.java:628)
[18:17:59 ERROR]: at com.mysql.cj.protocol.a.NativeProtocol.sendCommand(NativeProtocol.java:683)
[18:17:59 ERROR]: at com.mysql.cj.protocol.a.NativeProtocol.sendQueryPacket(NativeProtocol.java:1051)
[18:17:59 ERROR]: at com.mysql.cj.protocol.a.NativeProtocol.sendQueryString(NativeProtocol.java:997)
[18:17:59 ERROR]: at com.mysql.cj.NativeSession.execSQL(NativeSession.java:663)
[18:17:59 ERROR]: at com.mysql.cj.jdbc.StatementImpl.executeQuery(StatementImpl.java:1169)
[18:17:59 ERROR]: ... 9 more
[18:17:59 ERROR]: Caused by: java.net.SocketException: Connection reset by peer
[18:17:59 ERROR]: at java.base/sun.nio.ch.NioSocketImpl.implWrite(NioSocketImpl.java:425)
[18:17:59 ERROR]: at java.base/sun.nio.ch.NioSocketImpl.write(NioSocketImpl.java:445)
[18:17:59 ERROR]: at java.base/sun.nio.ch.NioSocketImpl$2.write(NioSocketImpl.java:831)
[18:17:59 ERROR]: at java.base/java.net.Socket$SocketOutputStream.write(Socket.java:1035)
[18:17:59 ERROR]: at java.base/java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:81)
[18:17:59 ERROR]: at java.base/java.io.BufferedOutputStream.flush(BufferedOutputStream.java:142)
[18:17:59 ERROR]: at com.mysql.cj.protocol.a.SimplePacketSender.send(SimplePacketSender.java:55)
[18:17:59 ERROR]: at com.mysql.cj.protocol.a.TimeTrackingPacketSender.send(TimeTrackingPacketSender.java:50)
[18:17:59 ERROR]: at com.mysql.cj.protocol.a.NativeProtocol.send(NativeProtocol.java:619)
[18:17:59 ERROR]: ... 14 more
[18:17:59 INFO]: [server connection] PLAYER CONNECTED
[18:18:00 ERROR]: java.sql.SQLException: No operations allowed after statement closed.
[18:18:00 ERROR]: at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)
[18:18:00 ERROR]: at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
[18:18:00 ERROR]: at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89)
[18:18:00 ERROR]: at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:63)
[18:18:00 ERROR]: at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:73)
[18:18:00 ERROR]: at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:82)
[18:18:00 ERROR]: at com.mysql.cj.jdbc.StatementImpl.executeUpdateInternal(StatementImpl.java:1335)
[18:18:00 ERROR]: at com.mysql.cj.jdbc.StatementImpl.executeLargeUpdate(StatementImpl.java:2085)
[18:18:00 ERROR]: at com.mysql.cj.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1246)
[18:18:00 ERROR]: at com.mattmx.reconnect.util.storage.MySqlStorage.setLastServer(MySqlStorage.java:38)
[18:18:00 ERROR]: at com.mattmx.reconnect.listener.Listener.change(Listener.java:66)
[18:18:00 ERROR]: at com.mattmx.reconnect.listener.Lmbda$42.execute(Unknown Source)
[18:18:00 ERROR]: at com.velocitypowered.proxy.event.UntargetedEventHandler$VoidHandler.lambda$buildHandler$0(UntargetedEventHandler.java:56)
[18:18:00 ERROR]: at com.velocitypowered.proxy.event.VelocityEventManager.fire(VelocityEventManager.java:597)
[18:18:00 ERROR]: at com.velocitypowered.proxy.event.VelocityEventManager.lambda$fire$5(VelocityEventManager.java:478)
[18:18:00 ERROR]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
[18:18:00 ERROR]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[18:18:00 ERROR]: at java.base/java.lang.Thread.run(Thread.java:840)
[18:18:00 ERROR]: Caused by: com.mysql.cj.exceptions.StatementIsClosedException: No operations allowed after statement closed.
[18:18:00 ERROR]: at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[18:18:00 ERROR]: at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
[18:18:00 ERROR]: at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[18:18:00 ERROR]: at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
[18:18:00 ERROR]: at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
[18:18:00 ERROR]: at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61)
[18:18:00 ERROR]: at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:85)
[18:18:00 ERROR]: at com.mysql.cj.jdbc.StatementImpl.checkClosed(StatementImpl.java:336)
[18:18:00 ERROR]: at com.mysql.cj.jdbc.StatementImpl.executeUpdateInternal(StatementImpl.java:1250)
[18:18:00 ERROR]: ... 11 more
Hi,
Would it be possible to look at integrating ReconnectVelocity with LuckPerms? I'm currently using a similar plugin called RememberMe that integrates with LuckPerms for storing the players last server as metadata. To me, this would be the preferred option to flat file or a separate database.
Im not currently using a LP on the Velocity proxy as its not really needed in my use case, can you have a toggle to disable requiring a permission to remember which server you was on last, so its global for everyone.
It would be really cool if this could connect to an SQL database so that it would work with a multiproxy setup. Great plugin by the way, thank you for all the work you put into it :)
No matter what I do and enter, this probably no longer works on new VeloCitys
This feature is quite attractive from a player and server owner;s point of view.
And of itself is something similar to this plugin on bungee: https://github.com/AoElite/AutoReconnect
This would allow for a database refresh or something similar, in case I need to make modifications without restarting the server
For some reason, the plugin has created it's configuration file and everything it needs, however in game there aren't any commands available and the player doesn't get reconnected to the correct server. Do I need to tweak settings in the velocity config?
I'm using forced hosts (configured in velocity.toml) on my network, i.e. entering server1.example.com
connects me directly to server1. With this plugin this no longer works.
it would be great to block servers that cannot be reconnected to, when the player disconnects from that server he will be sent to the main lobby if the server is blacklisted
When I connect to a server using velope (load balancer) then switch servers and disconnect the server is not being updated to data.yml so the reconnect doesn't work
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.