[ADS:Anonymous Error] Failure to make API call

  • 727 Views
  • Last Post 20 October 2018
  • Topic Is Solved
JimmyPower posted this 23 September 2018

OS Name/Version: Linux / CentOS 7 (64-bit)

Product Name/Version: AMP Release "Hawking Starman" v1.6.10.0, built 09/09/2018 22:43

ADS.Mode=Standalone

Problem Description:

Hello,

I installed AMP and whenever I click on "Manage" It stuck on "Connecting to remote AMP instance" and I get the following errors:

Error ADS01 Instance:

[18:41:08] [API:Nickname Activity] : Remote login token requested by Nickname on ###.###.#.###
[18:41:09] [ADS:Anonymous Error]  : Failure to make API call to #####-###-###-####### : Error: ConnectFailure (Connection refused)

Error Minecraft01 Instance Example:

[18:36:08] [API:Nickname Activity] : Remote login token requested by Nickname on ###.###.#.###
[18:36:09] [ADS:Anonymous Error]  : Failure to make API call to #####-###-###-####### : An exception occurred during a WebClient request.

,

[18:54:13] [InstanceManager:Nickname Notice] : AMP instance Minecraft01 is now running.
[18:55:04] [API:Nickname Activity] : Remote login token requested by Nickname on ###.###.#.###
[18:55:04] [ADS:Anonymous Error]  : Failure to make API call to #####-###-###-####### : The remote server returned an error: (404) Not Found.

-

09/23/2018 18:30:26
18:30:26Access denied: You do not have permission to use this method (WebMethods.GetAMPUserInfo) at this time. This method requires the Session.LoggedIn permission.

Steps to reproduce:

Step 1: Install by this guide: https://cubecoders.com/AMPInstall / Start Instance

Step 2: Changed Port at: .ampdata/instances/ADS01/AMPConfig.conf

Step 3: Login

Step 4: Click on Instance > Manage

Actions taken to resolve so far:

  • Reinstall
  • Nightly Build
  • Checked Ports
  • Deleted AMPCache-16100.zip
  • Deleted browser Cache
  • Changed Browser

Order By: Standard | Newest | Votes
Mike posted this 23 September 2018

Connection refused in the error means that whatever it's trying to connect to isn't running. Check the log file for the instance you're trying to manage and ensure that it's up and running and doesn't have any issues preventing it from starting.

JimmyPower posted this 23 September 2018

Hello Mike,

I managed to run the minecraft server on another port too and I am able to connect to the control panel and start the server. I also logged in the server without problems but the problem with the "Manage" button still there for both ADS and minecraft instances.

Now I get those errors in AMPLOG

[18:55:04] [API:Nickname Activity] : Remote login token requested by Nickname on ###.###.#.###
[18:55:04] [ADS:Anonymous Error]  : Failure to make API call to #####-###-###-####### : The remote server returned an error: (404) Not Found.

Seems like my problem is something with the ports.

I created 1 minecraft server and I can't use the manage button (Minecraft01). I created one more and I can (Minecraft02). I created another one and I can't (Minecraft03).

However I change the port in the Instance AMPConfig.conf file and I still can't even with the port that the 2nd instance is working.

Mike posted this 23 September 2018

Are ADS and your instance the same version number?

JimmyPower posted this 23 September 2018

Hello Mike,

If you are asking about the AMP Release "Hawking Starman" v1.6.10.0, built 09/09/2018 22:43, Yes. If not how can I see the version?

Ps. I just installed The CP, made the settings and created the Instances from the web interface, I didnt updated or upgrading anything.

Thanks

Mike posted this 23 September 2018

If you've changed any port numbers manually then things won't work properly - You need to use ampinstmgr rebind to change what IP address/port an instance is running on otherwise nothing will correct properly.

JimmyPower posted this 23 September 2018

Thank you very much Mike! It's working now.

I have 3 last questions:

  1. What about the Install Service / Uninstall Service buttons? How do they work?
  2. Is there any tutorial on how to enable SSL with the panel?
  3. From the tutorial: Optional - make AMP automatically start on boot (crontab -l ; echo "@reboot ampinstmgr -x")| crontab - How is that working? I'm a bit new to all this. x)

And again, thank you for your help!

Mike posted this 23 September 2018

Those buttons only apply to Windows systems and are due to be removed from ADS.

You need a certificate in PFX format with a passphrase, and there's a setting in AMPConfig.conf to specify the keyfile and passphrase. Note that if you do this to your ADS setup all your instances will need their setting changing to point to https rather than HTTP.

See ampinstmgr help setstartboot

JimmyPower posted this 23 September 2018

Thanks Mike,

I created the crons with: @reboot cd /opt/cubecoders/amp && ./ampinstmgr StartInstance ADS01

The remote manage works but I still get this error on console whenever I click manage: "Access denied: You do not have permission to use this method (WebMethods.GetAMPUserInfo) at this time. This method requires the Session.LoggedIn permission."

And Also when I'm trying to Whitelist a Player I get the following: http://prntscr.com/kxug3n

Mike posted this 23 September 2018

In that case they're not communicating properly. Either bad firewall rules or the auth server is still not configured correctly in the instances.

The whitelist issue is a known one, for now use the console to whitelist players while the server is running.

JimmyPower posted this 24 September 2018

I added the ports like this

ADS01: iptables -A INPUT -p udp -m udp --dport 8087 -j ACCEPT

Minecraft01: iptables -A INPUT -p udp -m udp --dport 8088 -j ACCEPT

Save: /sbin/service iptables save

And I changed the default ports with the commands:

./ampinstmgr --RebindInstance ADS01 XXX.XXX.XX.X 8087
./ampinstmgr --RebindInstance Minecraft01 XXX.XXX.XX.X 8088
./ampinstmgr --ShowInstancesList

I can't understand what I am doing wrong.

On the Minecraft01 AMPConfig.conf file also I tried with:

Webserver

Webserver.Port=8088
Webserver.IPBinding=0.0.0.0
Webserver.SessionTimeout=5
Webserver.NoUI=False
Webserver.FilterEndpoints=False
Webserver.AllowedEndpointIPs=["127.0.0.1"]
Webserver.CertificatePath=
Webserver.CertificateSerial=
Webserver.CertificatePassword=
Webserver.EnableWebSockets=False
Webserver.EnablePushPutEndpoints=False
Webserver.APIRateLimit=100
Webserver.UsingReverseProxy=False
Webserver.ReverseProxyHost=127.0.0.1


Login

Login.UseAuthServer=True
Login.AuthServerURL=http://domain.tld:8087/
Login.LDAPAllowAuthOnAnyDomain=False
Login.LDAPAuthDomain=

And With:

Login

Login.UseAuthServer=True
Login.AuthServerURL=http://IP:8087/
Login.LDAPAllowAuthOnAnyDomain=False
Login.LDAPAuthDomain=

Mike posted this 24 September 2018

Restart all of the instances, and empty your browser cache.

JimmyPower posted this 24 September 2018

I will try it tomorrow and i'll reply back.

Thanks for your patience and all the help so far, have a good night/day.

JimmyPower posted this 25 September 2018

Hello,

I tried with a different new/clean browser and I'm still getting the same error every time I'm Managing an Instance.

09/25/2018 09:50:30: :Anonymous
09:50:30: Access denied: You do not have permission to use this method (WebMethods.GetAMPUserInfo) at this time. This method requires the Session.LoggedIn permission.

Mike posted this 25 September 2018

Are you using cloud flare or any other caching/proxy service?

JimmyPower posted this 25 September 2018

Good morning mike,

I'm only using VestaCP for my websites with nginx+apache. Nothing else.

Mike posted this 25 September 2018

Check ADSs log to see if it's generating a token when requested by the user.

JimmyPower posted this 25 September 2018

At /AMP/.ampdata/instances/ADS01/AMP_Logs I have this at the end of the file after clicking manage. Is the same as the console, except if tehre are other logs somewhere.

[13:49:33] [Auth:Anonymous Activity] : Authentication attempt for user Nickname from XXX.XXX.XX.X
[13:49:39] [Auth:Nickname Activity] : Authentication success
[13:49:39] [APIService:Anonymous Warning] : Access denied: You do not have permission to use this method (WebMethods.GetAMPUserInfo) at this time. This method requires the Session.LoggedIn permission.

Mike posted this 25 September 2018

before that, there should be a line saying that your nickname has requested a login token.

JimmyPower posted this 25 September 2018

Yes, sorry, here is the line before that.

[13:49:31] [API:Nickname Activity] : Remote login token requested by Nickname on xx.xxx.xx.xxx

Mike posted this 25 September 2018

Log directly into the instance instead of using manage via ADS, what log output does it produce?

Show More Posts
Close