Help · Troubleshooting

A worker at a site won't connect

What to do when a worker you run at a customer's site doesn't show up, stops reporting, or its work waits.

Last updated

A worker at a customer's site connects out to the panel over HTTPS. If it doesn't show on Workers → Overview, or its Last used on the key stays at Never, start with its own log. On the server the worker runs on:

docker logs mygration-worker

The last lines usually say what's wrong. Find it below.

"The panel didn't accept this worker's key" #

You see in its log: The panel didn't accept this worker's key.

The key in its command is wrong, or it was revoked.

  1. On Workers → Overview, under Workers on other servers, check the key for that site isn't Revoked.

  2. If it is, or you're not sure the key is right, make a new one: give it a name, pick the customer, and click Make a key. Copy the key (it's shown once).

  3. On the site's server, start the worker again with the new key:

    docker rm -f mygration-worker
    docker run -d --name mygration-worker --restart unless-stopped \
      -e Worker__PanelUrl=https://migrate.brightpathit.example \
      -e Worker__Key=mgw_... \
      registry.mygration.cloud/mygration-worker:<panel version>

    Use the command the panel shows under the new key: Copy command.

  4. Revoke the old key, if it isn't already.

"Can't reach the panel" #

You see in its log: Can't reach the panel at …, or The panel isn't answering.

  1. Check Worker__PanelUrl is the panel's own address, starting https://, exactly as staff browse to it.
  2. From the site's server, check it can reach that address on port 443 (a browser, or curl -I https://<your panel's hostname>). The site's firewall must allow outbound HTTPS to it. Nothing needs to connect in to the site.
  3. If the panel is only reachable inside your own network, the site needs a way to reach it (a VPN, say).

A certificate error #

You see in its log an error about the panel's certificate: it isn't trusted, or the remote certificate is invalid.

The panel uses a certificate the site's server doesn't trust: the server's own certificate, or one from your own certificate authority.

  1. On the panel's server, copy the root certificate:

    sudo docker compose -f /opt/mygration/docker-compose.yml cp proxy:/data/caddy/pki/authorities/local/root.crt panel-ca.crt

    (With your own certificate authority, use its root certificate instead.)

  2. Copy panel-ca.crt to the site's server, next to where you run the worker.

  3. Start the worker again with these two settings added to its docker run command:

    -v ./panel-ca.crt:/panel-ca.crt:ro -e Worker__PanelCertificate=/panel-ca.crt

"Is plain HTTP" #

You see in its log: Worker__PanelUrl (…) is plain HTTP.

Workers only connect to the panel over HTTPS. Change Worker__PanelUrl to the panel's https:// address and start the worker again.

It can't download the worker #

You see, when you run docker run or docker pull on the site's server: denied, unauthorized or authentication required.

The site's server isn't signed in to download the worker.

  1. On Workers → Overview, make a new key for the site (Make a key). The panel shows a docker login command and a pull token for it.
  2. On the site's server, run that docker login command and paste the pull token as the password.
  3. Run the worker again with the new key, and Revoke the old one.

It connects, but runs another version #

You see: its Version marked on Workers → Overview, or Workers on other servers run another version on System → Updates.

Update it to the panel's version: see Updating Mygration.

Its customer's work waits #

You see: the customer's page says its work is waiting for its own workers, and nothing moves.

The key is set to run All its work for that customer, so other workers leave it alone, even while the site's worker is offline. Get the site's worker connected again using the sections above. If the customer's mail and files don't need to run at the site, change the key's For column to Its file servers' work on Workers → Overview, and the usual workers take the rest.

Still stuck #

Collect a support bundle from the panel, and send it with the last 50 lines of the worker's log (docker logs --tail 50 mygration-worker) to whoever helps you.