DirectAdmin v1.63.9 has been released

fln

Administrator
Staff member
Joined
Aug 30, 2021
Messages
930
Hi everyone!

We are really happy to announce that we have released DirectAdmin 1.63.9.

This is again a big release for us 🎉🕺. This release adds support for imapsync tool (PRO PACK), which allows to easily import or export email from 3rd party providers. Under the hood we have a lot of changes in Evolution skin, we are now gradually switching to a new DirectAdmin REST API. Evolution now loads faster because it gets a more fine grained access to the data and retrieves required data concurrently. New API will make integration with DA much easier as we are providing industry standard API specification in Swagger format. Please note that new API is not yet stable meaning it can change in the next releases, but it will be marked as stable once it covers more of the core DA functions. This release also includes fixes for a handful of nasty bugs and general quality of life improvements like da alias for DirectAdmin CLI calls 🚀.

Release Change log can can be found here:

DirectAdmin 1.63.9

The update should be automatically available for all installations subscribed to the current release channel.

We appreciate all the feedback on forums and issues reported in the ticketing system.

Thanks!
fln
 
Sorry to reply here, I don't have access to the ticketing system.

After the update, DA does not start. At least for Debian 10 there is an issue with the /etc/init.d/directadmin script as `/etc/rc.d/init.d/functions` can't be found (is not available). Thats line 24 in the script.
 
Hi @dkzr, thanks for report. Debian 10 systems are using systemd for service management. Maybe you have a system that was upgraded from older Debian versions (pre systemd) up to Debian 10.

You can easily fix your system by replacing old init.d shell script with a systemd service file using the following commands:

Code:
/etc/init.d/directadmin stop
update-rc.d directadmin remove
rm /etc/init.d/directadmin

cp -f /usr/local/directadmin/scripts/directadmin.service /etc/systemd/system/directadmin.service
systemctl daemon-reload
systemctl enable directadmin.service
systemctl start directadmin.service
 
Hi @fln,

Thanks for your quick reply. My system was indeed updated (many times :)) from older Debian.
I restored my old init.d script first, but now I followed your instructions and have a working setup again.

Joost
 
We expected only CentOS 6 systems to be still using init.d scripts and this release included an updated script that works only on RHEL based distros.

To prevent other Debian users from bumping into this issue we have released a hot-fix that avoids updating init.d script with this release. This will give us time to provide an automated migration from init.d script to systemd service in future releases. Thanks @dkzr for quick feedback.
 
Problem on a Centos 7.9 server:

If i login as admin (before update working fine):

OOPS!
Privileges needed to load the skin have not been granted for this account or unexpected issue has happened. Please contact your administrator.

Ticket.msg file:
This is an automated message notifying you that an error has occurred while trying to update the software.
v1.63.9 (c097bcf) to v1.63.9 (3ed9f35)

The generated error message is as follows:

exit status 127

Please contact JBMC-Software, including the error message. Failure to do so could result in an inactive control panel.


- edit-

Strange, After running:

/usr/local/directadmin/scripts/getDA.sh current

DirectAdmin is working again.
 
hi @xar123, thanks for report. Starting this release we have enabled strict error reporting in the update.sh shell script (it gets executed after DA upgrade). Any error there will be treated as a failed upgrade. This might reveal some new issues on the systems that were silently ignored before.

If update have failed due to errors reported from update.sh a quick way to check for errors is to execute this script manually and see if it fails:

Code:
bash -x /usr/local/directadmin/scripts/update.sh

It is safe to execute this script multiple times.
 
Hi @fln dit the update to 1.63.9 but in the e-mail manager imapsync is not showing up. I have paid ProPack license

Schermafbeelding 2022-04-20 om 08.26.46.png
 
I found a bug:
the FTP username input box shows undifined instead of @ (or whatever the separator is set to). It's only a cosmetic bug though.
 

Attachments

  • bug.png
    bug.png
    2.7 KB · Views: 8
I've encountered the same (or at least similar) problem as reported by @xar123 above. Several of my servers failed the update:

Code:
*** An error has occurred while trying to update the software ***

This is an automated message notifying you that an error has occurred while trying to update the software.
v1.63.8 (1487dff) to v1.63.9 (3ed9f35)

The generated error message is as follows:

exit status 127

Please contact JBMC-Software, including the error message. Failure to do so could result in an inactive control panel.

When logging into DA as admin, using the Evolution skin, I get this message:

Code:
OOPS!
Privileges needed to load the skin have not been granted for this account or unexpected issue has happened. Please contact your administrator.

If admin is using the enhanced skin, it works fine.

Running the update.sh script as suggsted by @fln doesn't reveal anything suspect, and exits cleanly (exit code 0):

Code:
# bash -x /usr/local/directadmin/scripts/update.sh
+ set -e
+ DA_PATH=/usr/local/directadmin
+ DA_SCRIPTS=/usr/local/directadmin/scripts
+ DA_TQ=/usr/local/directadmin/data/task.queue
+ DA_SYSTEMD_SERVICE=/etc/systemd/system/directadmin.service
+ '[' -s /etc/systemd/system/directadmin.service ']'
+ diff --brief /usr/local/directadmin/scripts/directadmin.service /etc/systemd/system/directadmin.service
+ diff --brief /usr/local/directadmin/scripts/directadmin_cron /etc/cron.d/directadmin_cron
+ '[' -e /etc/logrotate.d ']'
+ diff --brief /usr/local/directadmin/scripts/directadmin.rotate /etc/logrotate.d/directadmin
+ /usr/local/directadmin/directadmin p
+ echo 'action=cache&value=showallusers'
+ echo 'action=cache&value=safemode'
+ echo 'action=convert&value=cronbackups'
+ echo 'action=convert&value=suspendedmysql'
+ echo action=syscheck
+ echo 'action=da-popb4smtp&value=restart'
+ echo 'action=rewrite&value=cron_path'
+ '[' -e /etc/csf/csf.allow ']'
+ '[' -x /usr/sbin/csf ']'
+ grep -q 'out|u=0' /etc/csf/csf.allow
+ csf -a 'tcp|out|u=0' 'Added by DirectAdmin'
Adding tcp|out|u=0 to csf.allow and iptables ACCEPT...
ACCEPT  tcp opt -- in * out !lo  0.0.0.0/0  -> 0.0.0.0/0   owner UID match 0
+ csf -a 'udp|out|u=0' 'Added by DirectAdmin'
Adding udp|out|u=0 to csf.allow and iptables ACCEPT...
ACCEPT  udp opt -- in * out !lo  0.0.0.0/0  -> 0.0.0.0/0   owner UID match 0
+ sed -i '/^directadmin=/d' /usr/local/directadmin/data/admin/services.status

After running this, Evolution still does not work.

I tried a simple service directadmin restart, and Evolution now loads as expected. Which I must admit was a little.. unexpected. :)

The only relevant log lines I found are the following lines in errortaskq.log around the same time I got the email/message about the failed upgrade:

Code:
2022:04:20-07:30:09: [error] unable to update directadmin action=map[action:[update] value:[program]] error=exit status 127
2022:04:20-07:31:01: Error getting user 'admin' domain config file for domain (null)

I also tried to restart directadmin (without running the update.sh script first) on another server with the same problem, and Evolution now works there as well. (Edit: Before the restart, on a third server, I noticed that the currently running version was the old one, so the restart is what caused the new version to become active. I guess this means either the restart itself failed, or something prior to the restart failed, causing the update procedure to stop?)

Also worth noting that both these servers were in fact upgraded to 1.63.9 (build 3ed9f3550d66d4892344764e6523fc474ac78fa8). One is Debian 9, the other is Debian 10.

Is there any way I can find out what caused the exit 127, and fix it for next time, and/or re-run that operation now?
 
Last edited:
@kristian is there any change you have /usr/local/directadmin/scripts/custom/update_post.sh script on your servers? DA Upgrade procedure executes /usr/local/directadmin/scripts/update.sh and /usr/local/directadmin/scripts/custom/update_post.sh after new DA package is extracted.

Shell scripts might return code 127 when it tries executing command that is not available on the system. Considering you can execute update.sh successfully might mean that DA was executing same script in a different environment. Maybe PATH environment variable in the DirectAdmin process is not the same as on your normal shell. This would explain why same script might not find some commands while running same script from normal shell works without errors.

This hypothesis could be checked with:

Code:
root@server:~# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

root@server:~# for i in `pidof directadmin`; do grep -z 'PATH' /proc/$i/environ; echo; done;
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

If DA update was triggered by dataskq cron job we might need to check environment of the cron jobs.

P.S.

Looking at the bash -x /usr/local/directadmin/scripts/update.sh it is the first time it was properly executed. This is hinted by the csf -a 'tcp|out|u=0' 'Added by DirectAdmin' line. Repeated execution will not include this line because grep -q 'out|u=0' /etc/csf/csf.allow check detects that is already done.
 
@kristian is there any chance you have /usr/local/directadmin/scripts/custom/update_post.sh script on your servers?
I do not:

Code:
# ls -l /usr/local/directadmin/scripts/custom/update_post.sh
ls: cannot access '/usr/local/directadmin/scripts/custom/update_post.sh': No such file or directory

Maybe PATH environment variable in the DirectAdmin process is not the same as on your normal shell.
In the shell and currently running directadmin, they are the same:

Code:
# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

# for i in `pidof directadmin`; do grep -z 'PATH' /proc/$i/environ; echo; done | uniq
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

If DA update was triggered by dataskq cron job we might need to check environment of the cron jobs.
I have a cronjob defined in /etc/cron.d/directadmin-update that contains this:

Code:
MAILTO="<redacted>"
#Ansible: Update DirectAdmin
30 7 * * * root echo "action=update&value=program" >> /usr/local/directadmin/data/task.queue

There's no PATH here, so I believe it's inherited from /etc/crontab?

Code:
# grep ^PATH /etc/crontab
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

Looking at the bash -x /usr/local/directadmin/scripts/update.sh it is the first time it was properly executed.
This seems strange as well, as DirectAdmin has been updated several times before. Is it possible the execution of this script has always failed?
 
In all the older versions update.sh would ignore if some of the commands would fail and would continue executing following commands. With this release shell script enables -e mode with set -e as a first script line. In this mode script will terminate and exit with non zero status code on first failed command (commands are allowed to fail when used as condition check). We turned it on to actually catch or at least be aware of such issues as you have reported.

One more difference I could see is that update.sh is executed by /bin/sh (which can be dash or bash) while the manual execution command used bash. But this is a long shot.

Current update.sh version expects diff cp systemctl (not always) chmod chown grep csf (not always) and sed to be available in PATH. None of them seems to be exotic enough to be missing on normal DA install.

To avoi

@kristian could you please open a ticket in the ticketing system so we could request access to one of the servers and investigate this issue further?
 
We had the same issue on a few servers running CentOS 7.9 last night. Exit code 127 when trying to update and an ooops error when loading Evolution. In addition the GUI for none of the Configserver plugins were working. Enhanced theme was working fine.

Restarting DA did not work. However, "./build all d" solved it for us.
 
We have tracked down the issue to csf calls in update.sh, pushed a hot-fix to the 1.63.9 release to avoid causing same issue other systems. This hot-fix also includes an update to the UI issue mentioned by @k1l0b1t.
 
Just installed the hotfix, if layout is set to "icons grid" this update removes the theme setting.

How to hide the API doku link for end-users?
 
Back
Top