Startup Issue with Application Deployment - Docker and instances not working after IP change

System Information

Field Value
Operating System Linux - Ubuntu 22.04.4 on x86_64
Product AMP ‘Callisto’ v2.5.1.6 (Mainline)
Virtualization HyperV
Application Application Deployment
Module ADSModule
Running in Container No
Current State Indeterminate

Problem Description

Issue

I moved my server from Azure to premise. After getting Ubuntu working on premise Hyper-V, the Amp console works, but I cannot start any instances. I see a Docker error and the instances in the console have the old IP address. Also, when I run “ampinstmgr -t” as ampadmin, I get no instances. But, if I try to reinstall, it skips saying Amp is already installed and has instances.

Reproduction Steps

  • Exported VHD from Azure and converted to VHDX
  • Built new linux vm in premise Hyper-V and attached disk
  • Resolved some issues with Ubuntu booting and failing on the cdrom
  • Instances show in Amp web console but not via ampinstmgr; unable to start instances

Make sure ampinstmgr version reads v2.6.x.x, if it’s v2.5.x.x or older, you’ll run into issues with the instances.json.
After updating, you can restore one of the old instance.json-####.bak files under:
/home/amp/.ampdata/

Thanks for the reply. I think there is something else wrong with my server. I was able to confirm I have ampinstmgr 2.5.x.x. The update process failed though.
Is there a procedure to move my amp data to a fresh server?

There is no proper migration procedure, it’ll probably be easiest to fix your current install.
Share whatever errors you’re getting while updating.

Sorry for the long delay in my reply. The linux instance is migrated from Azure to local. I did the VHX to VHDX conversion and ran commands to remove the Azure stuff, but the boot process chokes on looking for a CD-Rom /dev/sr0. I can sometimes get it to boot into maintenance mode and that is how I have tried the various efforts with Amp.

I can see the Minecraft instance so my inclination is to just SCP that to a fresh Ubuntu server with Amp installed. Can Amp read/import that?

Kinda sorta, I got a list of steps for just an occasion:

Note, to log into the amp user you can run (su -l amp or sudo su -l amp [lowercase L, not a 1])

On the old system:

On the new system do the following:

  • install AMP
  • as amp, run ampinstmgr stopall
  • stop the ampinstmgr service (service ampinstmgr stop on debian)
  • nuke/remove .ampdata (or just rename it to be safe, you never know)
  • restore your own .ampdata folder on the new machine
  • as root, run ampinstmgr fixperms
  • start the ampinstmgr service (service ampinstmgr start on debian)
  • as amp, run ampinstmgr reactivateall
  • reboot if things look funny

Merry Christmas! I was able to follow your steps and when I got to the end, I could see my two instances (both Minecraft) in the new console. However, they were “offline”. When I hit “Start”, it failed so I did the reboot as you suggested. Upon restart, the instances were gone.

I am seeing a lot of “key” errors in the Deployment Log. Here is an excerpt:
/home/amp/.ampdata/instances/ADS01/Plugins/ADSModule/DeploymentTemplates/CubeCoders-AMPTemplates/staxel.kvp - missing required keys: GenericModule.Meta.AppConfigId

Unable to load Generic Manifest /home/amp/.ampdata/instances/ADS01/Plugins/ADSModule/DeploymentTemplates/CubeCoders-AMPTemplates/empyrion-galactic-survival.kvp - missing required keys: GenericModule.Meta.AppConfigId

Unable to load Generic Manifest /home/amp/.ampdata/instances/ADS01/Plugins/ADSModule/DeploymentTemplates/CubeCoders-AMPTemplates/conan-exiles.kvp - missing required keys: GenericModule.Meta.AppConfigId

Unable to load Generic Manifest /home/amp/.ampdata/instances/ADS01/Plugins/ADSModule/DeploymentTemplates/CubeCoders-AMPTemplates/mindustry.kvp - missing required keys: GenericModule.Meta.AppConfigId

Unable to load Generic Manifest /home/amp/.ampdata/instances/ADS01/Plugins/ADSModule/DeploymentTemplates/CubeCoders-AMPTemplates/path-of-titans.kvp - missing required keys: GenericModule.Meta.AppConfigId

Any thoughts? Anything else I can provide? I feel like we are close now. I have a working server and the data in the right place.

UPDATE
After posting the above, I ran the update and upgraded to 2.6. The instances are BACK! I think my problem now is that they have the wrong IP address. The instances show the IP of the old server. I don’t see an article for changing. Would the IP address cause the instance to not start?

Thanks!

From memory the IP address may cause those instances to flip a noodle.
You should be able to stop those instances, then go in the ADS’s File Manager and edit their GenericConfig.kvp (If I remmber correctly) and change the ....ServerIP= to the private IP of that machine

You have a good memory :slight_smile:

I was able to edit ADSModule.kvp in the ADS01 folder to fix the IP address.

I did ampinstmgr -restartallinstances and that refreshed the console.

HOWEVER, they still will not start. I built a fresh Minecraft Java instance and was able to get that working after fixing an error that led me to keying my license key into a field in the console. So, is there a log or something for the instance that we can look at?

Thanks!

For the instances that aren’t starting, right click them and hit View Logs and we can see what’s goin on there, you may just need to reactivate them all after the hardware change (since the licence is encrypted locally using the hardware ID).
There’s a Licence Key setting in the main panel’s settings that you can use to reactivate them all at once

Hello! I am happy to report we have progress and a good degree of success!

You were right about the license being a problem. I did the following steps:
From web console, right-click and “View Logs” to download/view instance log. The log showed the instance was not licenses/activated.
(Web Admin Portal) Re-activate license and all instances
Configuration > Instance Deployment > Deployment Defaults
(Web Admin Portal) Then go to Support and Updates>Restart Amp
(SSH Terminal as “amp”) AMPConfig.conf (has IP address) - file says to use ampinstmgr rebind
ampinstmgr stop ADS01
ampinstmgr --rebindinstance [instance_name] [ip_address] 8081
ampinstmgr start ADS01
ampinstmgr reactivate [instance_name]
(Web Admin Portal) Then go to Support and Updates>Restart Amp
(SSH Terminal as “amp”) See if instance is running
ampinstmgr -a
(Web Admin Portal) The instance will fail still. Click “Manage” and go to Configuration>Minecraft>Network and change to the eth0 IP address.
Restart Amp again and SUCCESS!

In review of the log for the instance and testing, I have 2 problems still:

  1. SFTP is still binding to the old IP and failing. I can’t find that IP address.
  2. My plug in BlueMap will not load. I removed the custom port from Amp and confirmed ufw was allowing the port. I can see BlueMap load and bind to the port, but Amp doesn’t seem to be mapping the port.

Log entry for SFTP (note- 10.x.x.x is the old IP address):
[14:04:22] [Loader Info/1] : Loaded AnalyticsPlugin by CubeCoders Limited
[14:04:22] [System Error/7] : Missing plugin/assembly: MaxMind.Db (/AMP/Plugins/MaxMind.Db/MaxMind.Db.dll) for
[14:04:22] [Core Info/1] : Licence Present: AMP Professional Edition - Lifetime Licence
[14:04:22] [Loader Error/1] : Unable to start SFTP server on 10.0.0.4:2224.
[14:04:22] [FileManager Error/1] : SocketException
[14:04:22] [FileManager Error/1] : [0] (SocketException) : Cannot assign requested address

Any thoughts on these last 2 issues?

Thanks!

Check for the IP address in the instance’s LocalFileBackupPlugin.kvp while the instance is stopped, I think it should be in there from memory.

For the BlueMap port, make sure that you’ve added the right port to the instance, and that you’ve hit the (+) button in the port edit screen (been there, forgotten that lol)

It wasn’t that file, but, with your vote of confidence, I started looking through the .kvp files and found it in “FileManagerPlugin.kvp”. I updated the IP address and the log file for starting the instance is clean. I also was able to fix BlueMap. I guess the custom port did not save the first time.

I am going to move the server to another host soon so I will get to see how well my notes work. The good news is that it is just IP address changes for that move. The linux vm and Amp install will remain the same.

Thanks again for the help! You may close this ticket/topic. See you on Discord!

Ah derp, that’s the kvp I meant lol, happy to hear it’s all working well!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.