AMP desn't start after server's reboot. Browser says - 404 Not Found

OS Name/Version: Ubuntu 22.04.3

Product Name/Version: AMP Instance Manager v2.4.6 built 02/08/2023

Problem Description:
Freshly installed AMP doesn’t start after server reboot. The browser shows Nginx error message - 404 Not Found

Although instance is started

 ξ‚° CubeCoders AMP ξ‚° πŸ’»amp@ubuntu-s-4vcpu-8gb-ams3-01 ξ‚° πŸ“~ ξ‚° ampinstmgr status
[Info] AMP Instance Manager v2.4.6 built 02/08/2023 19:48
[Info] Stream: Mainline / Release - built by CUBECODERS/buildbot on CCL-DEV
Instance Name      β”‚ Friendly Name    β”‚ Module     β”‚ IP              β”‚ Port  β”‚ Up
───────────────────┼──────────────────┼────────────┼─────────────────┼───────┼───
ADS01              β”‚ ADS              β”‚ ADS        β”‚ 0.0.0.0         β”‚ 8080  β”‚

Netstat shows no running services on 8080

 ξ‚° CubeCoders AMP ξ‚° πŸ’»amp@ubuntu-s-4vcpu-8gb-ams3-01 ξ‚° πŸ“~ ξ‚° netstat -tulpn
(No info could be read for "-p": geteuid()=1001 but you should be root.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      -
tcp6       0      0 :::443                  :::*                    LISTEN      -
tcp6       0      0 :::80                   :::*                    LISTEN      -
tcp6       0      0 :::22                   :::*                    LISTEN      -
udp        0      0 127.0.0.53:53           0.0.0.0:*                           -
 ξ‚° CubeCoders AMP ξ‚° πŸ’»amp@ubuntu-s-4vcpu-8gb-ams3-01 ξ‚° πŸ“~ ξ‚°

If I go to the instance folder and start AMP_Linux_x86_64 manually console becomes available

amp@ubuntu-s-4vcpu-8gb-ams3-01:~/.ampdata/instances/ADS01$ ./AMP_Linux_x86_64
[12:22:21] [Logger Info]          : Starting AMP version 2.4.6.0 (Decadeus), built 09/08/2023 17:53
[12:22:21] [Logger Info]          : Stream: Mainline / Release - built by CUBECODERS/buildbot on CCL-DEV
[12:22:21] [Logger Info]          : Running in a QEMU KVM environment.
[12:22:22] [Logger Info]          : OS: Linux / x86_64
[12:22:22] [Logger Info]          : CPU: DO-Regular (4C/4T)
[12:22:22] [Logger Info]          : RAM: 7937MB
[12:22:22] [Logger Info]          : AMP Instance ID: 9bec44d4-2d91-4764-9ddd-df5072bad7bf
[12:22:22] [Logger Info]          : Loaded ADSModule version 1.0.0.0 by CubeCoders Limited
[12:22:22] [Logger Info]          : Loaded FileManagerPlugin by CubeCoders Limited
[12:22:22] [Logger Info]          : Loaded EmailSenderPlugin by CubeCoders Limited
[12:22:22] [Logger Info]          : Loaded WebRequestPlugin by CubeCoders Limited
[12:22:22] [Logger Info]          : Loaded LocalFileBackupPlugin by CubeCoders Limited
[12:22:22] [Logger Info]          : Loaded CommonCorePlugin by CubeCoders Limited
[12:22:22] [Logger Info]          : ADSModule requests dependency InstanceManagerPlugin...
[12:22:23] [Logger Info]          : Loaded InstanceManagerPlugin by CubeCoders Limited
[12:22:23] [Logger Info]          : ADSModule requests dependency SystemUserManagerPlugin...
[12:22:23] [Logger Info]          : Loaded SystemUserManagerPlugin by CubeCoders Limited
[12:22:23] [Logger Info]          : Loaded steamcmdplugin by CubeCoders Limited
[12:22:23] [Logger Info]          : Metrics server started OK on port 12820
[12:22:23] [Logger Info]          : ADS startup complete in 355ms
[12:22:23] [Logger Info]          : Updating remote source CubeCoders/AMPTemplates
[12:22:23] [Logger Info]          : Updating existing remote source https://github.com/CubeCoders/AMPTemplates.git...
[12:22:24] [Logger Notice]        : Using keypair with fingerprint 4Re/rjsq7RdB7iKpSiAmonDWG3Q1VXsjzsb1Qu2OOQU=
[12:22:24] [Logger Info]          : SFTP Server started on 0.0.0.0:2223
[12:22:24] [Webserver Info]       : Websockets are enabled.
[12:22:24] [Logger Info]          : Webserver started on http://127.0.0.1:8080
[12:22:24] [Logger Info]          : RouterTimer@10Hz with 2 jobs started
[12:22:24] [Core Info]            : Checking for AMP updates...
[12:22:24] [Logger Info]          : Startup mode is StartApplication.
Already up to date.
[12:22:24] [Core Info]            : AMP is up to date.

Steps to reproduce:

Install AMP using β€œbash <(wget -qO- getamp.sh)”
Finish installation in the browser
Reboot the server

Actions taken to resolve so far:
I tried to reinstall AMP, same result.

What’s the output of:

ampinstmgr info ADS (run as the amp user)

systemctl status ampinstmgr (run as root)

Hi Greelan, thank you for your prompt reply. It seems the issue solved itself as soon as I posted my request. The only thing I also did is replacing web server address in the config file from 0.0.0.0:8080 to 127.0.0.1:8080.

Anyway, you can see the outputs you requested below.

root@ubuntu-s-4vcpu-8gb-ams3-01:~# systemctl status ampinstmgr
● ampinstmgr.service - AMP Instance Manager
     Loaded: loaded (/etc/systemd/system/ampinstmgr.service; enabled; vendor pr>
     Active: active (exited) since Sun 2023-08-13 12:31:01 UTC; 41min ago
       Docs: https://github.com/CubeCoders/AMP/wiki/AMP-systemd-script-(Linux)
    Process: 712 ExecStart=/opt/cubecoders/amp/ampinstmgr startboot true (code=>
   Main PID: 712 (code=exited, status=0/SUCCESS)
      Tasks: 98 (limit: 9477)
     Memory: 4.7G
        CPU: 18min 7.598s
     CGroup: /system.slice/ampinstmgr.service
             β”œβ”€ 821 /usr/bin/tmux -f /dev/null new-session -s AMP_ADS01 -d "cd >
             β”œβ”€ 825 /home/amp/.ampdata/instances/ADS01/AMP_Linux_x86_64 +Core.W>
             β”œβ”€1118 /home/amp/.ampdata/instances/Wonderland01/AMP_Linux_x86_64 >
             └─1996 /home/amp/.ampdata/instances/Wonderland01/Valheim/896660/va>

Aug 13 12:31:00 ubuntu-s-4vcpu-8gb-ams3-01 ampinstmgr[712]: Can't find custom a>
Aug 13 12:31:00 ubuntu-s-4vcpu-8gb-ams3-01 ampinstmgr[712]: [Info] Waiting for >
Aug 13 12:31:01 ubuntu-s-4vcpu-8gb-ams3-01 ampinstmgr[712]: [Notice] AMP instan>
Aug 13 12:31:01 ubuntu-s-4vcpu-8gb-ams3-01 systemd[1]: Finished AMP Instance Ma>
Aug 13 12:31:03 ubuntu-s-4vcpu-8gb-ams3-01 sudo[857]: pam_unix(sudo:auth): conv>
Aug 13 12:31:03 ubuntu-s-4vcpu-8gb-ams3-01 sudo[857]: pam_unix(sudo:auth): auth>
Aug 13 12:33:03 ubuntu-s-4vcpu-8gb-ams3-01 sudo[1077]: pam_unix(sudo:auth): con>
Aug 13 12:33:03 ubuntu-s-4vcpu-8gb-ams3-01 sudo[1077]: pam_unix(sudo:auth): aut>
lines 1-23...skipping...
● ampinstmgr.service - AMP Instance Manager
     Loaded: loaded (/etc/systemd/system/ampinstmgr.service; enabled; vendor preset: enabled)
     Active: active (exited) since Sun 2023-08-13 12:31:01 UTC; 41min ago
       Docs: https://github.com/CubeCoders/AMP/wiki/AMP-systemd-script-(Linux)
    Process: 712 ExecStart=/opt/cubecoders/amp/ampinstmgr startboot true (code=exited, status=0/SUCCESS)
   Main PID: 712 (code=exited, status=0/SUCCESS)
      Tasks: 98 (limit: 9477)
     Memory: 4.7G
        CPU: 18min 7.598s
     CGroup: /system.slice/ampinstmgr.service
             β”œβ”€ 821 /usr/bin/tmux -f /dev/null new-session -s AMP_ADS01 -d "cd '/home/amp/.ampdata/instances/ADS01'; /home/amp/.ampdata/instances/ADS01/AMP_Linux_x86_64 +Core.Webserver.Port 8080 +Core.Webserver.IPBinding 0.0.0.0 +Core.AMP.InstanceID 9bec44d4-2d91-4764-9ddd-df5072bad7bf +FileManagerPlugin.SFTP.SFTPP>
             β”œβ”€ 825 /home/amp/.ampdata/instances/ADS01/AMP_Linux_x86_64 +Core.Webserver.Port 8080 +Core.Webserver.IPBinding 0.0.0.0 +Core.AMP.InstanceID 9bec44d4-2d91-4764-9ddd-df5072bad7bf +FileManagerPlugin.SFTP.SFTPPortNumber 2223
             β”œβ”€1118 /home/amp/.ampdata/instances/Wonderland01/AMP_Linux_x86_64 +Core.Webserver.Port 8081 +Core.Webserver.IPBinding 127.0.0.1 +Core.AMP.InstanceID 802f6e88-95d4-48e9-86d8-951df7bf04e0 +FileManagerPlugin.SFTP.SFTPPortNumber 2224 +GenericModule.App.Ports. 2456 +GenericModule.App.Ports. 2457
             └─1996 /home/amp/.ampdata/instances/Wonderland01/Valheim/896660/valheim_server.x86_64 -port 2456 -name vh.dustbin.su -world Wonderland -password Welcome -public 1 -savedir Saves

Aug 13 12:31:00 ubuntu-s-4vcpu-8gb-ams3-01 ampinstmgr[712]: Can't find custom attr constructor image: /opt/cubecoders/amp/plugins/ADSModule.dll mtoken: 0x0a00001e due to: Could not load file or assembly 'SQLite-net, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
Aug 13 12:31:00 ubuntu-s-4vcpu-8gb-ams3-01 ampinstmgr[712]: [Info] Waiting for AMP instance to start...
Aug 13 12:31:01 ubuntu-s-4vcpu-8gb-ams3-01 ampinstmgr[712]: [Notice] AMP instance ADS01 is now running.
Aug 13 12:31:01 ubuntu-s-4vcpu-8gb-ams3-01 systemd[1]: Finished AMP Instance Manager.
Aug 13 12:31:03 ubuntu-s-4vcpu-8gb-ams3-01 sudo[857]: pam_unix(sudo:auth): conversation failed
Aug 13 12:31:03 ubuntu-s-4vcpu-8gb-ams3-01 sudo[857]: pam_unix(sudo:auth): auth could not identify password for [amp]
Aug 13 12:33:03 ubuntu-s-4vcpu-8gb-ams3-01 sudo[1077]: pam_unix(sudo:auth): conversation failed
Aug 13 12:33:03 ubuntu-s-4vcpu-8gb-ams3-01 sudo[1077]: pam_unix(sudo:auth): auth could not identify password for [amp]
Aug 13 12:33:21 ubuntu-s-4vcpu-8gb-ams3-01 sudo[1130]: pam_unix(sudo:auth): conversation failed
Aug 13 12:33:21 ubuntu-s-4vcpu-8gb-ams3-01 sudo[1130]: pam_unix(sudo:auth): auth could not identify password for [amp]
~
~
~
~

and

 ξ‚° CubeCoders AMP ξ‚° πŸ’»amp@ubuntu-s-4vcpu-8gb-ams3-01 ξ‚° πŸ“~ ξ‚° ampinstmgr info ADS
[Info] AMP Instance Manager v2.4.6 built 02/08/2023 19:48
[Info] Stream: Mainline / Release - built by CUBECODERS/buildbot on CCL-DEV
Instance ID        β”‚ 9bec44d4-2d91-4764-9ddd-df5072bad7bf
Module             β”‚ ADS
Instance Name      β”‚ ADS01
Friendly Name      β”‚ ADS
URL                β”‚ http://127.0.0.1:8080/
Running            β”‚ Yes
Runs in Container  β”‚ No
Runs as Shared     β”‚ No
Start on Boot      β”‚ Yes
AMP Version        β”‚ 2.4.6.0
Release Stream     β”‚ Mainline
Data Path          β”‚ /home/amp/.ampdata/instances/ADS01

Unlikely the solution, unless you are running AMP behind a reverse proxy on the same host.

That info command also gives incorrect binding info. Check ampinstmgr status for actual binding

But I do run AMP behind a reverse-proxy on the same host because I installed it with HTTPS support.
Actual binding is -

 ξ‚° CubeCoders AMP ξ‚° πŸ’»amp@ubuntu-s-4vcpu-8gb-ams3-01 ξ‚° πŸ“~ ξ‚° ampinstmgr status
[Info] AMP Instance Manager v2.4.6 built 02/08/2023 19:48
[Info] Stream: Mainline / Release - built by CUBECODERS/buildbot on CCL-DEV
Instance Name      β”‚ Friendly Name    β”‚ Module     β”‚ IP              β”‚ Port  β”‚ Up
───────────────────┼──────────────────┼────────────┼─────────────────┼───────┼───
ADS01              β”‚ ADS              β”‚ ADS        β”‚ 0.0.0.0         β”‚ 8080  β”‚ βœ“
MojsejovSvet01     β”‚ MojsejovSvet     β”‚ Generic    β”‚ 127.0.0.1       β”‚ 8082  β”‚ βœ“
Wonderland01       β”‚ Wonderland       β”‚ Generic    β”‚ 127.0.0.1       β”‚ 8081  β”‚ βœ“

 ξ‚° CubeCoders AMP ξ‚° πŸ’»amp@ubuntu-s-4vcpu-8gb-ams3-01 ξ‚° πŸ“~ ξ‚°

Sounds like your RP configuration is wrong then, check the configuration and see if you can connect to AMP directly. If you can connect directly (wget -qO- http://localhost:8080) then it’s a bad nginx config, not AMP.

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