Fresh installation keeps failing

Hello there,

hope you started the new year well.

I’m trying to install a new instance but it keeps failing with
“Unable to start service apnscp: Job for apnscp.service failed because the control process exited with error code.\nSee "systemctl status apnscp.service" and "journalctl -xe" for details.”

Tryed Alma and Rocky 8.

First error sth about user@989.service

-- The start-up result is done.
Jan 11 23:06:45 cp systemd[1]: Starting User Manager for UID 989...
-- Subject: Unit user@989.service has begun start-up
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit user@989.service has begun starting up.
Jan 11 23:06:45 cp systemd[458480]: pam_unix(systemd-user:session): session opened for user apnscp by (uid=0)
Jan 11 23:06:45 cp systemd[458480]: Failed to determine supported controllers: No such process
Jan 11 23:06:45 cp systemd[458480]: Failed to allocate manager object: No such process
Jan 11 23:06:45 cp systemd[1]: user@989.service: Failed with result 'protocol'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- The unit user@989.service has entered the 'failed' state with result 'protocol'.
Jan 11 23:06:45 cp systemd[1]: Failed to start User Manager for UID 989.
-- Subject: Unit user@989.service has failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit user@989.service has failed.
--
-- The result is failed.

But later bout reseller_sites - table?

-- Unit bootstrapper-resume.service has begun starting up.
Jan 11 23:16:41 cp sh[476975]: WARNING: file_get_contents(/etc/opcenter/webhost/passwd): Failed to open stream: No such file or directory
Jan 11 23:16:41 cp sh[476975]: [/usr/local/apnscp/lib/Auth.php:620]
Jan 11 23:16:41 cp sh[476975]:          0. file_get_contents("/etc/opcenter/webhost/passwd")
Jan 11 23:16:41 cp sh[476975]:             [/usr/local/apnscp/lib/Auth.php:620]
Jan 11 23:16:41 cp sh[476975]:          1. Auth::get_admin_login()
Jan 11 23:16:41 cp sh[476975]:             [/usr/local/apnscp/lib/Auth/CLI.php:74]
Jan 11 23:16:41 cp sh[476975]:          2. Auth_CLI::_get_login()
Jan 11 23:16:41 cp sh[476975]:             [/usr/local/apnscp/lib/Auth/CLI.php:251]
Jan 11 23:16:41 cp sh[476975]:          3. Auth_CLI->session_valid()
Jan 11 23:16:41 cp sh[476975]:             [/usr/local/apnscp/lib/Auth.php:61]
Jan 11 23:16:41 cp sh[476975]:          4. Auth::handle()
Jan 11 23:16:41 cp sh[476975]:             [/usr/local/apnscp/artisan:44]
Jan 11 23:16:41 cp sh[476975]: (PDOException) EXCEPTION: SQLSTATE[42P01]: Undefined table: 7 ERROR:  relation "reseller_sites" does not exist
Jan 11 23:16:41 cp sh[476975]: LINE 9:                 LEFT JOIN reseller_sites USING(site_id)
Jan 11 23:16:41 cp sh[476975]:                                   ^
Jan 11 23:16:41 cp sh[476975]: [/usr/local/apnscp/lib/Auth/Info/User.php:309]
Jan 11 23:16:41 cp sh[476975]:          0. PDO->query("SELECT username,                domain,                level,                user_id,                group_id,                reseller_id AS rgroup,                site_id AS site_id                 FROM sessions                 LEFT JOIN reseller_sites USING(site_id)                WHERE session_id = 'pGDjR6JgisJYzWkHnzYFQ1HTopJq2Dg8'")
Jan 11 23:16:41 cp sh[476975]:             [/usr/local/apnscp/lib/Auth/Info/User.php:309]
Jan 11 23:16:41 cp sh[476975]:          1. Auth_Info_User::factory("pGDjR6JgisJYzWkHnzYFQ1HTopJq2Dg8")
Jan 11 23:16:41 cp sh[476975]:             [/usr/local/apnscp/lib/Auth.php:476]
Jan 11 23:16:41 cp sh[476975]:          2. Auth->__importUser(false)
Jan 11 23:16:41 cp sh[476975]:             [/usr/local/apnscp/lib/Auth.php:450]
Jan 11 23:16:41 cp sh[476975]:          3. Auth->authInfo()
Jan 11 23:16:41 cp sh[476975]:             [/usr/local/apnscp/lib/Auth/CLI.php:320]
Jan 11 23:16:41 cp sh[476975]:          4. Auth_CLI->invalidate_session()
Jan 11 23:16:41 cp sh[476975]:             [/usr/local/apnscp/lib/Auth/CLI.php:262]
Jan 11 23:16:41 cp sh[476975]:          5. Auth_CLI->session_valid()
Jan 11 23:16:41 cp sh[476975]:             [/usr/local/apnscp/lib/Auth.php:61]
Jan 11 23:16:41 cp sh[476975]:          6. Auth::handle()
Jan 11 23:16:41 cp sh[476975]:             [/usr/local/apnscp/artisan:44]
Jan 11 23:16:41 cp sh[476975]: WARNING: file_get_contents(/etc/opcenter/webhost/passwd): Failed to open stream: No such file or directory
Jan 11 23:16:41 cp sh[476975]: [/usr/local/apnscp/lib/Auth.php:620]
Jan 11 23:16:41 cp sh[476975]:          0. file_get_contents("/etc/opcenter/webhost/passwd")
Jan 11 23:16:41 cp sh[476975]:             [/usr/local/apnscp/lib/Auth.php:620]
Jan 11 23:16:41 cp sh[476975]:          1. Auth::get_admin_login()
Jan 11 23:16:41 cp sh[476975]:             [/usr/local/apnscp/lib/Auth/CLI.php:74]
Jan 11 23:16:41 cp sh[476975]:          2. Auth_CLI::_get_login()
Jan 11 23:16:41 cp sh[476975]:             [/usr/local/apnscp/lib/Auth/CLI.php:251]
Jan 11 23:16:41 cp sh[476975]:          3. Auth_CLI->session_valid()
Jan 11 23:16:41 cp sh[476975]:             [/usr/local/apnscp/lib/Auth.php:61]
Jan 11 23:16:41 cp sh[476975]:          4. Auth::handle()
Jan 11 23:16:41 cp sh[476975]:             [/usr/local/apnscp/artisan:44]
Jan 11 23:16:41 cp sh[476975]: (PDOException) EXCEPTION: SQLSTATE[42P01]: Undefined table: 7 ERROR:  relation "reseller_sites" does not exist
Jan 11 23:16:41 cp sh[476975]: LINE 9:                 LEFT JOIN reseller_sites USING(site_id)
Jan 11 23:16:41 cp sh[476975]:                                   ^
Jan 11 23:16:41 cp sh[476975]: [/usr/local/apnscp/lib/Auth/Info/User.php:309]
Jan 11 23:16:41 cp sh[476975]:          0. PDO->query("SELECT username,                domain,                level,                user_id,                group_id,                reseller_id AS rgroup,                site_id AS site_id                 FROM sessions                 LEFT JOIN reseller_sites USING(site_id)                WHERE session_id = 'pGDjR6JgisJYzWkHnzYFQ1HTopJq2Dg8'")
Jan 11 23:16:41 cp sh[476975]:             [/usr/local/apnscp/lib/Auth/Info/User.php:309]
Jan 11 23:16:41 cp sh[476975]:          1. Auth_Info_User::factory("pGDjR6JgisJYzWkHnzYFQ1HTopJq2Dg8")
Jan 11 23:16:41 cp sh[476975]:             [/usr/local/apnscp/lib/Auth.php:476]
Jan 11 23:16:41 cp sh[476975]:          2. Auth->__importUser(false)
Jan 11 23:16:41 cp sh[476975]:             [/usr/local/apnscp/lib/Auth.php:450]
Jan 11 23:16:41 cp sh[476975]:          3. Auth->authInfo()
Jan 11 23:16:41 cp sh[476975]:             [/usr/local/apnscp/lib/Auth/CLI.php:320]
Jan 11 23:16:41 cp sh[476975]:          4. Auth_CLI->invalidate_session()
Jan 11 23:16:41 cp sh[476975]:             [/usr/local/apnscp/lib/Auth/CLI.php:262]
Jan 11 23:16:41 cp sh[476975]:          5. Auth_CLI->session_valid()
Jan 11 23:16:41 cp sh[476975]:             [/usr/local/apnscp/lib/Auth.php:61]
Jan 11 23:16:41 cp sh[476975]:          6. Auth::handle()
Jan 11 23:16:41 cp sh[476975]:             [/usr/local/apnscp/artisan:44]
Jan 11 23:16:41 cp systemd[1]: apnscp.service: Found left-over process 454514 (redis-server) in control group while starting unit. Ignoring.
Jan 11 23:16:41 cp systemd[1]: This usually indicates unclean termination of a previous run, or service implementation deficiencies.
Jan 11 23:16:41 cp systemd[1]: Starting ApisCP backend service...
-- Subject: Unit apnscp.service has begun start-up
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit apnscp.service has begun starting up.
Jan 11 23:16:41 cp systemd[1]: apnscp.service: Supervising process 476979 which is not our child. We'll most likely not notice when it exits.
Jan 11 23:16:42 cp systemd[1]: apnscp.service: Main process exited, code=exited, status=255/n/a
Jan 11 23:16:42 cp httpd[476988]: httpd (no pid file) not running
Jan 11 23:16:42 cp systemd[1]: apnscp.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- The unit apnscp.service has entered the 'failed' state with result 'exit-code'.
Jan 11 23:16:42 cp systemd[1]: Failed to start ApisCP backend service.

bootstrapper & journal-log attached.
apnscp-bootstrapper_alma-8.txt (6.6 MB)
apnscp-bootstrapper_rocky-8.txt (2.0 MB)
journalctl_xe.txt (160.1 KB)

curl https://raw.githubusercontent.com/apisnetworks/apiscp-bootstrapper/master/bootstrap.sh | bash -s - -s use_robust_dns='true' -s always_permit_panel_login='true' -s php_install_ioncube='true' -s dns_default_provider='null' -s apnscp_admin_user='myuser' -s mariadb_version='10.11' -s spamfilter='rspamd' -s system_hostname='my.tld.com' -s apnscp_admin_email='my@mail.com' 'licensekeyxxx'

Hope it helps - thank’s in advance!

Thanks for the bug report. Fixed upstream.

You may either reprovision from scratch after rm -rf /usr/local/apnscp or run systemctl restart bootstrapper-resume if the system is still reattempting install.

1 Like

Works like a charm again - thank you as always!
I rolled back to the previous installation so I started from scratch now.

I wonder if there is any method to choose a previous “stable” version while installing in cases like this?
I had the impression that I was pretty much unable to do anything by myself to evade this behavior…

Btw ‘upcp -sb’ at the new server results in:
TASK [software/nvm : Download nvm] ********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {“changed”: false, “cmd”: [“/bin/git”, “fetch”, “–tags”, “origin”], “msg”: “Failed to download remote objects and refs: fatal: unable to access ‘GitHub - apisnetworks/nvm: Node Version Manager - Simple bash script to manage multiple active node.js versions’: The requested URL returned error: 503\n”}

Pass RELEASE=TAG-NAME to the installer,

curl https://raw.githubusercontent.com/apisnetworks/apiscp-bootstrapper/master/bootstrap.sh | env RELEASE=v3.2.45.2 bash 

Once it’s installed, flip the update policy to major (or whichever) as it’ll place the panel on edge-major. That behavior will change in the next release if RELEASE=TAG-NAME is passed to the installer.

Github was down yesterday.