Migrating to new server keeps failing with error after error

sfxdana

Verified User
Joined
Feb 22, 2007
Messages
12
I am trying to migrate to a new server, I have done this many times before. But for some reason, now I keep hitting error after error.

Following:


When I get my backups in admin_backups, when I try to open the admint tools-> admin backups. I'm always greeted with this error:

"An error has occurred"
"You do not own any IPs"

And the admin backup page doesn't open. I would expect this to be always available, can't find anything in the logs, and nothing found on Google with a good explanation.

Found one forum post suggesting something to do with IP address. I have IP address in there but still doesn't work.

Then found a post somewhere that you might need to use "build rewriet_confs" so I'm trying that, but that fails as well.

I have configured an IPv4 and the first IPv6 as a server address, and want both active, but also adding IPv6 gives the following errors

root@da001:/usr/local/directadmin# da build rewrite_confs
2025/03/30 12:06:40 info executing task task=action=rewrite&value=ips
2025/03/30 12:07:33 info finished task duration=53.523323172s task=action=rewrite&value=ips
Using [xxxx:xxxx:xxxx:xxxx:0:0:0:1
xxx.xxx.xxx.206] for your server IP
/proc/self/fd/3: line 6915: [: /usr/local/directadmin/data/admin/ips/[xxxx:xxxx:xxxx:xxxx:0:0:0:1: binary operator expected
Installing OWASP Core Rule Set for ModSecurity...
download_cached: using cached '/usr/local/directadmin/custombuild/cache/owasp-modsecurity-crs-4.12.0.tar.gz' file
Installation of ModSecurity Rule Set has been finished.
2025/03/30 12:07:38 info executing task task=action=rewrite&value=httpd
2025/03/30 12:07:38 info finished task duration=86.375693ms task=action=rewrite&value=httpd
Restarting apache.
Job for httpd.service failed because the control process exited with error code.
See "systemctl status httpd.service" and "journalctl -xeu httpd.service" for details.
root@da001:/usr/local/directadmin/data/templates/custom# systemctl status httpd.service
× httpd.service - The Apache HTTP Server
Loaded: loaded (/etc/systemd/system/httpd.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Sun 2025-03-30 12:07:56 CEST; 5s ago
Duration: 18min 45.364s
Process: 26036 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 26036 (code=exited, status=1/FAILURE)
Status: "Reading configuration..."
CPU: 405ms

Mar 30 12:07:56 da001 systemd[1]: Starting httpd.service - The Apache HTTP Server...
Mar 30 12:07:56 da001 (httpd)[26036]: httpd.service: Referenced but unset environment variable evaluates to an empty string: OPTIONS
Mar 30 12:07:56 da001 httpd[26036]: AH00526: Syntax error on line 31 of /etc/httpd/conf/extra/httpd-vhosts.conf:
Mar 30 12:07:56 da001 httpd[26036]: <VirtualHost> directive missing closing '>'
Mar 30 12:07:56 da001 systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE
Mar 30 12:07:56 da001 systemd[1]: httpd.service: Failed with result 'exit-code'.
Mar 30 12:07:56 da001 systemd[1]: Failed to start httpd.service - The Apache HTTP Server.

Now Apache won't start.... as rewrite_confs fails because it's creating wrong configs.
<VirtualHost [xxxx:xxxx:xxxx:xxxx:0:0:0:1
xxx.xxx.xxx.206]:80>
--------
</VirtualHost>

<VirtualHost [xxxx:xxxx:xxxx:xxxx:0:0:0:1
xxx.xxx.xxx.206]:443>
--------
</VirtualHost>


If I change this config for both lines to:

<VirtualHost xxx.xxx.xxx.206:80 [xxxx:xxxx:xxxx:xxxx:0:0:0:1]:80>

It works, ipv6 in front still gives the error.

But admin-tools -> admin backup continues

So the set server to free in the IPv6 address so basically removing it, finally fixes that issue with re rewrite_confs.

But would be nice if rewrite_confs didn't mess this up.
root@da001:/usr/local/directadmin/data/admin/ips# da build rewrite_confs
2025/03/30 12:31:10 info executing task task=action=rewrite&value=ips
2025/03/30 12:32:09 info finished task duration=59.174423453s task=action=rewrite&value=ips
Using 38.242.244.206 for your server IP
Installing OWASP Core Rule Set for ModSecurity...
download_cached: using cached '/usr/local/directadmin/custombuild/cache/owasp-modsecurity-crs-4.12.0.tar.gz' file
Installation of ModSecurity Rule Set has been finished.
2025/03/30 12:32:14 info executing task task=action=rewrite&value=httpd
2025/03/30 12:32:14 info finished task duration=151.51698ms task=action=rewrite&value=httpd
Restarting apache.


But I still can't get into admin tools -Admin Backup.
"An error has occurred"
"You do not own any IPs"

Maybe start loosing these cryptic messages and actually add meaningful messages.

It's my second weekend trying to migrate this server. And now have spent many hours trying migrating, while I never had these kinds of issues before. Really starting to dislike Directadmin and the road they started on with the lifetime license. Not being to update to latest mariadb, while the last available option is EoL next year. So basically forcing us to buy new license to continue.
 
It's my second weekend trying to migrate this server
Which OS and version are you running on the new server?

Dit you wait after starting the installation that not only DA was finished but you also got the message that all background tasks were finished?

Doublechecked that the ipv4 is assigned to admin?
 
Hello,

It seems either the filename in /usr/local/directadmin/data/admin/ips/ or a content of files in the folder is wrong. To me it seems, the single filename contains both IPv6 and IPv4, which is wrong.
 
Using Ubuntu 24.04, installed it many weeks ago, been pre-configuring it for a while. Make sure I have at least the same settings as old server, and updating to new settings where possible.

directadmin is set to autoupdate, so at this time latest version available:

1743500299789.png



All IP files in /ips/* don't contain any IP's just basic config for directadmin.

I have two files where I have status=server, one for IPv4 and one for IPv6, where I changed status to free. So the rewrite_conf works.
IPv4:
add_to_device=yes
gateway=
netmask=/19
ns=
reseller=
status=server
value=1

For all IPv6:

add_to_device=yes
gateway=
global=no
netmask=ffff:ffff:ffff:ffff:0:0:0:0
ns=
reseller=
status=free
value=


Config of all the IP's is the same as on the old server. Except the change of IP's because it is a new server.
I have an ip.list with all IP's on a seperate line and a ips directory with all the IP's (filename), and filled with the directadmin data, shown above.

I would not expect the "You don't have any IPs" error as an admin, I would think I should be able to restore the backup and select the correct IP's for the restore to use.

All IP's in the IP management show with the ?:

  • Interface is running.
  • Valid broadcast address set.
  • Resources allocated.
  • Supports multicast
 
Using Ubuntu 24.04,
There you go... that's the issue.

with the lifetime license.
You can not use a lifetime license with Ubuntu 24.04.

A bit odd, in another post on installation of DA this error was given:
legacy code-base does not support debian13 system, downgrade your system or upgrade DirectAdmin license
so you would have known.

Latest supported DA version on legacy lifetime is Ubuntu 22.
 
This server is a paid standard license, so should work.

Just found out there is a discounted option for the legacy license, for some reason never knew about this option. So will probably upgrade one license and combine both old legacy licenses to one server.

But using the correct license, it still gives this error.
 
This server is a paid license, so should work.
In that case yes. Maybe best is to send in a ticket then.

As for the discount upgrade, yes that's present. However, do note that there no pause option, so as soon as you stop using the license, the discount as well as the license is gone.
 
Ticket created. Still have one legacy license so not really a problem. But for now I need to have a working server, I am working on my own solution for a while now, but not production ready yet. But the discount helps me, because that is just within budget at this time.
 
Apparently you can also have too many IPs, so the error should have been: You do not own any IPs (or too many)

Would have saved me many hours of debugging.
 
Back
Top