Port Usage Not Clearing

  • OS Name/Version: Windows 10

  • Product Name/Version: (Always use the full version number - not ‘Latest’)
    2.4.0.4

  • Problem Description: Instance does not start, port becomes in use by amp. restart of instance throws port usage error

  • ADS01 Logs

12:22:12
Loaded ADSModule version 1.0.0.0 by CubeCoders Limited
Loaded FileManagerPlugin version 1.0.0.0 by CubeCoders Limited
Loaded EmailSenderPlugin version 1.0.0.0 by CubeCoders Limited
Loaded WebRequestPlugin version 1.0.0.0 by CubeCoders Limited
Loaded LocalFileBackupPlugin version 1.0.0.0 by CubeCoders Limited
Loaded CommonCorePlugin version 1.0.0.0 by CubeCoders Limited
ADSModule requests dependency InstanceManagerPlugin...
12:22:13
Loaded InstanceManagerPlugin version 1.0.0.0 by CubeCoders Limited
ADSModule requests dependency SystemUserManagerPlugin...
Loaded SystemUserManagerPlugin version 1.0.0.0 by CubeCoders Limited
Loaded steamcmdplugin version 1.0.0.0 by CubeCoders Limited
Metrics server started OK on port 12820
Updating remote source CubeCoders/AMPTemplates
12:22:14
Updating existing remote source https://github.com/CubeCoders/AMPTemplates.git...
Using keypair with fingerprint ZXdwl3gBVB3Rb66jeMRvq/r62+g7ijoxN5H6Cp50O/Q=
SFTP Server started on 0.0.0.0:2223
Websockets are enabled.
12:22:15
RouterTimer@10Hz with 2 jobs started
Webserver started on http://0.0.0.0:8080
Checking for AMP updates...
fatal: detected dubious ownership in repository at 'D:/AMPDatastore/Instances/ADS01/Plugins/ADSModule/DeploymentTemplates/CubeCoders-AMPTemplates'
'D:/AMPDatastore/Instances/ADS01/Plugins/ADSModule/DeploymentTemplates/CubeCoders-AMPTemplates' is on a file system that doesnot record ownership
To add an exception for this directory, call:
git config --global --add safe.directory D:/AMPDatastore/Instances/ADS01/Plugins/ADSModule/DeploymentTemplates/CubeCoders-AMPTemplates
AMP is up-to-date.
:admin12:22:26
Waiting for AMP instance to start...
12:22:31
Instance status is offline but process has not exited...
12:22:56
Downloaded file __VDS__mained01/AMP_Logs/AMPLOG 2022-09-14 16-22-27.log (API mode)
12:23:05
Uploaded file __VDS__mained01/AMP_Logs/AMPLOG 2022-09-14 16-22-27.log (API mode)
12:23:11
Upgrading instance mained01
12:23:12
Using cached archive: D:\AMPDatastore\Instances\AMPCache-2404.zip
12:23:23
Waiting for AMP instance to start...
12:23:28
Failed to start AMP. Exit code was -2146232797
12:25:05
Changing setting ADSModule.Networking.DefaultAppIPBinding to 0.0.0.0
12:25:10
Upgrading instance mained01
12:25:11
Using cached archive: D:\AMPDatastore\Instances\AMPCache-2404.zip
12:25:22
Waiting for AMP instance to start...
12:25:27
Failed to start AMP. Exit code was -2146232797
12:25:59
Changing setting ADSModule.Networking.DefaultAppIPBinding to 10.0.0.185
12:28:15
Waiting for AMP instance to start...
12:28:20
Instance status is offline but process has not exited...
12:28:32
Downloaded file __VDS__mained01/AMP_Logs/AMPLOG 2022-09-14 16-22-27.log (API mode)
12:28:36
Waiting for AMP instance to start...
12:28:41
Failed to start AMP. Exit code was -2146232797
  • MC INSTANCE INITIAL LAUNCH
[16:22:27] [Program Info]         : Starting AMP version 2.4.0.4 (Halimede), built 10/09/2022 16:30
[16:22:27] [Program Info]         : Stream: Mainline (Release) - built by CUBECODERS/buildbot on CCL-DEV
[16:22:27] [Core Warning]         : Current time zone is set to Eastern Standard Time - It is recommended you switch to UTC+0 to avoid time-zone related issues
[16:22:27] [Program Info]         : OS: Windows / x86_64
[16:22:27] [Program Info]         : CPU: Intel(R) Core(TM)2 Quad CPU Q9550 @ 2.83GHz (4C/4T)
[16:22:27] [Program Info]         : AMP Instance ID: d7d99d50-4959-4798-a37f-bb0a19064e0f
[16:22:28] [Core Info]            : Loaded MinecraftModule version 1.0.0.3 by CubeCoders Limited
[16:22:28] [Core Info]            : Metrics publishing is enabled at udp://127.0.0.1:12820.
[16:22:28] [ModuleLoader Info]    : Loaded FileManagerPlugin version 1.0.0.0 by CubeCoders Limited
[16:22:28] [ModuleLoader Info]    : Loaded EmailSenderPlugin version 1.0.0.0 by CubeCoders Limited
[16:22:28] [ModuleLoader Info]    : Loaded WebRequestPlugin version 1.0.0.0 by CubeCoders Limited
[16:22:28] [ModuleLoader Info]    : Loaded LocalFileBackupPlugin version 1.0.0.0 by CubeCoders Limited
[16:22:28] [ModuleLoader Info]    : Loaded CommonCorePlugin version 1.0.0.0 by CubeCoders Limited
[16:22:28] [Core Info]            : Licence Present: AMP Professional Edition (Licenced to William Tober)
[16:22:28] [FileManager Notice]   : Using keypair with fingerprint w6ZNw4ggXlA/by1HoylnG5vWgEY2csdmBVRjXXDL5BA=
[16:22:28] [ModuleLoader Info]    : SFTP Server started on 10.0.0.185:2229
[16:22:28] [WebServer Info]       : Websockets are enabled.
[16:22:29] [WebServer Warning]    : RouterTimer@10Hz with 2 jobs started
[16:22:29] [Core Info]            : Webserver started on http://0.0.0.0:8101
[16:22:29] [System Info]          : Checking for AMP updates...
[16:22:29] [System Info]          : AMP is up-to-date.
[16:22:32] [System Info]          : Modpack cache is up-to-date.
  • MC INSTANCE LOGS AFTER INITIAL LAUNCH ATTEMPT
[16:28:37] [Program Info]         : Starting AMP version 2.4.0.4 (Halimede), built 10/09/2022 16:30
[16:28:37] [Program Info]         : Stream: Mainline (Release) - built by CUBECODERS/buildbot on CCL-DEV
[16:28:37] [Core Warning]         : Current time zone is set to Eastern Standard Time - It is recommended you switch to UTC+0 to avoid time-zone related issues
[16:28:37] [Program Info]         : OS: Windows / x86_64
[16:28:37] [Program Info]         : CPU: Intel(R) Core(TM)2 Quad CPU Q9550 @ 2.83GHz (4C/4T)
[16:28:37] [Program Info]         : AMP Instance ID: d7d99d50-4959-4798-a37f-bb0a19064e0f
[16:28:38] [Core Info]            : Loaded MinecraftModule version 1.0.0.3 by CubeCoders Limited
[16:28:38] [Core Info]            : Metrics publishing is enabled at udp://127.0.0.1:12820.
[16:28:38] [ModuleLoader Info]    : Loaded FileManagerPlugin version 1.0.0.0 by CubeCoders Limited
[16:28:38] [ModuleLoader Info]    : Loaded EmailSenderPlugin version 1.0.0.0 by CubeCoders Limited
[16:28:38] [ModuleLoader Info]    : Loaded WebRequestPlugin version 1.0.0.0 by CubeCoders Limited
[16:28:38] [ModuleLoader Info]    : Loaded LocalFileBackupPlugin version 1.0.0.0 by CubeCoders Limited
[16:28:38] [ModuleLoader Info]    : Loaded CommonCorePlugin version 1.0.0.0 by CubeCoders Limited
[16:28:38] [Core Info]            : Licence Present: AMP Professional Edition (Licenced to William Tober)
[16:28:38] [ModuleLoader Error]   : Unable to start SFTP server.
[16:28:38] [FileManager Error]    : InvalidOperationException
[16:28:38] [FileManager Error]    : [0] (InvalidOperationException) : The specified socket is already in use.
[16:28:38] [FileManager Error]    :    at tyfsv.rsrrj.vfuno(EndPoint p0, Boolean p1)
   at tyfsv.rsrrj..ctor(EndPoint ep, String hostname, mnbpk runner)
   at Rebex.Net.Servers.Core.Server.Bind(IPEndPoint endPoint, ServerModule module)
   at FileManagerPlugin.PluginMain.PostInit()
[16:28:38] [FileManager Error]    : SocketException
[16:28:38] [FileManager Error]    : [1] (SocketException) : Only one usage of each socket address (protocol/network address/port) is normally permitted
[16:28:38] [FileManager Error]    :    at Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at Net.Sockets.Socket.Bind(EndPoint localEP)
   at tyfsv.rsrrj.vfuno(EndPoint p0, Boolean p1)
[16:28:38] [WebServer Info]       : Websockets are enabled.
[16:28:38] [Core Info]            : Webserver started on http://0.0.0.0:8101
[16:28:38] [WebServer Warning]    : RouterTimer@10Hz with 2 jobs started
[16:28:38] [System Error]         : Socket exception - Trivial error / user error. Will not be submitted.
[16:28:38] [System Error]         : [Error] --- Begin Exception Data ---
[Error] OS: Windows (x86_64/None)
[Error] Module: MinecraftModule, Version: AMP 2.4.0.4
[Error] Release spec: Release - built by CUBECODERS/buildbot on CCL-DEV
[Error] Instance ID: d7d99d50-4959-4798-a37f-bb0a19064e0f
[Error] SocketException
[Error] [0] (SocketException) : Only one usage of each socket address (protocol/network address/port) is normally permitted
[Error]    at Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at Net.Sockets.Socket.Bind(EndPoint localEP)
   at Net.Sockets.TcpListener.Start(Int32 backlog)
   at m.Http.HttpBackend.ConnectionLoop()
[Error] --- End Exception Data ---

[16:28:38] [ErrorReporter Info]   : ####################################
[16:28:38] [ErrorReporter Info]   : #         Self Diagnostics         #
[16:28:38] [ErrorReporter Info]   : ####################################
[16:28:38] [ErrorReporter Info]   : The IP and Port combination requested by the socket is already in use by another application. Either end the other application or re-bind this AMP instance to a different IP/port.
[16:28:38] [System Info]          : Checking for AMP updates...
[16:28:39] [System Info]          : AMP is up-to-date.

Steps to reproduce:

  • Step 1 : Start ADS01, Start Minecraft Instance, it fails but gives dubious error code -2146232797
  • Step 2 : Attempt to restart the instance. No error is given but the MC Instance Logs states that the port is now in use, this can be confirmed in windows resource manager.
  • Step 3 : Smack head on table

Actions taken to resolve so far:
Not sure yet, it’s early and not enough caffeine. Might just manually launch my instances and skip amp until I feel like messing with it.

You’ve got instances that weren’t properly shut down. Kill copies of amp.exe or ampservice.exe via task manager and it’ll spring to life after starting ADS back up again.

I have tried the above

This is the error that I get when I do so.

AMP CONSOLE LOG

17:38:28 Loaded ADSModule version 1.0.0.0 by CubeCoders Limited
17:38:29 Loaded FileManagerPlugin version 1.0.0.0 by CubeCoders Limited
Loaded EmailSenderPlugin version 1.0.0.0 by CubeCoders Limited
Loaded WebRequestPlugin version 1.0.0.0 by CubeCoders Limited
17:38:30 Loaded LocalFileBackupPlugin version 1.0.0.0 by CubeCoders Limited
Loaded CommonCorePlugin version 1.0.0.0 by CubeCoders Limited
ADSModule requests dependency InstanceManagerPlugin...
17:38:32
Loaded InstanceManagerPlugin version 1.0.0.0 by CubeCoders Limited
ADSModule requests dependency SystemUserManagerPlugin...
Loaded SystemUserManagerPlugin version 1.0.0.0 by CubeCoders Limited
Loaded steamcmdplugin version 1.0.0.0 by CubeCoders Limited
Metrics server started OK on port 12820
17:38:33 Updating remote source CubeCoders/AMPTemplates
Updating existing remote source https://github.com/CubeCoders/AMPTemplates.git...
Using keypair with fingerprint ZXdwl3gBVB3Rb66jeMRvq/r62+g7ijoxN5H6Cp50O/Q=
SFTP Server started on 0.0.0.0:2223
fatal: detected dubious ownership in repository at 'D:/AMPDatastore/Instances/ADS01/Plugins/ADSModule/DeploymentTemplates/CubeCoders-AMPTemplates'
'D:/AMPDatastore/Instances/ADS01/Plugins/ADSModule/DeploymentTemplates/CubeCoders-AMPTemplates' is on a file system that doesnot record ownership
17:38:34 Websockets are enabled.
To add an exception for this directory, call:
git config --global --add safe.directory D:/AMPDatastore/Instances/ADS01/Plugins/ADSModule/DeploymentTemplates/CubeCoders-AMPTemplates
Webserver started on http://0.0.0.0:8080
RouterTimer@10Hz with 2 jobs started
Checking for AMP updates...
AMP is up-to-date.
:admin 
17:38:47 Waiting for AMP instance to start...
17:38:52 Instance status is offline but process has not exited...
17:39:15 Downloaded file __VDS__mained01/AMP_Logs/AMPLOG 2022-09-14 21-38-47.log (API mode)

MC INSTANCE LOG

[21:38:47] [Program Info]         : Starting AMP version 2.4.0.4 (Halimede), built 10/09/2022 16:30
[21:38:47] [Program Info]         : Stream: Mainline (Release) - built by CUBECODERS/buildbot on CCL-DEV
[21:38:48] [Core Warning]         : Current time zone is set to Eastern Standard Time - It is recommended you switch to UTC+0 to avoid time-zone related issues
[21:38:48] [Program Info]         : OS: Windows / x86_64
[21:38:48] [Program Info]         : CPU: Intel(R) Core(TM)2 Quad CPU Q9550 @ 2.83GHz (4C/4T)
[21:38:48] [Program Info]         : AMP Instance ID: d7d99d50-4959-4798-a37f-bb0a19064e0f
[21:38:48] [Core Info]            : Loaded MinecraftModule version 1.0.0.3 by CubeCoders Limited
[21:38:48] [Core Info]            : Metrics publishing is enabled at udp://127.0.0.1:12820.
[21:38:48] [ModuleLoader Info]    : Loaded FileManagerPlugin version 1.0.0.0 by CubeCoders Limited
[21:38:48] [ModuleLoader Info]    : Loaded EmailSenderPlugin version 1.0.0.0 by CubeCoders Limited
[21:38:48] [ModuleLoader Info]    : Loaded WebRequestPlugin version 1.0.0.0 by CubeCoders Limited
[21:38:48] [ModuleLoader Info]    : Loaded LocalFileBackupPlugin version 1.0.0.0 by CubeCoders Limited
[21:38:48] [ModuleLoader Info]    : Loaded CommonCorePlugin version 1.0.0.0 by CubeCoders Limited
[21:38:49] [Core Info]            : Licence Present: AMP Professional Edition (Licenced to William Tober)
[21:38:49] [FileManager Notice]   : Using keypair with fingerprint w6ZNw4ggXlA/by1HoylnG5vWgEY2csdmBVRjXXDL5BA=
[21:38:49] [ModuleLoader Info]    : SFTP Server started on 10.0.0.185:2229
[21:38:49] [WebServer Info]       : Websockets are enabled.
[21:38:49] [Core Info]            : Webserver started on http://0.0.0.0:8101
[21:38:49] [WebServer Warning]    : RouterTimer@10Hz with 2 jobs started
[21:38:49] [System Info]          : Checking for AMP updates...
[21:38:50] [System Info]          : AMP is up-to-date.
[21:38:52] [System Info]          : Modpack cache is up-to-date.

When I try to do anything afterwards it shows the instance is not active and refuses to attempt to launch a new instance because the port is still open… So I have to end amp.exe and ampservice.exe for it to even try again.

What file system is in use on D: ?

the D: is using exfat, its a 8tb but the MC instance i’m trying to loadup is on my C:

If your AMP instances are stored on D: then it must be NTFS or ReFS under Windows. (ex)FAT doesn’t support file permissions which will very quickly screw everything up xD

Ah okay, that explains why everything is wonky as hell. I wanted it all on my main drive anyway, but it never gave me an option to choose the primary datastore when I first setup. I’m a try doing so when I get home…

Thank you for responding so quickly.