Forums Archived

This forum has been archived. No new posts can be made and no new users can sign up. It remains here for reference only.

Find the new forums here

Clicking "Edit Ports" on instance returns 500 error

  • 206 Views
  • Last Post 02 July 2020
Dark posted this 25 June 2020

Hello,

I was trying to edit the port bindings on an instance I have, but it appears to throw the following error in console:

POST http://x.x.x.x:8080/API/ADSModule/GetInstanceNetworkInfo 500 (InternalServerError)

Tailing the log on the server reveals the following:

[19:26:56] [Logger:admin Warning] : Error handling request:[POST:/API/ADSModule/GetInstanceNetworkInfo] - [NullReferenceException]: System.NullReferenceException: Object reference not set to an instance of an object
  at InstanceManagerPlugin.AMPInstanceBase.b__149_1 (ModuleShared.ProvisionSettingInfo a) [0x00016] in :0
  at (wrapper delegate-invoke) System.Func`2[ModuleShared.ProvisionSettingInfo,InstanceManagerPlugin.PortUsage].invoke_TResult_T(ModuleShared.ProvisionSettingInfo)
  at System.Linq.Enumerable+WhereSelectListIterator`2[TSource,TResult].MoveNext () [0x00045] in <216e17eb4fe74dabb013a9140bcd66d2>:0
  at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeList (Newtonsoft.Json.JsonWriter writer, System.Collections.IEnumerable values, Newtonsoft.Json.Serialization.JsonArrayContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract collectionContract, Newtonsoft.Json.Serialization.JsonProperty containerProperty) [0x000e1] in :0
  at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue (Newtonsoft.Json.JsonWriter writer, System.Object value, Newtonsoft.Json.Serialization.JsonContract valueContract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerProperty) [0x000d4] in :0
  at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject (Newtonsoft.Json.JsonWriter writer, System.Object value, Newtonsoft.Json.Serialization.JsonObjectContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract collectionContract, Newtonsoft.Json.Serialization.JsonProperty containerProperty) [0x0008d] in :0
  at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue (Newtonsoft.Json.JsonWriter writer, System.Object value, Newtonsoft.Json.Serialization.JsonContract valueContract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerProperty) [0x000b0] in :0
  at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize (Newtonsoft.Json.JsonWriter jsonWriter, System.Object value, System.Type objectType) [0x00079] in :0
  at Newtonsoft.Json.JsonSerializer.SerializeInternal (Newtonsoft.Json.JsonWriter jsonWriter, System.Object value, System.Type objectType) [0x0023a] in :0
  at Newtonsoft.Json.JsonSerializer.Serialize (Newtonsoft.Json.JsonWriter jsonWriter, System.Object value, System.Type objectType) [0x00000] in :0
  at Newtonsoft.Json.JsonConvert.SerializeObjectInternal (System.Object value, System.Type type, Newtonsoft.Json.JsonSerializer jsonSerializer) [0x00028] in :0
  at Newtonsoft.Json.JsonConvert.SerializeObject (System.Object value, System.Type type, Newtonsoft.Json.JsonSerializerSettings settings) [0x00007] in :0
  at Newtonsoft.Json.JsonConvert.SerializeObject (System.Object value, Newtonsoft.Json.JsonSerializerSettings settings) [0x00000] in :0
  at GSMyAdmin.ExtensionMethods.SerializeToJSON (System.Object source) [0x0000f] in <13add9ca3cdf42df97e380e1fc845398>:0
  at GSMyAdmin.WebServer.APIService.HandleRequest (m.Http.IHttpRequest request) [0x00331] in <13add9ca3cdf42df97e380e1fc845398>:0
  at m.Http.Handlers.Handler+<>c__DisplayClass6_0.b__0 (m.Http.IHttpRequest req) [0x00000] in <6ba0f115d4834d51b3526e12d15cee09>:0
  at m.Http.Routing.RateLimitedEndpoint+<>c__DisplayClass4_0.b__0 (m.Http.IHttpRequest request) [0x00019] in <6ba0f115d4834d51b3526e12d15cee09>:0
  at m.Http.Router.HandleRequest (m.Http.Backend.HttpRequest httpReq, System.DateTime requestArrivedOn) [0x000cd] in <6ba0f115d4834d51b3526e12d15cee09>:0

Is there any more information I could provide? Searching this forum doesn't seem to have any results on fixes.

Order By: Standard | Newest | Votes
Mike posted this 02 July 2020

Looking into it.

  • Liked by
  • Dark
  • DASTIL
Dark posted this 01 July 2020

It's a controller/target instance. Both servers using Ubuntu 20.04.

DASTIL posted this 28 June 2020

Hey, i get the same error.

My Setup: controller/target setup with multiple machines

What I tried: AMP Controller Server restart and AMP Controller Instance restart | AMP Target Server restart and AMP Target Instance restart

Error handling request:[POST:/API/ADSModule/GetInstanceNetworkInfo] - [NullReferenceException]: System.NullReferenceException: Object reference not set to an instance of an object at InstanceManagerPlugin.AMPInstanceBase.<getportusage>b__149_1 (ModuleShared.ProvisionSettingInfo a) [0x00016] in <d2471f39e0b241799a0577c68dfb55ca>:0 at (wrapper delegate-invoke) System.Func`2[ModuleShared.ProvisionSettingInfo,InstanceManagerPlugin.PortUsage].invoke_TResult_T(ModuleShared.ProvisionSettingInfo) at System.Linq.Enumerable+WhereSelectListIterator`2[TSource,TResult].MoveNext () [0x00045] in <216e17eb4fe74dabb013a9140bcd66d2>:0 at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeList (Newtonsoft.Json.JsonWriter writer, System.Collections.IEnumerable values, Newtonsoft.Json.Serialization.JsonArrayContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract collectionContract, Newtonsoft.Json.Serialization.JsonProperty containerProperty) [0x000e1] in <d47de75a7e3f422ca4ca64a654c80495>:0 at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue (Newtonsoft.Json.JsonWriter writer, System.Object value, Newtonsoft.Json.Serialization.JsonContract valueContract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerProperty) [0x000d4] in <d47de75a7e3f422ca4ca64a654c80495>:0 at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject (Newtonsoft.Json.JsonWriter writer, System.Object value, Newtonsoft.Json.Serialization.JsonObjectContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract collectionContract, Newtonsoft.Json.Serialization.JsonProperty containerProperty) [0x0008d] in <d47de75a7e3f422ca4ca64a654c80495>:0 at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue (Newtonsoft.Json.JsonWriter writer, System.Object value, Newtonsoft.Json.Serialization.JsonContract valueContract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerProperty) [0x000b0] in <d47de75a7e3f422ca4ca64a654c80495>:0 at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize (Newtonsoft.Json.JsonWriter jsonWriter, System.Object value, System.Type objectType) [0x00079] in <d47de75a7e3f422ca4ca64a654c80495>:0 at Newtonsoft.Json.JsonSerializer.SerializeInternal (Newtonsoft.Json.JsonWriter jsonWriter, System.Object value, System.Type objectType) [0x0023a] in <d47de75a7e3f422ca4ca64a654c80495>:0 at Newtonsoft.Json.JsonSerializer.Serialize (Newtonsoft.Json.JsonWriter jsonWriter, System.Object value, System.Type objectType) [0x00000] in <d47de75a7e3f422ca4ca64a654c80495>:0 at Newtonsoft.Json.JsonConvert.SerializeObjectInternal (System.Object value, System.Type type, Newtonsoft.Json.JsonSerializer jsonSerializer) [0x00028] in <d47de75a7e3f422ca4ca64a654c80495>:0 at Newtonsoft.Json.JsonConvert.SerializeObject (System.Object value, System.Type type, Newtonsoft.Json.JsonSerializerSettings settings) [0x00007] in <d47de75a7e3f422ca4ca64a654c80495>:0 at Newtonsoft.Json.JsonConvert.SerializeObject (System.Object value, Newtonsoft.Json.JsonSerializerSettings settings) [0x00000] in <d47de75a7e3f422ca4ca64a654c80495>:0 at GSMyAdmin.ExtensionMethods.SerializeToJSON (System.Object source) [0x0000f] in <13add9ca3cdf42df97e380e1fc845398>:0 at GSMyAdmin.WebServer.APIService.HandleRequest (m.Http.IHttpRequest request) [0x00331] in <13add9ca3cdf42df97e380e1fc845398>:0 at m.Http.Handlers.Handler+<>c__DisplayClass6_0.<from>b__0 (m.Http.IHttpRequest req) [0x00000] in <6ba0f115d4834d51b3526e12d15cee09>:0 at m.Http.Routing.RateLimitedEndpoint+<>c__DisplayClass4_0.<wrap>b__0 (m.Http.IHttpRequest request) [0x00019] in <6ba0f115d4834d51b3526e12d15cee09>:0 at m.Http.Router.HandleRequest (m.Http.Backend.HttpRequest httpReq, System.DateTime requestArrivedOn) [0x000cd] in <6ba0f115d4834d51b3526e12d15cee09>:0

Both Servers use Debian 10, up2date - so far, no other errors have occurred

I hope you can help us, thanks

Mike posted this 26 June 2020

Is this with a single machine, or do you have a controller/target setup with multiple machines?

Dark posted this 25 June 2020

Update: I didn't know I could do ampisntmgr rebind, so I did try that and it seems to have rebound the ports properly (though, this port edit bug still exists).

Also, I guess I actually didn't need to do that. I was trying to change my second Minecraft instance to 8081, but it was completely unnecessary and I just needed to try to connect on 25566.

Though, it appears that I actually cant change the port from 25566 to 25565 because that setting is actually also under the "Edit Ports" button that I am having an issue with.

Edit: I also tried setting the port manually in both server.properties and the MinecraftModule.kvp, but everytime I start the instance, the port on kvp gets overwritten.

Close