Installation Problem

I got this error at the end of a new install on a freshly configured Rocky Linux 8 server.

  1. CLI\parse()[/usr/local/apnscp/bin/scripts/yum-post.php:5]
    ERROR: fatal(): `common_load_preferences’: crash or other nasty error detected

Final summary
2024-10-03 11:24:03,072 p=65463 u=root n=ansible | localhost : ok=1645 changed=613 unreachable=0 failed=1 skipped=498 rescued=1 ignored=16

Where do I look to see what happened and how to fix it?

This failed early. Installation inspects ~2.6k endpoints, so you were about 66% of the way through.

I’d need to see more context from the failure log. For the last 50 lines, this can be done with:

grep -m1 failed=1 -B50 /root/apnscp-bootstrapper.log

Here you go.

cmd:

  • /usr/local/apnscp/bin/php-bins/php
  • /usr/local/apnscp/bin/scripts/yum-post.php
  • install
  • –force
  • spamassassin
  • siteinfo
    delta: ‘0:00:00.365455’
    end: ‘2024-10-03 11:24:03.031457’
    failed_when_result: true
    msg: non-zero return code
    rc: 255
    start: ‘2024-10-03 11:24:02.666002’
    stderr: |-
    FATAL : fatal(): common_load_preferences': crash or other nasty error detected 0. Error_Reporter::trigger_fatal("common_load_preferences’: crash or other nasty error detected", [“common_load_preferences”])
    [/usr/local/apnscp/lib/log_wrapper.php:50]
    1. fatal("%s': crash or other nasty error detected", "common_load_preferences") [/usr/local/apnscp/lib/datastream.php:426] 2. DataStream->pipeline(<binary>) [/usr/local/apnscp/lib/datastream.php:394] 3. DataStream->query("common_load_preferences") [/usr/local/apnscp/lib/Module/Skeleton/Standard.php:200] 4. Module\Skeleton\Standard->query("common_load_preferences") [/usr/local/apnscp/lib/modules/common.php:868] 5. Common_Module->load_preferences() [/usr/local/apnscp/lib/Module/Skeleton/Standard.php:145] 6. Module\Skeleton\Standard->_invoke("load_preferences", ) [/usr/local/apnscp/lib/apnscpfunction.php:983] 7. apnscpFunctionInterceptor->call("common_load_preferences", ) [/usr/local/apnscp/lib/apnscpfunction.php:923] 8. apnscpFunctionInterceptor->__call("common_load_preferences", ) [/usr/local/apnscp/lib/apnscpfunction.php:118] 9. apnscpFunctionInterceptor::factory(Auth_Info_User) [/usr/local/apnscp/lib/Auth/CLI.php:238] 10. Auth_CLI->getInvoker() [/usr/local/apnscp/lib/CLI/cmd.php:648] 11. CLI\cmd("admin", false, "") [/usr/local/apnscp/lib/CLI/cmd.php:466] 12. CLI\parse() [/usr/local/apnscp/bin/scripts/yum-post.php:5] ERROR: fatal(): common_load_preferences’: crash or other nasty error detected
    stderr_lines:
    stdout: ‘’
    stdout_lines:
    2024-10-03 11:24:03,065 p=65463 u=root n=ansible | RUNNING HANDLER [common : Reload filesystem template] ******************************************************************************************************************
    2024-10-03 11:24:03,066 p=65463 u=root n=ansible | RUNNING HANDLER [common : Restart apnscp] ******************************************************************************************************************************
    2024-10-03 11:24:03,066 p=65463 u=root n=ansible | RUNNING HANDLER [common : Restart authlib] *****************************************************************************************************************************
    2024-10-03 11:24:03,067 p=65463 u=root n=ansible | RUNNING HANDLER [common : Restart postfix] *****************************************************************************************************************************
    2024-10-03 11:24:03,072 p=65463 u=root n=ansible | PLAY RECAP *************************************************************************************************************************************************************
    2024-10-03 11:24:03,072 p=65463 u=root n=ansible | localhost : ok=1645 changed=613 unreachable=0 failed=1 skipped=498 rescued=1 ignored=16

I’m not able to reproduce this with a fresh build.

grep -B15 -A15 load_preferences /usr/local/apnscp/storage/logs/start.log may yield additional information. Alternatively, you can mail me the log (matt@apisnetworks.com) or PM me with temporary credentials to inspect the machine, if it hasn’t been reset, so I can get a better understanding of what’s going on with it.

From the installation log,

2024-10-03 10:49:09,264 p=63211 u=root n=ansible | Pausing for 10 seconds
2024-10-03 10:49:09,264 p=63211 u=root n=ansible | (ctrl+C then 'C' = continue early, ctrl+C then 'A' = abort)^M
2024-10-03 10:49:19,054 p=61426 u=root n=ansible |  [ERROR]: User interrupted execution

An automated reboot is necessary to disarm SELinux and enable cgroupv2 controllers. This was interrupted during installation thus preventing a reboot. Once rebooted, the install is able to complete with the new features.

As I am creating a new server I will need dns settings to point the existing domains I have. Is the hostname and dns set up as part of the standard install or do I have to do that manually? I tried importing a couple of domains from a tar.gz backup but they seem to need a dns setup by my registrar. I can reset it but no idea what order the process is.

Do I:

  1. Set up the name server on my new server.
  2. Point the domains to that DNS at the registrar.
  3. Import the domains using ImportDomain?

You may manually change the DNS through your current DNS provider to the new server or one of the supported DNS providers to integrate DNS management directly into the panel. Both Cloudflare and Hetzner provide free DNS hosting.

You may import the domain immediately and change the DNS provider at a later date. If DNS is managed by an integrated provider, like Cloudflare, then DNS entries may be updated within the panel directly under DNS > DNS Manager.

If DNS is not managed through the panel directly, then you lose the ability to request wildcard SSL certificates as that requires a DNS challenge to satisfy. It’s possible to stage DNS for wildcard SSL but quite cumbersome.

I’m a bit lost here Matt. My domain registrar is TPP Wholesale here in Australia. They allow me to delegate domain names to a DNS of my choice. Currently it is Contabo which I have just left. So is my current DNS provider TPP or Contabo? As I understand it Apiscp sets up a DNS server as part of the installation. Ideally I would like that to be the DNS that I delegate to from TPP. However I have no idea whether I use the Dashboard or Nexus to do this. And if so where the interface is to do it. I’m happy to use the server IP for all the sites and yes it would be good if I can setup wildcard SSL.

Both Cloudflare and Hetzner are natively supported by ApisCP. Contabo is not directly supported.

Incorrect. Per RFC 2182, at least 2 nameservers are required for a domain. Should you elect to self-host DNS, then a second server is mandatory. If were to go this route, then PowerDNS is the self-hosted option natively supported by ApisCP.

These are different apps. Nexus allows you to manage sites. Dashboard is for server/account overview.

Covered in the docs linked above.

You’re forced to use Cloudflare or Hetzner instead of Contabo in this case.

Matt I discovered that my domain provider has a free DNS hosting server which had somehow been disabled on my account with them so I lost track of the fact I could use it. I’ve now enabled it and set up all the records to point to my new server. Still waiting for propagation for the main one cyberhorse.com.au but its SOA diggable at ns1.partnerconsole.net.

What do I do at the server end? I see reference to config.ini but not sure how I maintain that on my server. I can edit the custom file but there is no mention of master nameserver. Obviously I’m using ns1.partnerconsole.net. as my DNS server.

I read in the help document about setting my domains delegation to NS1.APNSCP.COM & NS2.APNSCP.COM. I’ve done that a few hours ago but it will take some time to propagate. Is that the correct thing to do?

My DNS provider tells me “ns1.apnscp.com and ns2.apnscp.com is a subdomain and not created as a nameserver or glue record.”

So I don’t think following your help document is going to help me much. So what do I delegate my domains to?

If you’d like ApisCP to manage your DNS, then you must use Cloudflare or Hetzner as discussed previously. This is your best solution, specifically Cloudflare. Cloudflare provides you with their nameserver entries, then you make those changes through the place through which you annually remit your domain renewal charge, key-systems.net or one of its subsidiaries…

Nameservers are directories, and if a directory has no knowledge of your existence, then it won’t return an IP address for your hostname.

I’m trying not to incur and extra monthly costs for my server which I why I’m trying to get away from cpanel. Cloudfare just wants to charge me for 6 domains each month and I can’t afford it. I’ve updated the dns entries with my domain name provider and set ns1.cyberhorse.com.au and ns2.cyberhorse.com.au as the nameservers. Now all I have to do is set them up on the server but no idea where to do it.

Would I be right in thinking that if bootstrapper can find a DNS SOA when it installing it will generate nameserver entries while setting up the server? If so maybe I should just run it again?

Use their free tier, which includes DNS hosting. That’s all you need.

Hetzner DNS is also free to use. This is why I recommended both in lieu of say Route53, which is supported in ApisCP but carries a monthly fee per zone.

I’ve set up most of the domains on Cloudflare. Looks as if they’ve propagated OK but APISCP doesn’t recognise them even though I’ve set the DNS in config to Cloudflare. I read in the docs that Cloudfare is now the default DNS but it doesn’t seem to be working.

https://cyberhorse.com.au lgtm. For SSL to work, a SSL certificate must be setup for the account otherwise it falls through to the global server context.