Question Failed To Bind Port

Yukiteru94

New member
Apr 16, 2022
3
0
1
Hi guys I'm running a 1.18.2 Paper BungeeCord Network with a bunch of 1.18.2 Paper Server and two 1.17.1
Every morning at 6.00 a.m. they are stopped and after 5 minutes they start again one every 2 minutes one of them starts.
One or more won't start, sometimes all of them, with this error.
I made sure that the all servers are stopped correctly and the command ""netstat -ntlp" reported that all Ports are free
The errore happen starting the server manually too


15.04 06:06:05 [Server] WARN **** FAILED TO BIND TO PORT!
15.04 06:06:05 [Server] WARN The exception was: io.netty.channel.unix.Errors$NativeIoException: bind(..) failed: Address already in use
15.04 06:06:05 [Server] WARN Perhaps a server is already running on that port?
15.04 06:06:05 [Server] INFO Stopping server
15.04 06:06:05 [Server] INFO Saving players
15.04 06:06:05 [Server] INFO Saving worlds
15.04 06:06:05 [Server] INFO ThreadedAnvilChunkStorage: All dimensions are saved
15.04 06:06:05 [Server] INFO Flushing Chunk IO
15.04 06:06:05 [Server] INFO Closing Thread Pool
15.04 06:06:05 [Multicraft] Server shut down (starting)
15.04 06:06:05 [Multicraft] Not restarting crashed server.
15.04 06:06:05 [Multicraft] Server stopped



I tried to change servers ports several times, increase the delay from 2 min to 5 min, to add a kill command when server is shutted down but it keeps happening more or less 70% of the time.
Do you know any solution? Anyone has same problem? Could it be some plugins?


The only plugins that are in all of the server are :

  • Chat Control RED
  • CMI
  • LuckPerms
  • DiscordSRV / DiscordSchematicUploader
  • Party and Friends Extended Edition
  • BungeeTablist /BungeeTablistbridge
  • FeatherBoard
  • Multiverse Core
  • GadgetsMenù (free version)
  • Battlepass
  • ViaVersion
  • ViaBackwards
  • WorldEdit
  • WorldGuard

Thanks, Yukiteru94
 
Version Output
16.04 23:14:13 [Server] INFO Checking version, please wait...
16.04 23:14:13 [Server] INFO This server is running Paper version git-Paper-268 (MC: 1.18.2) (Implementing API version 1.18.2-R0.1-SNAPSHOT) (Git: e2f743d)
16.04 23:14:13 [Server] INFO You are 22 version(s) behind
16.04 23:14:13 [Server] INFO Download the new version at: https://papermc.io/downloads
16.04 23:14:13 [Server] INFO Previous version: git-Paper-198 (MC: 1.18.1)


Checking version, please wait...
16.04 23:15:18 [Server] INFO This server is running Paper version git-Paper-402 (MC: 1.17.1) (Implementing API version 1.17.1-R0.1-SNAPSHOT) (Git: 1bc077b on ver/1.17.1)
16.04 23:15:18 [Server] INFO You are 9 version(s) behind
16.04 23:15:18 [Server] INFO Download the new version at: https://papermc.io/downloads
16.04 23:15:18 [Server] INFO Previous version: git-Paper-399 (MC: 1.17.1)

BungeeCord build 1634 (1.18.2)
Previous version : BungeeCord build 1631 (1.18.1)
Last edited:
Jan 28, 2022
34
1
6
8
At first, plugins can't open/close ports.
2. Check that the port of bungeecord is 25565 (default for java)
3. use this configuration and add all servers: (yes all)
YAML:
server_connect_timeout: 5000
listeners:
- query_port: 25577
  motd: None
  tab_list: GLOBAL_PING
  query_enabled: false
  proxy_protocol: false
  forced_hosts:
    localhost: lobby
  ping_passthrough: false
  priorities:
  - lobby
  - builds
  bind_local_address: true
  host: 0.0.0.0:25565
  max_players: 0
  tab_size: 60
  force_default_server: true
remote_ping_cache: -1
network_compression_threshold: 256
permissions:
  default:
  - bungeecord.command.server
  - bungeecord.command.list
  admin:
  - bungeecord.command.list
  - bungeecord.command.server
  - bungeecord.command.alert
  - bungeecord.command.end
  - bungeecord.command.ip
  - bungeecord.command.reload
log_pings: false
connection_throttle_limit: 3
prevent_proxy_connections: false
timeout: 30000
player_limit: -1
ip_forward: true
groups:
  YOURMCNAME:
  - admin
remote_ping_timeout: 5000
connection_throttle: 4000
log_commands: false
stats: # (serveruuid)
online_mode: true
forge_support: false
disabled_commands:
- disabledcommandhere
servers:
  mc1:
    motd: 'LOBBY'
    address: localhost:25561
    restricted: false
  mc2:
    motd: 'Builds'
    address: localhost:25562
    restricted: false
  mc3:
    motd: 'mc3'
    address: localhost:25563
    restricted: false
  mc4:
    motd: 'mc4'
    address: localhost:25564
    restricted: false
4. only open 25565 in netstat and restart it (if you have systemctl installed you can restart with it)
5. use this start/stop scripts for your servers, and keep your software up to date: https://github.com/CrazyCloudCraft/minecraft-bashs
 

Yukiteru94

New member
Apr 16, 2022
3
0
1
Thanks for your reply,

1. I have many plugins that use internal ports, such as dynmap (8123) plan (8804 and followings) and many mysql instances (3306).

2. The bungeecord port is the default, 25565

3. The configuration was almost the same. I only changed all the servers port according to your suggest, we had 35100, 35200, 35300 and so on for each server

4. What do you mean to open ports in netstat? The firewall?

5. I can't use bash scripts to manage the servers because we use Multicraft
 
Jan 28, 2022
34
1
6
8
Thanks for your reply,

1. I have many plugins that use internal ports, such as dynmap (8123) plan (8804 and followings) and many mysql instances (3306).

2. The bungeecord port is the default, 25565

3. The configuration was almost the same. I only changed all the servers port according to your suggest, we had 35100, 35200, 35300 and so on for each server

4. What do you mean to open ports in netstat? The firewall?

5. I can't use bash scripts to manage the servers because we use Multicraft
1. Thats fine that some plugins need a port.
3. Yes, but i would recommend using ports near 2556* because some ports aren't shown up any more. Because they are to high.
4. You can set ports in a configuration of netstat, to open them for the outside, e.g. 22 for ssh and 25565 for Bungeecord (on default)
5. yes you can do that by going into the files from multicraft. Exept if you have no other access to that mashine.
 
Last edited:
  • Like
Reactions: Yukiteru94

Yukiteru94

New member
Apr 16, 2022
3
0
1
After a 2 week of test I can confirm that the problem were the 30xxx Ports.
Maybe they are used for something that don't show up from netstat.

Thank you so much CrazyCouldCraft