Ports cannot get changed

  • 324 Views
  • Last Post 09 February 2021
  • Topic Is Solved
adrian2023 posted this 04 February 2021

OS: Ubuntu 20.04.2 LTS
Version: AMP Release "Ganymede" v2.1.0.2, built 03/02/2021 00:32

Problem Description:
When trying to change the port of an instance, you get this message (https://i.imgur.com/RdpowSw.png). When looking in the instance logs you can find this (https://pastebin.com/snS7Mq0t).

Steps to reproduce:
Well I actually don't know how to reproduce the problem, since we have a fresh installation of AMP.

Actions taken to resolve so far: None, since I don't actually have any idea how to fix this issue.

Order By: Standard | Newest | Votes
AbhorrentJoel posted this 04 February 2021

I can also confirm this issue is happening with v2.1.0.2 (upgrade from 2.1) on Ubuntu 20.04.2 LTS - this is a fresh install of Ubuntu. I am using Docker in my case.

adrian2023 posted this 04 February 2021

I can also confirm this issue is happening with v2.1.0.2 (upgrade from 2.1) on Ubuntu 20.04.2 LTS - this is a fresh install of Ubuntu. I am using Docker in my case.


I use AMP without Docker because I was thinking that Docker might be the problem.

PlazzmiK posted this 05 February 2021

Same problem here. Ubuntu 20.04 server, no docker. Have this problem with 3 minecraft instances. Also, managing instances only work when opening in a new tab and having to login again.

Problems started after upgrade to 2.1.0.2

LOG

[08:38:07] [InstanceManager:admin Info] : Stopping instance MyInstanceName...
[08:38:07] [InstanceManager:admin Info] : Requesting soft-stop...
[08:38:07] [InstanceManager:admin Info] : Waiting for instance to stop...
[08:38:08] [InstanceManager:admin Activity] : Instance MyInstanceName has stopped.
[08:38:08] [ADS:admin Info]       : ADS logged stopped instance MyInstanceName - exit code 0
[08:38:08] [InstanceManager:admin Info] : Instance was shut down gracefully.
[08:38:08] [InstanceManager:admin Info] : Instance MyInstanceName has stopped.
[08:38:21] [APIService:admin Warning] : Returned exception from API call ADSModule/SetInstanceNetworkInfo
[08:38:21] [Core:admin Error]     : NullReferenceException
[08:38:21] [Core:admin Error]     : [0] (NullReferenceException) : Object reference not set to an instance of an object
[08:38:21] [Core:admin Error]     :   at InstanceManagerPlugin.LocalInstanceManager.UpdateInstancePortMappings (Guid instanceId, Collections.Generic.Dictionary`2[TKey,TValue] PortMappings) 
  at ADSModule.WebMethods.SetInstanceNetworkInfo (Guid InstanceId, Collections.Generic.Dictionary`2[TKey,TValue] PortMappings) 
  at GSMyAdmin.WebServer.WebAttributes.InvokeMethod (String MethodName, Newtonsoft.Json.Linq.JObject Data, m.Http.IHttpRequest request, ModuleShared.IWebSession Session, ModuleShared.WebMethodsBase MethodsClass, String RawRequest) 
  at GSMyAdmin.WebServer.APIService.InvokeAPI (m.Http.IHttpRequest request, ModuleShared.IWebSession Session, Newtonsoft.Json.Linq.JObject Data, String RequestModule, String RequestMethod, String RawRequest) 

Please fix this asap. Seems to be a huge gap in release bug testing.

Mike posted this 05 February 2021

I can't currently reproduce this, but I will look into it.

  • Liked by
  • PlazzmiK
PlazzmiK posted this 05 February 2021

If you want to, I can give you temp access to my server to look into the problem.

Mike posted this 05 February 2021

Are you using controller/target setups, or standalone mode?

PlazzmiK posted this 05 February 2021

Standalone, single server. Multiple instances on same machine.

Mike posted this 05 February 2021

Managed to track the issue down, ironically fixing the issue that caused port updates not to get synced between targets caused this. Nightly will have a fix from tonight onwards (if you're brave), otherwise it'll be in an update next week.

  • Liked by
  • AbhorrentJoel
PlazzmiK posted this 05 February 2021

Where can I upgrade to nightly, and turn it back to stable in a week? Currently having a server that's offline due to a port issue. Or can I change it manualy somehow?

PlazzmiK posted this 06 February 2021

Updated my instance to nightly using the following command:

ampinstmgr switch INSTANCENAME Nightly

Still hasn't fixed the problem.

[06:14:23] [APIService:admin Warning] : Returned exception from API call ADSModule/SetInstanceNetworkInfo
[06:14:23] [Core:admin Error]     : NullReferenceException
[06:14:23] [Core:admin Error]     : [0] (NullReferenceException) : Object reference not set to an instance of an object
[06:14:23] [Core:admin Error]     :   at InstanceManagerPlugin.LocalInstanceManager.UpdateInstancePortMappings (Guid instanceId, Collections.Generic.Dictionary`2[TKey,TValue] PortMappings) 
  at ADSModule.WebMethods.SetInstanceNetworkInfo (Guid InstanceId, Collections.Generic.Dictionary`2[TKey,TValue] PortMappings) 
  at GSMyAdmin.WebServer.WebAttributes.InvokeMethod (String MethodName, Newtonsoft.Json.Linq.JObject Data, m.Http.IHttpRequest request, ModuleShared.IWebSession Session, ModuleShared.WebMethodsBase MethodsClass, String RawRequest) 
  at GSMyAdmin.WebServer.APIService.InvokeAPI (m.Http.IHttpRequest request, ModuleShared.IWebSession Session, Newtonsoft.Json.Linq.JObject Data, String RequestModule, String RequestMethod, String RawRequest)

AbhorrentJoel posted this 06 February 2021

Did you upgrade the instances after switching? You can upgrade all the instances using:

ampinstmgr --nocache upgradeall

That'll upgrade them all. Though, my guess is that you'll possibly only need to upgrade the ADS as it may be compatible with existing stable instances:

ampinstmgr --nocache ADS01

Obviously, if you haven't already, you'll need to switch the ADS to Nightly:

ampinstmgr switch ADS01 Nightly

  • Liked by
  • PlazzmiK
PlazzmiK posted this 06 February 2021

That fixed it! Thanks.

Would you mind sharing the steps to switch back to the stable release later on?

AbhorrentJoel posted this 06 February 2021

It should be possible to just wait for the next stable release and just hop back onto that release cycle:

ampinstmgr switch INSTANCENAME MainLine True

And obviously update that instance that you switched back to stable release. Or all of the instances, if you changed all back to stable.

I am not sure if something bad could happen as a result to switching back, but as long as the stable release is newer than the Nightly then the features/changes should already be incorporated. Though, the risk is not quite zero.

  • Liked by
  • PlazzmiK
AbhorrentJoel posted this 09 February 2021

Looks like this has been fixed now. I've given it a quick test and chaning the ports for instances now works without throwing an error.

Close