Cannot connect to instance on web UI with fresh install of AMP on OpenSUSE Leap 15.2

  • 466 Views
  • Last Post 07 February 2021
HardToPort posted this 07 February 2021

OS Name/Version:

arashi@localhost:~> cat /usr/lib/os-release
NAME="openSUSE Leap"
VERSION="15.2"
ID="opensuse-leap"
ID_LIKE="suse opensuse"
VERSION_ID="15.2"
PRETTY_NAME="openSUSE Leap 15.2"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:leap:15.2"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org/"

Product Name/Version:

arashi@localhost:~> ampinstmgr --version
[Info] AMP Instance Manager v2.1.0.2 built 03/02/2021 00:33
[Info] Release spec: Release - built by CUBECODERS/buildbot on CCL-DEV

Problem Description:

Hello all,

I manually installed AMP on OpenSUSE Leap using instructions at https://cubecoders.com/AMPInstall

OpenSUSE uses RPM packages, so I installed the repo using the URL from the CentOS tab.

My problem is, when I went to make a new AMP instance using the WebUI, I can't seem to access the instance (Double-clicking or hitting the 'Manage Instance' button just brings up a blank AMP login page (https://ibb.co/mDQVZrB)

Here's the AMP console log:

02/07/2021 22:21:44

22:21:44

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...
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

22:21:45

Using keypair with fingerprint kUxpcqgHo551sjPYBzQ4Ig5NS60ABbF0i1xU81tzlp8=
SFTP Server started on 0.0.0.0:2223
Websockets are enabled.
Webserver started on http://0.0.0.0:8080
RouterTimer@10Hz with 2 jobs started
Checking for AMP updates...

22:21:46

AMP is up-to-date.

:arashi

22:21:53

Managed remote instance YachtClubMC at http://localhost:8081/
Authentication token for arashi requested by ManageInstance on behalf of arashi

:Anonymous

22:21:54

Failure to make API call to YachtClubMC (http://localhost:8081/) - retried 10 times : Connection refused
HttpRequestException
[0] (HttpRequestException) : Connection refused
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)
SocketException
[1] (SocketException) : Connection refused

I figured it might be a "security" issue, so googled how to check AppArmor log.

arashi@localhost:~> sudo journalctl -fx
[sudo] password for root: 
-- Logs begin at Sat 2021-02-06 21:52:18 PST. --
Feb 06 22:00:15 localhost systemd[2757]: amptasks.service: Failed to determine group credentials: No such process
Feb 06 22:00:15 localhost systemd[2757]: amptasks.service: Failed at step GROUP spawning /opt/cubecoders/amp/ampinstmgr: No such process
-- Subject: Process /opt/cubecoders/amp/ampinstmgr could not be executed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- The process /opt/cubecoders/amp/ampinstmgr could not be executed and failed.
-- 
-- The error number returned by this process is 3.
Feb 06 22:00:15 localhost systemd[1]: amptasks.service: Main process exited, code=exited, status=216/GROUP
Feb 06 22:00:15 localhost systemd[1]: Failed to start AMP Instance Manager Pending Tasks.
-- Subject: Unit amptasks.service has failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit amptasks.service has failed.
-- 
-- The result is failed.
Feb 06 22:00:15 localhost systemd[1]: amptasks.service: Unit entered failed state.
Feb 06 22:00:15 localhost systemd[1]: amptasks.service: Failed with result 'exit-code'.

However, /opt/cubecoders/amp/ampinstmgr seems to exist, and is properly symlinked to /usr/bin/ampinstmgr

AMP is also not 'protected' by AppArmor anyway.

arashi@localhost:~> sudo aa-unconfined
[sudo] password for root: 
3331 /home/amp/.ampdata/instances/ADS01/AMP_Linux_x86_64 not confined
3340 /home/amp/.ampdata/instances/YachtClubMC/AMP_Linux_x86_64 not confined
4982 /home/amp/.ampdata/instances/nightly/AMP_Linux_x86_64 not confined

Steps to reproduce:

  • Install OpenSUSE Leap.
  • Install AMP manually, NOT using getamp.sh
    • Install dependencies: sudo zypper in tmux socat unzip git wget
    • Add AMP user: sudo useradd -d /home/amp -m amp -s /bin/bash -G tty
    • Add firewall rule with firewalld: sudo firewall-cmd --add-port=8080/tcp --permanent
    • Add AMP repo to zypper sudo zypper ar -f https://repo.cubecoders.com/ "CubeCoders AMP"
    • Install amp with package manager (zypper) sudo zypper in ampinstmgr
    • First time setup: ampinstmgr quickstart
    • Hit standalone button
  • Make new AMP instance (Minecraft Java) using button in WebUI
  • Attempt to access that instance using either double-clicking or 'Manage Instance' button

Actions taken to resolve so far:

Preliminary googling

Security.EnablePassthruAuth=True in AMPConfig.conf of problem instance, didn't fix problem

Tested WebUI on two different systems using different versions of Firefox (85.0 and 83.0), but don't think that matters

Order By: Standard | Newest | Votes
HardToPort posted this 07 February 2021

sigh

After changing the server's hostname with hostnamectl and restarting, reinstalling AMP, now I can use AMP..

???

HardToPort posted this 07 February 2021

sudo hostnamectl set-hostname your.hostname.com

HardToPort posted this 07 February 2021

So, I may have discovered a bug..

This happened after I changed the hostname and reinstalled AMP

[Notice] AMP Service port ranges have not been specified, using any available...
[Notice] Application Service port ranges have not been specified, using any available...
[Activity] Audit: Unknown/None [CreateInstance] Created instance ADS01 using ADS module on port 8080.
[Info] No cache exists for 2102
[Info] Downloading AMP from https://cubecoders.com/Downloads/AMP_Latest.zip...

[##################################################] ETA 00:00:00 @7.29 MB/secec

[Info] Complete
[00:59:48] [Core Info]            : Starting AMP version 2.1.0.2 (Ganymede), built 03/02/2021 00:32
[00:59:48] [Core Info]            : Stream: Mainline (Release) - built by CUBECODERS/buildbot on CCL-DEV            
[00:59:49] [Core Warning]         : Specified password is very weak. Change it ASAP.
[00:59:49] [Core Warning]         : Current time zone is set to PST - Servers should ideally be UTC to avoid time-zone related issues                                                                                                   
[00:59:49] [Core Info]            : OS: Linux / x86_64
[00:59:49] [Core Info]            : CPU: Intel(R) Xeon(R) CPU E3-1241 v3 @ 3.50GHz (4C/8T)                          
[00:59:49] [Core Info]            : AMP Instance ID: 83ce2eb7-00a2-4e23-9e04-5ff686425e86                           
[00:59:49] [Core Info]            : Performing first-time setup for this instance, please wait...                   
[00:59:49] [Core Info]            : AMP has completed its first time setup. Saving settings and shutting down.      
[Info] Instance created successfully!
[Info] Starting Instance: 'ADS01'
[Info] Waiting for AMP instance to start...
[Notice] AMP instance ADS01 is now running.
[Info] Instance started in new session. Run 'ampinstmgr View ADS01' to view this instances live output.
[Error] Could not resolve host 'yachtclub'
[Error] Instance creation failed.
[Error]   at System.Net.Dns.Error_11001 (System.String hostName) [0x00015] in <41e66f0ee79d44a6b6053b3a141c315b>:0 
  at System.Net.Dns.GetHostByName (System.String hostName) [0x00021] in <41e66f0ee79d44a6b6053b3a141c315b>:0 
  at System.Net.Dns.GetHostEntry (System.String hostNameOrAddress) [0x00052] in <41e66f0ee79d44a6b6053b3a141c315b>:0 
  at System.Net.Dns.GetHostAddresses (System.String hostNameOrAddress) [0x00056] in <41e66f0ee79d44a6b6053b3a141c315b>:0 
  at InstanceManagerCLI.Core.QuickStart (System.String Username, System.String Password, System.String IPBinding, System.Int32 Port, System.Collections.Generic.Dictionary`2[TKey,TValue] ProvisionSettings) [0x0039c] in <ef19ef92923549678c8ba9585bda02ac>:0 

But it works now that I changed the hostname from localhost to something else

Mike posted this 07 February 2021

Your resolv.conf probably didn't have a reference to your domain that pointed locally,so when it tries to connect to its own URL to authenticate it failed. So not a bug, just system misconfiguration.

The error it's giving is Could not resolve host 'yachtclub' so you need to make sure that name can be resolved. This means either your DNS server needs to know about it or resolv.conf/hosts needs an explicit entry to reference it.

Close