Skip to content

Troubleshooting Guide

Andrew Steinborn edited this page Aug 3, 2021 · 16 revisions

FAQ

From maintaining NuVotifier for some time, I receive a lot of the same questions. I try to answer them the best I can in this document.

I voted (or submitted a test vote) and nothing happened. Why isn't it working?

Votifier v1 isn't smart enough to recover from errors. Most server list Votifier implementations ignore connection errors and report the vote as a success. Thus when using Votifier v1, there is no way to be sure that a vote is ever received by the receiving server.

Usually when NuVotifier doesn't report anything in the logs, the voting website is unable to connect to NuVotifier in the first place. The following things are usually to blame:

  • NuVotifier did not enable. Please check your startup logs and refer to other entries in this FAQ to determine the fix.
  • NuVotifier couldn't bind to the IP and port combination you chose. Check your start-up logs, determine if the IP and port is already in use, change them (or kill the offending process) and try again.
  • NuVotifier is not bound to the correct IP - Check the bind ip parameter in the NuVotifier configuration. If that doesn't work, try 0.0.0.0 - this will tell NuVotifier to bind to ALL IPs it can.
  • You entered the port in incorrectly - double check the NuVotifier port in the configuration.
  • You have a firewall in the way - If you are running on Windows, try to temporarily disable the firewall. Linux has a couple of different of culprits, including iptables and ufw.
  • You are using a shared host. Try asking the shared host to open a port for Votifier use.
  • You are home-hosting or behind a NAT and didn't port forward.
  • Check your logs again. Check them very closely. Read each line and think about what it is telling you.

If you're getting some output:

  • Your server successfully received the vote, but nothing happened because you don't have a vote listener installed. Install one and try again.
  • Your server can't decrypt the vote (you'll get Could not decrypt data (is your key correct?) in the logs). Please double-check that the public keys on the server/proxy and the server list match.

I voted (or submitted a test vote) and I got an exception in the console. What gives?

It depends on what exception you got:

Connection reset by peer

This means that the voting website 'closed' the TCP connection to NuVotifier before it could read the entire Vote message. NuVotifier can't fix this, because this is an implementation issue with voting lists. If you are receiving this exception, report this to the voting list in question, not NuVotifier.

If you are coming from a server list from a report of this error, consider implementing the Votifier v2 protocol - it is more secure, easier to implement, easier to diagnose, and is more resilient to network issues like this. Some implementations for popular languages already exist including PHP, Node.js, Golang, and Java.

Connection reset by host

This means that your computer's operating system closed the TCP connection to NuVotifier before it could read the entire Vote message. Usually this is due to a firewall - disable firewalls on your system and try again.

UnsupportedOperationException: direct buffer

If you get this, then you are likely running Sponge and are forwarding votes from a proxy. You have an old version of NuVotifier (most likely 2.3.2.2) which made some incorrect assumptions about channel buffers. To fix the problem, you will need to download the latest version of NuVotifier.

CorruptedFrameExceptions

If you get this, somebody sent malformed data to NuVotifier. Typically, there is a descriptive message (such as telling you the public key is wrong). There are also some sanity checks to ensure clients follow the protocol, which show up as messages without any clear resolution. There is nothing you can do, this is just the unfortunate nature of the internet.

Other IOExceptions

Other errors don't show up commonly enough - report an issue with your configurations and server logs.

Why do I get java.lang.IllegalStateException: zip file closed when I shutdown the server?

TL;DR: This is harmless behavior and if reported your issue will be closed immediately.

A technical explanation:

On Bukkit-based platforms, there is support for dynamically loading and unloading plugins. Whether this is a good idea or not is up to the user. We believe it is a bad idea and don't support it.

As part of disabling the plugin (whether on reload or on server shutdown), Bukkit platforms will close the class loader. Netty, the networking library used in NuVotifier, does not properly shut down in a class loading environment with classloader unloading. There is no way to make Netty shut down "completely" in such an environment, and fixing the issue solely on our end requires a rewrite of NuVotifier's networking code. The error is annoying but harmless since the only scenario we support is a full server shutdown, and in that case, as long as NuVotifier doesn't prevent a clean server shutdown, the error has no practical effect.

Given the required time investment in rewriting the networking cost outweighs silencing a slightly annoying error at shutdown, we do not plan to fix this error.

Which forwarding mode should I use?

NuVotifier comes with two forwarding modes: proxy and pluginMessaging. You should most likely use pluginMessaging as it has the most features and is simple to set up, unless your network's topology is complex.

The proxy gets my vote, however my backend servers don't.

First, make sure you are using the correct forwarding mode for your setup - you could save yourself a lot of headaches by using pluginMessaging instead of proxy mode. If you are still having issues, see the following sections.

Plugin Messaging

Plugin Messaging is a lot more straight forward than other forwarding methods. If it does not work, check the following things:

  • Is the plugin messaging channel the same everywhere? Make sure it is lower case and includes a colon! (Previous NuVotifier versions defaulted to an invalid channel before 1.13 was released.)
  • Is the server you are having issues with either on the blacklist or not on the whitelist?
  • Note that if nobody is connected to the server on the proxy that receives the vote, it will be queued and sent to the server when a player joins the server again.

Proxy

A lot more can go wrong when using proxy. A lot of people do not set it up correctly. If you are using proxy mode, make absolutely sure you actually need proxy mode. (The general rule is that if you have to ask if you need it, you probably don't.) With that being said, here are some things you can check:

  • For each backend server, diagnose connection issues according to simply not getting votes - usually the server is unable to bind to a port, or there is another issue related to firewalls, ports, and that sort of thing.
  • Ensure you are using the v2 Votifier token generated by each server. This is NOT the key found in the rsa/ folder.
  • Check ALL of your logs. One of them says something. It doesn't? You are lying. ONE OF THEM DOES. Check them again.

Does NuVotifier support X?

The answer is yes if the original Votifier supported it.

The only exception are legacy listener classes (those placed in the listeners directory in the plugin folder). These listeners are legacy and almost none of these listeners are still in active use. Since these listeners were largely for Bukkit, the recommended solution is to convert the listener classes into a regular Bukkit plugin (you may want to find the original source code or decompile them).

I used /reload or /plugman on NuVotifier and now it doesn't work!

This applies to Bukkit users only.

The /reload command (and in general reloading plugins) is a fundamentally broken concept. It is also difficult to support in the face of plugins that do their own thread management and rely on external dependencies, such as NuVotifier (which uses Netty). It would be difficult (and ultimately unproductive) to modify NuVotifier to be reload-safe.

If you are looking to reload the NuVotifier configuration file, use /nvreload. If you have already tried to reload NuVotifier or the server, the best way to get NuVotifier working again is to do a full restart of the server.

NuVotifier is lagging my server!

NuVotifier is incapable of causing lag when used by itself. NuVotifier's activities always take place off the server threads. Only when a vote is received and validated does NuVotifier take any sort of action that requires access to the server threads.

It is much more likely your vote listener (or a command you invoke when a vote is received) is likely taking too long to process votes, which can cause the problem. You should take a look at your vote listener and the commands you're executing in order to determine the lag cause (timings from Paper and Sponge can help you here).