PaperMC / Waterfall

BungeeCord fork that aims to improve performance and stability.
https://papermc.io
MIT License
736 stars 295 forks source link

Failed to set channel option 'CONNECT_TIMEOUT_MILLIS' with value '-1' #831

Closed TypicalModMaker closed 8 months ago

TypicalModMaker commented 8 months ago

AJQueue owner told me to contact waterfall staff about this I'm getting spammed with this error

[19:23:15 WARN] [io.netty.bootstrap.Bootstrap]: Failed to set channel option 'CONNECT_TIMEOUT_MILLIS' with value '-1' for channel '[id: 0x89c5a93b]'
java.lang.IllegalArgumentException: connectTimeoutMillis : -1 (expected: >= 0)
        at io.netty.util.internal.ObjectUtil.checkPositiveOrZero(ObjectUtil.java:144) ~[server.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:cc856ed:552]
        at io.netty.channel.DefaultChannelConfig.setConnectTimeoutMillis(DefaultChannelConfig.java:216) ~[server.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:cc856ed:552]
        at io.netty.channel.epoll.EpollChannelConfig.setConnectTimeoutMillis(EpollChannelConfig.java:113) ~[server.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:cc856ed:552]
        at io.netty.channel.epoll.EpollSocketChannelConfig.setConnectTimeoutMillis(EpollSocketChannelConfig.java:585) ~[server.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:cc856ed:552]
        at io.netty.channel.epoll.EpollSocketChannelConfig.setConnectTimeoutMillis(EpollSocketChannelConfig.java:40) ~[server.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:cc856ed:552]
        at io.netty.channel.DefaultChannelConfig.setOption(DefaultChannelConfig.java:173) ~[server.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:cc856ed:552]
        at io.netty.channel.epoll.EpollChannelConfig.setOption(EpollChannelConfig.java:106) ~[server.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:cc856ed:552]
        at io.netty.channel.epoll.EpollSocketChannelConfig.setOption(EpollSocketChannelConfig.java:172) ~[server.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:cc856ed:552]
        at io.netty.bootstrap.AbstractBootstrap.setChannelOption(AbstractBootstrap.java:463) ~[server.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:cc856ed:552]
        at io.netty.bootstrap.AbstractBootstrap.setChannelOptions(AbstractBootstrap.java:455) ~[server.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:cc856ed:552]
        at io.netty.bootstrap.Bootstrap.init(Bootstrap.java:278) ~[server.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:cc856ed:552]
        at io.netty.bootstrap.AbstractBootstrap.initAndRegister(AbstractBootstrap.java:311) ~[server.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:cc856ed:552]
        at io.netty.bootstrap.Bootstrap.doResolveAndConnect(Bootstrap.java:164) ~[server.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:cc856ed:552]
        at io.netty.bootstrap.Bootstrap.connect(Bootstrap.java:125) ~[server.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:cc856ed:552]
        at net.md_5.bungee.BungeeServerInfo.ping(BungeeServerInfo.java:192) ~[server.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:cc856ed:552]
        at net.md_5.bungee.BungeeServerInfo.ping(BungeeServerInfo.java:153) ~[server.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:cc856ed:552]
        at us.ajg0702.queue.platforms.bungeecord.server.BungeeServer.ping(BungeeServer.java:54) ~[?:?]
        at us.ajg0702.queue.common.QueueManagerImpl.lambda$updateServers$2(QueueManagerImpl.java:576) ~[?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) [?:?]

Plugin list: TAB ServerListPlus Protocolize PlugManX LuckPermsBungee LiteBans ajQueue private core (doesn't cause this issue, removed and still spams this error)

config.yml: https://pastes.dev/1Lv8d0TgL3 waterfall.yml: https://pastes.dev/CP0XmK8679

Janmm14 commented 8 months ago

Your configuration is invalid. For safety, timeout shall NEVER be attempted to get disabled. Set timeout: 30000 in config.yml

Additionally it is highly adviced to NOT set network_compression_threshold: -1, instead I would suggest to set it to a value like 256 or 1024

TypicalModMaker commented 8 months ago

setting timeout to 60k doesnt fix this issue

electronicboy commented 8 months ago

You have multiple connection related timeout values set to -1, this is not supported behavior

xism4 commented 8 months ago

Your configuration is invalid. For safety, timeout shall NEVER be attempted to get disabled. Set timeout: 30000 in config.yml

Additionally it is highly adviced to NOT set network_compression_threshold: -1, instead I would suggest to set it to a value like 256 or 1024

I think this is worth in local servers, I would use that amount if Netty's flush consolidator event is enabled and the servers are hosted on different locations.

Janmm14 commented 8 months ago

Your configuration is invalid. For safety, timeout shall NEVER be attempted to get disabled. Set timeout: 30000 in config.yml Additionally it is highly adviced to NOT set network_compression_threshold: -1, instead I would suggest to set it to a value like 256 or 1024

I think this is worth in local servers, I would use that amount if Netty's flush consolidator event is enabled and the servers are hosted on different locations.

Well... maybe, I'd say it depends on the capabilities of the OS to optimize localhost (tcp) connections.

No-recompress patch eliminates parts of the increased cpu load. (And I recently created a small patch for someone involving a small edit of spigot as well which also eliminates decompression of packets bungee doesn't need to edit, which would make setting it to -1 actually worse.)