[web] Can't manage instance after host IP address change

OS Name/Version: AMP Release “Triton”

Product Name/Version: AMP Instance Manager v2.3.4.3 built 12/07/2022 13:01

Problem Description:

Hey all,

I am unable to manage instances after changing the IP address of the host. In Web UI when I click “Manage”, I see “Connecting to remote AMP instance…” loading forever.

The instance has the following settings, and is able to successfully start:

Instance ID        │ f38118f3-8545-4e39-b8d5-a1ceda3f46ce
Module             │ Minecraft
Instance Name      │ JamesMC2
Friendly Name      │ James MC 2
URL                │ http://127.0.0.1:8084/
Running            │ Yes
Runs in Container  │ No
Runs as Shared     │ No
Start on Boot      │ Yes
AMP Version        │ 2.3.4.3
Release Stream     │ Mainline
Data Path          │ /home/amp/.ampdata/instances/JamesMC2

The instance logs show the following at the time of authenticating:

[16:40:22] [RemoteAMPAuth:Anonymous Activity] : Authentication attempt for user admin from 127.0.0.1
[16:40:24] [RemoteAMPAuth:Anonymous Activity] : Authentication attempt for user admin from 127.0.0.1
[16:40:52] [Core:Anonymous Error] : TaskCanceledException
[16:40:52] [Core:Anonymous Error] : [0] (TaskCanceledException) : The operation was canceled.
[16:40:52] [Core:Anonymous Error] :   at AMPAPI.RemoteInstance.GetResponseDynamic (String Module, String Method, Object Parameters)
  at AMPAPI.RemoteInstance+API_Core.Login (String username, String password, String token, Boolean rememberMe)
  at GSMyAdmin.Authentication.RemoteAMPAuth.Authenticate (m.Http.IHttpRequest Request, String Username, String Password, String Token, Boolean TokenRequested, Collections.Generic.List`1[String]& Permissions, String& NewToken, GSMyAdmin.Authentication.UserInfoSummary& UserInfo, String& Reason)
[16:40:52] [Core:Anonymous Error] : SocketException
[16:40:52] [Core:Anonymous Error] : [1] (SocketException) : Connection timed out

Steps to reproduce:

  • Step 1: Change IP address of host
  • Step 2: Start the instance in web UI
  • Step 3: Try to click “manage” in web UI

Actions taken to resolve so far:

  • I verified all firewall rules
  • I am able to get to the ADS web UI without issue
  • I had to re-license the instance with the command ampinstmgr reactivate JamesMC2

Are you using Standalone mode?

Yes, I believe so. How can I tell for sure?

I can’t remember 100% which I chose when I set up ADS however it is currently running on a single server.

Addming more info, ADS logs show the following:

:admin14:38:39
Managed remote instance JamesMC2 at http://127.0.0.1:8084/
14:38:41
Managed remote instance JamesMC2 at http://127.0.0.1:8084/
Authentication token for admin requested by ManageInstance on behalf of admin
Authentication token for admin requested by ManageInstance on behalf of admin
14:40:23
Managed remote instance JamesMC2 at http://127.0.0.1:8084/
Authentication token for admin requested by ManageInstance on behalf of admin
14:46:49
Managed remote instance JamesMC2 at http://127.0.0.1:8084/
Authentication token for admin requested by ManageInstance on behalf of admin
:Anonymous14:55:22
Failure to make API call to JamesMC2 (http://127.0.0.1:8084/API/Core/Login) - retried 10 times : The operation was canceled.
TaskCanceledException
[0] (TaskCanceledException) : The operation was canceled.
at ADSModule.WebMethods.MakeInstanceRequest (m.Http.IHttpRequest request, String REQ_RAWJSON, String requesturi) at ADSModule.WebMethods.Servers (m.Http.IHttpRequest request, String id, String REQ_RAWJSON)
IOException
[1] (IOException) : Unable to read data from the transport connection: Operation aborted.
at Net.Sockets.Socket+AwaitableSocketAsyncEventArgs.ThrowException (Net.Sockets.SocketError error) at Net.Sockets.Socket+AwaitableSocketAsyncEventArgs.GetResult (Int16 token) at Net.Http.HttpConnection.FillAsync () at Net.Http.HttpConnection.ReadNextResponseHeaderLineAsync (Boolean foldedHeadersAllowed)
SocketException
[2] (SocketException) : Operation aborted

Assuming ADS is on port 8080:

ampinstmgr repairauth standalone http://localhost:8080

Well, that was easy. ampinstmgr repairauth standalone http://localhost:8080 did the trick!

Thanks @Mike.