Code Monkey home page Code Monkey logo

reconnectvelocity's Introduction

๐ŸŒฑ 20 y/o, attending university full time studying software engineering.

Contact me :

Discord Presence

Instagram Badge

reconnectvelocity's People

Contributors

harvelsx avatar hellinduction avatar matt-mx avatar pseudoresonance avatar voruti avatar

Stargazers

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

Watchers

 avatar  avatar

reconnectvelocity's Issues

SQL Connection Expires

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.

Stacktace
[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

[Feature Request] Luckperms integration

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.

[Feature Request] Database

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 :)

Not working

No matter what I do and enter, this probably no longer works on new VeloCitys

Add /vreconnect reload

This would allow for a database refresh or something similar, in case I need to make modifications without restarting the server

Plugin not active

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?

Not working with forced hosts

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.

[Feature Request] Server Blacklist

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

Not writing to data.yml

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

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.