I'm trying to write a plugin to interface with the API which is capable of sending messages from proxy to server, server to proxy, and server to server. Server to proxy works flawlessly. However, trying to send messages from server to proxy or server to server is hit or miss. I'm not using the API examples exactly because they didn't work for me, so I may have something wrong in my code.
What you've tried so far
Everything works in my test environment. However, once I go to production, only 2 of the 5 spigot servers seem to be establishing their receivers with the proxy. Iterating BungeeSkungee#getServer() only gives the 2 of 5. Executing BungeeSkungee#getServer(String) for the 3 other servers throws NoSuchElementException. All servers are capable of communicating to the proxy, even the ones without a receiver connection. There are no errors, ports are assigned statically.
I tried many different combinations of restarts, restarting in different orders, all at once, etc. The same 2 servers connect and the other 3 don't. Changing ports doesn't help.
Bungee Send
public void send(JapsonServer from, String msg, Set<SkungeeServer> servers)
throws InterruptedException, ExecutionException, TimeoutException {
JsonObject json = new JsonObject();
json.addProperty("message", msg);
for (SkungeeServer server : servers) {
print("sending to " + server.getName());
server.getServerData().setReceiverAddress(
new InetSocketAddress("127.0.0.1", server.getServerData().getReceiverAddress().getPort()));
from.sendPacket(server.getServerData().getReceiverAddress(), new Packet(Packets.API.getPacketId()) {
@Override
public JsonObject toJson() {
return json;
}
});
}
}
Skungee Version: 2.0.0-BETA-4
Proxy Platform and Version: This server is running Waterfall version git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:5c1e956:504 by md_5
System/Panel (if applicable): Debian
Thought I fixed it but I did not. I'm still getting mixed results with servers wanting to connect their receiver to the proxy. All servers can send to the proxy but the proxy can only send to half.
What you need help with
I'm trying to write a plugin to interface with the API which is capable of sending messages from proxy to server, server to proxy, and server to server. Server to proxy works flawlessly. However, trying to send messages from server to proxy or server to server is hit or miss. I'm not using the API examples exactly because they didn't work for me, so I may have something wrong in my code.
What you've tried so far
Everything works in my test environment. However, once I go to production, only 2 of the 5 spigot servers seem to be establishing their receivers with the proxy. Iterating BungeeSkungee#getServer() only gives the 2 of 5. Executing BungeeSkungee#getServer(String) for the 3 other servers throws NoSuchElementException. All servers are capable of communicating to the proxy, even the ones without a receiver connection. There are no errors, ports are assigned statically. I tried many different combinations of restarts, restarting in different orders, all at once, etc. The same 2 servers connect and the other 3 don't. Changing ports doesn't help.
Bungee Send
Bungee Receive
Spigot Send
Spigot Receive
Specifications
Skungee Version: 2.0.0-BETA-4 Proxy Platform and Version: This server is running Waterfall version git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:5c1e956:504 by md_5 System/Panel (if applicable): Debian