AMP
AMP copied to clipboard
Failed to Create Instance When Port Range Needed Is Not in Range Provided
Bug Report
System Information
- Operating System - Windows 11 Pro
- AMP version and build date - v2.4.0.4, built 10/09/2022 16:30
- Which AMP release stream you're using - Bleeding
I confirm:
- [x] that I have searched for an existing bug report for this issue.
- [x] that I am using the latest available version of AMP.
- [x] that my operating system is up-to-date.
Symptoms
-
What are you trying to do? Create an instance of Vintage Story.
-
What are you expecting to happen? The system should find the first port available, whether above or below the default port. Otherwise, predefined port ranges are kind of pointless for high port games.
-
What is actually happening? ('Nothing' is not an acceptable answer!)
Create Instance Failed: There are no available application service ports above 42420. You can address this by adding an extra port range that covers this under Configuration -> Networking -> Application Port Ranges
Reproduction
Set a port range below 42420 and create a Vintage Story instance (available in Greelan's dev repo) at time of posting.
This looks like the intended behaviour. In this situation you could either add the required port range, or set the port allocation mode to Exclude only.
I'm misunderstanding why it would only go to higher ports. My use case is I want my specific targets to use specific port ranges. i.e. 40200:40399. If a game wants a port above this range it just fails. It shouldn't be that way. AMP should try any port within the allowed range.
The reason for that is that it kept games that used the same port ranges close together. So if you had a game that used 7777 and created multiples of it, they'd end up on 7778, 7779 even if a different game got created in-between.
This seems like a personal preference over functionality. If the game server is okay using the port, it should use it rather than AMP erroring out.
I've just run into this issue as a new AMP user. As a workaround I've added a port range of 65530:65535 so that AMP allows me to create an instance, I then reassigned the ports back into my desired range (10100:10200). It would be nice if this restriction could be disabled/removed, I find it counter-intuitive and needlessly limiting.
As suggested in one of the previous comments, I tried to use Port assignment mode "Use all except excluded", adding 0:65535 to Application port ranges, 0:10099 and 10201:65535 to Application port exclusions but I still couldn't create an instance, this time failing with "There are no available AMP service ports."
This bug still exists in v2.4.7
I have a fix range of ports forwarded to the AMP container (LXC), so I don't need to adjust the port forwarding every time for a new game and every container has a fix range it can use for services which need to be accessible through IPv4.
Because of the bug, I need to adjust the ports manually after creating the instance.
It should be really easy to fix this bug..
No longer an issue as exclude is now the default behavior.
Hmm... how is this solved though? If I exclude all but my set range of ports will it work even if I don't contain the higher ports in my rsnge?
The default is to allow all ports and only pay attention to the exclusion range.
Can this be reopened? I just tried with v2.5.0.4, built 04/04/2024 18:29 and the issue is still existing.
It's really annoying to have to change the ports every time after instance creation.
I'm still confused why it's such an issue to have AMP just circle back around and see if a lower port is available. I see no reason for this not to be open and addressed. Just because the default behavior is a workaround. It's not a good one.
lol... AMP is really dump if you set it to exclude mode xD
Port 100001 is not a valid port... The highest possible port is 65535.
Just for completion. I set the excluded ports as follows
First noticed it set the port to 65536 of the new instance and then tested with a higher number to see if it just checks the limit wrong
The default is to allow all ports and only pay attention to the exclusion range.
You sure?