AMP Interface and API no longer showing number of active users on minecraft bedrock since update

  • Last Post 5 days ago
Cardy posted this 2 weeks ago

OS Name/Version:

CentOS 8.2.2004

Product Name/Version:

AMP Release "Europa" v2.0.8.2, built 10/11/2020 17:57

Module Minecraft (Bedrock)

AMP Version │

Release Stream │ Mainline

Problem Description:

Before the latest release when a user joined the server the manage instance page showed the correct number of users. This is no longer being updated and always shows 0.

I believe this is an issue related to the API as I have been writing a script to get the number of users from the API which was working fine.

I could query the instance of minecraft that was running using

"/API/Core/GetStatus" and the key "Metrics.Active Users.RawValue" would return the active number of users.

The API for the instance now always shows 0 for this metric.

I also query the endpoint "/API/Core/GetUserList" for the user list again previously this provided a list of the users xuid and Username. This now just appears to return an empty list.

Steps to reproduce:

Start bedrock instance Click on the instance and select manage Click on the status button so Active users is visible join the server Active Users remains at 0

Query the API for the endpoints above and even though I am successfully logged in I get back 0 for Active Users and the userlist is empty when querying appropriate endpoints.

Actions taken to resolve so far:

I have logged out on the frontend and cleared my cache. I have restarted the instances and even rebooted the server to get a clean startup after the upgrade. I have checked the logs but nothing is obvious to me as to why there is a problem.

Order By: Standard | Newest | Votes
Mike posted this 2 weeks ago

This is a duplicate of the issue immediately below yours. There's a temporary workaround in the Nightly build. They changed the logging format for Bedrock.

Cardy posted this 2 weeks ago

Hi Mike,

Thanks for the quick reply. I tried changing the server to the nightly build but when I run on my bedrock instance it shows the main port for minecraft as CLOSED.

ampinstmgr --Showinstanceports Kids02

[Info] AMP Instance Manager v2.0.8.2 built 10/11/2020 17:59
[Info] Release spec: Release - built by CUBECODERS/buildbot on CCL-DEV
[Info] Port usage for Kids02 (Kids)
[Info] Instance is currently running.
[Info] LISTENING    8082    TCP (Core.Webserver.Port)
[Info] LISTENING    2225    TCP (FileManagerPlugin.SFTP.SFTPPortNumber)
[Info] CLOSED       26677   Both    (MinecraftModule.Minecraft.PortNumber)

The server appears as running according to the console in the instance manager and I can see stats from it I can also query the console.


Mike posted this 2 weeks ago

Ampinstmgr doesn't show the status quite right for ports where the protocol is 'both'. It's a bit of a hack due to the way the same module handles both Bedrock and java edition but they use different protocols.

Cardy posted this 2 weeks ago

Mmmm I can't actually connect to the server using the client though and the server is not showing the port specified 26677 as actually being open for connections to the bedrock instance in the server itself.

Mike posted this 2 weeks ago

Check using netstat

Cardy posted this 2 weeks ago

Hi Mike,

Thanks for your continued help. I did check netstat and it was not showing as being in use that's what meant by the port is not open in the server itself, I should have been clearer.

I restarted the whole server and it seems to have sorted out the server binding to the port but the number of users and the list of users when checked as originally reported are still not working even with the nightly build.

I still get a number of users as 0 and an empty user list via the API.


Mike posted this 2 weeks ago

Do they show in the panel correctly?

Cardy posted this 2 weeks ago

No the panel does not show any users connected even when I am connected to the instance.

Mike posted this 2 weeks ago

Some more changes are probably needed then, when they change the logging format then AMP needs a fair few changes to accommodate this.

Cardy posted this 2 weeks ago

I'm guessing this is why my trigger for "When the last user leaves the server" Run "start a backup" isn't working as they API doesn't know the last user left.

hedgehogspen posted this 2 weeks ago

I'm seeing the same, though in my case the console correctly shows users logging in and out, it's just the Status page that's not updating.

A further thing I noticed was that the 'Starting Server' Notification just sits there, even once the console shows the server as started (and I can log in).

This is on the main build and not nighly btw.

Cardy posted this 6 days ago

Hi hedgehogspen,

I had that same problem of the status always showing starting but I found after a reboot it seemed to fix itself.

I suspect the amp manager getting restarted would have solved it too, but could cause the api and the status page (which I suspect uses the api to stop reporting the number of players)

Cardy posted this 5 days ago

I have updated to the latest version

The release runs fine but I has not resolved the problem with the status page showing no users.