Skip to main content

Troubleshoot domain moves

What to look at when a holder's domain move is stuck. The tool prints what it waits for, and elpan-migrate status says where each domain stands; ask the holder for both. The panel's log has the server's side:

journalctl -u 'elpan-panel*' -g 'example.com'

SSH between two servers​

In a move between two servers, the receiving server copies mail and files from the giving one: it opens SSH connections to the giving server's SSH port, as the receiving account's main and mail users, one for each mailbox and folder. The machine the holder runs the tool on connects to the receiving server's SSH port too, and an export or import to the server's.

The port is the one sshd listens on: 22, or the one elpan-ssh-harden chose. The panel tells the tool which.

On the giving server, let the receiving server in:

  • Elpan's firewall accepts SSH from anywhere but the addresses in its SSH blocklist (blacklist_ssh, blacklist_ssh_v6) and its global one. Take the other server out of them, and out of any tool of yours that fills them.
  • A firewall in front of the server, at your network or your cloud provider, needs a rule for the other server's addresses.

A copy that can't connect fails and names the host and port. Copying through the tool's machine instead isn't available.

A switch that waits, then fails​

At the switch the tool makes the giving domain unavailable, then waits until the panel reports it settled: mail and web configuration applied, Dovecot's logins refused and its sessions ended, and no message from or to the domain in the outgoing queue. After 20 minutes it gives up and names what it waited for, e.g. has not settled after 20m0s (waiting for 3 message(s) in the outgoing queue).

Waiting forLook at
The outgoing queueSystem › Outgoing Mail Queue: a message from or to the domain that a remote server keeps deferring keeps the domain from settling, for as long as the mail system retries it. Deal with it with postsuper, then systemctl start elpan-mail-queue-sync-now: the panel's copy of the queue is otherwise a few minutes old.
The mail server's or the web server's configurationThe new state wasn't applied: the journal of elpan-mail-in or elpan-httpd.
The mailbox loginsDovecot's state for the domain wasn't written or its cache wasn't flushed: the panel's log.

The domain stays unavailable after the tool gives up, until its lease runs out (within half an hour of the tool's last renewal) or the holder runs switch again or abort.

A domain stuck unavailable​

On the holder's Domains page, Temporarily unavailable alone is a domain under a lease: its pages say until when. The lease sweep runs every minute in the panel's scheduler; at the lease's end the domain is active again, and its databases writable. If it isn't, check the scheduler (journalctl -u elpan-panel-scheduler.service) and the workers.

Temporarily unavailable with Handed over has no lease: the domain went to another server and stays unavailable here for good. That's correct once the move is finished. If the move stopped between the hand-over and the activation at the other server, the domain is unavailable on both:

The domain should beDo
At the other serverThe holder runs switch again, which only activates; or the receiving holder selects Activate on the inactive copy there.
Here, the move abandonedThe holder selects Make available again here, which also writes the zone at its DNS provider again.
Make sure the other server doesn't serve it

Both buttons warn about it: if both copies are active, both servers take the domain's mail and write its DNS over each other. Check the other server's copy first. Acting in the account, you can use the same buttons.

Activate is offered only on a copy that a move from another server made, while no account of this server holds the name. Make available again is offered on a copy that holds the name and is unavailable.

A stand-in left after the registrar change​

Where a server hosts a domain's zone itself, a move to another server leaves a stand-in at the old one: its name servers answer with a copy of the new server's records until the registrar names the new name servers. The old copy is meant to be removed a day or two after that, by its holder.

The holder's pages say whether the parent still delegates the domain to this server. While it does, the removal's dry run warns that removing the copy takes the domain off the DNS for everybody the registrar still sends here. To check yourself, dig +trace NS example.com shows the parent's referral, the NS records just before the domain's own answer.

When the delegation has moved and the holder doesn't remove the copy, you can remove the domain from their account. Removing it deletes the zone from this server's name servers, and never touches a zone at a DNS provider.

A stand-in is kept current only while the holder runs elpan-migrate watch. A record changed at the new server after that is answered with the old value here, which is one more reason the registrar change shouldn't wait.

A refused approval​

The approval page shows a reason instead of the form when the server or the account doesn't allow moves: the move switch or the add-and-remove switch is off, the account's domain limit is 0, or the account is suspended or being deleted. See The switch.

A receiving account at its domain limit is approved, and refused later: plan reports the missing room, and making the copy fails on the limit.

Leftover SSH keys​

Each access is a key line in /var/lib/elpan/ssh/session-keys/<user> and a file in /var/lib/elpan/ssh/transfer-accesses/. The panel removes them when an access ends, its approval ends or the account is suspended, and every minute removes any it has no record of. sshd refuses a key past its expiry-time in any case.