Version 61.1 install errors

Having problems installing 61.1 on a “clean” install of Ubuntu 22.04. The following is the output. Why wont nsd start ? Can anyone help?

Primary Hostname: box.dax55.co.uk
Public IP Address: 167.86.66.132
Mail-in-a-Box Version: v61.1

Installing add-apt-repository…
Updating system packages…
Installing system packages…

Current default time zone: ‘Europe/London’
Local time is now: Fri Feb 24 16:13:31 GMT 2023.
Universal Time is now: Fri Feb 24 16:13:31 UTC 2023.

Initializing system random number generator…
Creating SSH key for backup…
Firewall is active and enabled on system startup
Synchronizing state of fail2ban.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable fail2ban
Created symlink /etc/systemd/system/multi-user.target.wants/fail2ban.service → /lib/systemd/system/fail2ban.service.
Creating initial SSL certificate and perfect forward secrecy Diffie-Hellman parameters…
Generating DH parameters, 2048 bit long safe prime
…+…+…+…+…+…+…+…+…+…+…+…+…+…+…+…+…+…+…+…+…+…+…+…+…+…+…+…+…+…+…+…+…+…+…+…+…+…+…+…+…+…+…+…+…+…+…+…+…+…+…+…+…+…+…+…+…+…+…++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Installing nsd (DNS server)…
Generating DNSSEC signing keys…
Installing Postfix (SMTP server)…
mv: cannot stat ‘/var/lib/postgrey/*’: No such file or directory
Installing Dovecot (IMAP server)…
Creating new user database: /home/user-data/mail/users.sqlite
Installing OpenDKIM/OpenDMARC…
Installing SpamAssassin…
Installing Nginx (web server)…
Installing Roundcube (webmail)…
Installing Nextcloud (contacts/calendar)…

Upgrading to Nextcloud version 23.0.10

Nextcloud is already latest version
photos 1.5.0 disabled
dashboard 7.3.0 disabled
activity 2.15.0 disabled
Installing Z-Push (Exchange/ActiveSync server)…
Installing Mail-in-a-Box system management daemon…
Installing Munin (system monitoring)…
Command ‘[’/usr/sbin/service’, ‘nsd’, ‘restart’]’ returned non-zero exit status 1.web updated

Okay. I’m about to set up nick@dax55.co.uk for you. This account will also
have access to the box’s control panel.
password:
(again):
<!doctype html>

500 Internal Server Error

Internal Server Error

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

root@box:~#
ervice nsd restart
Job for nsd.service failed because the control process exited with error code.
See “systemctl status nsd.service” and “journalctl -xeu nsd.service” for details.
root@box:~# ^C
root@box:~# systemctl status nsd.service
× nsd.service - Name Server Daemon
Loaded: loaded (/lib/systemd/system/nsd.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2023-02-24 16:23:43 GMT; 3min 10s ago
Docs: man:nsd(8)
Process: 33796 ExecStart=/usr/sbin/nsd -d -P (code=exited, status=1/FAILURE)
Main PID: 33796 (code=exited, status=1/FAILURE)
CPU: 64ms

Feb 24 16:23:43 box.dax55.co.uk systemd[1]: nsd.service: Scheduled restart job, restart counter is at 5.
Feb 24 16:23:43 box.dax55.co.uk systemd[1]: Stopped Name Server Daemon.
Feb 24 16:23:43 box.dax55.co.uk systemd[1]: nsd.service: Start request repeated too quickly.
Feb 24 16:23:43 box.dax55.co.uk systemd[1]: nsd.service: Failed with result ‘exit-code’.
Feb 24 16:23:43 box.dax55.co.uk systemd[1]: Failed to start Name Server Daemon.

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.2 LTS
Release: 22.04
Codename: jammy

you got that far?

I’m trying to install on a clean 22.04 today, but I used the minimal installation and the MiaB script fails on package installation right off the bat.

Guess I’ll start over and use the full install. Ugh.

let me know how it goes

In the past custom versions of Ubuntu from VPS providers have caused issues. Which VPS are you using?

contabo is my VPS provider, What i am trying to do is upgrade to my existing mailinabox installation which is on this VPS server. I took a snapshot then got a reinstall to 22.04, then did the standard setup of MAIB.

It looks like nsd does not start correctly for some reason. Let’s start with looking at that.
What is the output of sudo journalctl -u nsd?
Does the folder /etc/nsd/zones/ exist, and what files are in there?
What are the contents of /var/log/nsd.log, /etc/nsd/nsd.conf and /etc/nsd/nsd.conf.d/zones.conf?

journalctl -u nsd
Feb 25 14:55:31 box.dax55.co.uk systemd[1]: Starting Name Server Daemon…
Feb 25 14:55:32 box.dax55.co.uk nsd[7428]: [2023-02-25 14:55:32.057] nsd[7428]: error: Cannot open /var/log/nsd.log for appending (Read-only file system), logging to stderr
Feb 25 14:55:32 box.dax55.co.uk nsd[7428]: [2023-02-25 14:55:32.057] nsd[7428]: notice: nsd starting (NSD 4.3.9)
Feb 25 14:55:32 box.dax55.co.uk nsd[7428]: [2023-02-25 14:55:32.062] nsd[7428]: error: can’t bind tcp socket: Cannot assign requested address
Feb 25 14:55:32 box.dax55.co.uk nsd[7428]: [2023-02-25 14:55:32.062] nsd[7428]: error: cannot open control interface ::1 8952
Feb 25 14:55:32 box.dax55.co.uk nsd[7428]: [2023-02-25 14:55:32.062] nsd[7428]: error: could not open remote control port
Feb 25 14:55:32 box.dax55.co.uk nsd[7428]: [2023-02-25 14:55:32.062] nsd[7428]: error: could not perform remote control setup
Feb 25 14:55:32 box.dax55.co.uk systemd[1]: nsd.service: Main process exited, code=exited, status=1/FAILURE
Feb 25 14:55:32 box.dax55.co.uk systemd[1]: nsd.service: Failed with result ‘exit-code’.
Feb 25 14:55:32 box.dax55.co.uk systemd[1]: Failed to start Name Server Daemon.
Feb 25 14:55:32 box.dax55.co.uk systemd[1]: nsd.service: Scheduled restart job, restart counter is at 1.
Feb 25 14:55:32 box.dax55.co.uk systemd[1]: Stopped Name Server Daemon.
Feb 25 14:55:32 box.dax55.co.uk systemd[1]: Starting Name Server Daemon…
Feb 25 14:55:32 box.dax55.co.uk nsd[7436]: [2023-02-25 14:55:32.379] nsd[7436]: error: Cannot open /var/log/nsd.log for appending (Read-only file system), logging to stderr
Feb 25 14:55:32 box.dax55.co.uk nsd[7436]: [2023-02-25 14:55:32.379] nsd[7436]: notice: nsd starting (NSD 4.3.9)
Feb 25 14:55:32 box.dax55.co.uk nsd[7436]: [2023-02-25 14:55:32.386] nsd[7436]: error: can’t bind tcp socket: Cannot assign requested address
Feb 25 14:55:32 box.dax55.co.uk nsd[7436]: [2023-02-25 14:55:32.386] nsd[7436]: error: cannot open control interface ::1 8952
Feb 25 14:55:32 box.dax55.co.uk nsd[7436]: [2023-02-25 14:55:32.386] nsd[7436]: error: could not open remote control port
Feb 25 14:55:32 box.dax55.co.uk nsd[7436]: [2023-02-25 14:55:32.386] nsd[7436]: error: could not perform remote control setup
Feb 25 14:55:32 box.dax55.co.uk systemd[1]: nsd.service: Main process exited, code=exited, status=1/FAILURE
Feb 25 14:55:32 box.dax55.co.uk systemd[1]: nsd.service: Failed with result ‘exit-code’.
Feb 25 14:55:32 box.dax55.co.uk systemd[1]: Failed to start Name Server Daemon.
Feb 25 14:55:32 box.dax55.co.uk systemd[1]: nsd.service: Scheduled restart job, restart counter is at 2.
Feb 25 14:55:32 box.dax55.co.uk systemd[1]: Stopped Name Server Daemon.
Feb 25 14:55:32 box.dax55.co.uk systemd[1]: Starting Name Server Daemon…
Feb 25 14:55:32 box.dax55.co.uk nsd[7447]: [2023-02-25 14:55:32.637] nsd[7447]: error: Cannot open /var/log/nsd.log for appending (Read-only file system), logging to stderr
Feb 25 14:55:32 box.dax55.co.uk nsd[7447]: [2023-02-25 14:55:32.637] nsd[7447]: notice: nsd starting (NSD 4.3.9)
Feb 25 14:55:32 box.dax55.co.uk nsd[7447]: [2023-02-25 14:55:32.643] nsd[7447]: error: can’t bind tcp socket: Cannot assign requested address
Feb 25 14:55:32 box.dax55.co.uk nsd[7447]: [2023-02-25 14:55:32.643] nsd[7447]: error: cannot open control interface ::1 8952
Feb 25 14:55:32 box.dax55.co.uk nsd[7447]: [2023-02-25 14:55:32.643] nsd[7447]: error: could not open remote control port
Feb 25 14:55:32 box.dax55.co.uk nsd[7447]: [2023-02-25 14:55:32.643] nsd[7447]: error: could not perform remote control setup
Feb 25 14:55:32 box.dax55.co.uk systemd[1]: nsd.service: Main process exited, code=exited, status=1/FAILURE
Feb 25 14:55:32 box.dax55.co.uk systemd[1]: nsd.service: Failed with result ‘exit-code’.
Feb 25 14:55:32 box.dax55.co.uk systemd[1]: Failed to start Name Server Daemon.
Feb 25 14:55:32 box.dax55.co.uk systemd[1]: nsd.service: Scheduled restart job, restart counter is at 3.
Feb 25 14:55:32 box.dax55.co.uk systemd[1]: Stopped Name Server Daemon.
Feb 25 14:55:32 box.dax55.co.uk systemd[1]: Starting Name Server Daemon…
Feb 25 14:55:32 box.dax55.co.uk nsd[7475]: [2023-02-25 14:55:32.872] nsd[7475]: error: Cannot open /var/log/nsd.log for appending (Read-only file system), logging to stderr
Feb 25 14:55:32 box.dax55.co.uk nsd[7475]: [2023-02-25 14:55:32.872] nsd[7475]: notice: nsd starting (NSD 4.3.9)
Feb 25 14:55:32 box.dax55.co.uk nsd[7475]: [2023-02-25 14:55:32.876] nsd[7475]: error: can’t bind tcp socket: Cannot assign requested address
Feb 25 14:55:32 box.dax55.co.uk nsd[7475]: [2023-02-25 14:55:32.876] nsd[7475]: error: cannot open control interface ::1 8952
Feb 25 14:55:32 box.dax55.co.uk nsd[7475]: [2023-02-25 14:55:32.876] nsd[7475]: error: could not open remote control port
Feb 25 14:55:32 box.dax55.co.uk nsd[7475]: [2023-02-25 14:55:32.876] nsd[7475]: error: could not perform remote control setup
lines 1-43

cd zones
root@box:/etc/nsd/zones# ls -al
total 84
drwxr-xr-x 2 root root 4096 Feb 25 15:03 .
drwxr-xr-x 4 root root 4096 Feb 25 14:55 …
-rw-r–r-- 1 root root 1505 Feb 25 15:03 box.dax55.co.uk.txt
-rw-r–r-- 1 root root 634 Feb 25 15:03 box.dax55.co.uk.txt.ds
-rw-r–r-- 1 root root 20347 Feb 25 15:03 box.dax55.co.uk.txt.signed
-rw-r–r-- 1 root root 2621 Feb 25 15:03 dax55.co.uk.txt
-rw-r–r-- 1 root root 610 Feb 25 15:03 dax55.co.uk.txt.ds
-rw-r–r-- 1 root root 38246 Feb 25 15:03 dax55.co.uk.txt.signed

there is no /var/log/nsd.log file present

cat nsd.conf

Do not edit. Overwritten by Mail-in-a-Box setup.

server:
hide-version: yes
logfile: “/var/log/nsd.log”

identify the server (CH TXT ID.SERVER entry).

identity: “”

The directory for zonefile: files.

zonesdir: “/etc/nsd/zones”

Allows NSD to bind to IP addresses that are not (yet) added to the

network interface. This allows nsd to start even if the network stack

isn’t fully ready, which apparently happens in some cases.

See https://www.nlnetlabs.nl/projects/nsd/nsd.conf.5.html.

ip-transparent: yes

ip-address: 167.86.66.132
include: /etc/nsd/nsd.conf.d/*.conf
root@box:/etc/nsd#

cd nsd.conf.d
root@box:/etc/nsd/nsd.conf.d# ls -al
total 12
drwxr-xr-x 2 root root 4096 Feb 25 15:03 .
drwxr-xr-x 4 root root 4096 Feb 25 14:55 …
-rw-r–r-- 1 root root 60 Feb 25 15:03 zones.conf
root@box:/etc/nsd/nsd.conf.d# cat zones.conf

zone:
name: dax55.co.uk
zonefile: dax55.co.uk.txt.signed
root@box:/etc/nsd/nsd.conf.d#

OK, i think i have it. ipv6 is not enabled and this seems to be the issue.

2 Likes

Self hosted on business class fiber connection in my office. Downloaded Ubuntu minimal iso directly from ubuntu.com.

There’s a dpkg command it told me to run, and after that things went smoothly. Sorry. Just gotta transfer everything over to the new box now.

That was my problem and enabled ipv6 everything came to life.

Nice one ;O)

I have a lot of vps with contabo, with each installation there were such problems, I immediately turn on ipv6 and the problem disappears, I also recommend writing it in /etc/sysctl.conf so that when the server restarts nds would work normally;)

It’s shocking the number of providers to rollout their own special Linux image and call it “Ubuntu 22.04” :sleepy: :face_with_thermometer: :face_with_symbols_over_mouth: :yawning_face: