<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Upgrade from 9.2.0 to 10.0.2 interrupted by apt-daily-upgrade, leaving pending database migrations]]></title><description><![CDATA[<p dir="auto">Hi all</p>
<p dir="auto">I encountered an issue while upgrading Cloudron from <strong>9.2.0 to 10.0.2</strong> on Ubuntu 24.04.</p>
<p dir="auto">I investigated with ChatGPT, and below you can find report that I asked to write.</p>
<p dir="auto">I hope this can help to fix the installation script.</p>
<p dir="auto">Thanks</p>
<hr />
<p dir="auto">After the upgrade, the dashboard was unreachable. Running:</p>
<pre><code class="language-bash">sudo cloudron-support --troubleshoot
</code></pre>
<p dir="auto">reported:</p>
<pre><code class="language-text">Database migrations are pending.
Last migration in DB: 20260330000000-backupSites-remove-disk-provider.js
Last migration file: 20260820150000-users-add-loginLocationsJson.js
</code></pre>
<p dir="auto">The Box service was running, but <code>box.log</code> contained:</p>
<pre><code class="language-text">Unknown column 'apps.requiresVpn' in 'field list'
</code></pre>
<p dir="auto">The missing column should have been created by:</p>
<pre><code class="language-text">20260624120000-apps-add-requiresVpn.js
</code></pre>
<p dir="auto">Disk space and inodes were fine, and MySQL, Docker and nginx were running normally.</p>
<p dir="auto">Looking at the update task and previous boot journal, I found this sequence:</p>
<pre><code class="language-text">installer: stop box service for update
installer: switching the box code
installer: calling box setup script
start: Configuring nginx
Warning! D-Bus connection terminated.
Failed to wait for response: Connection reset by peer
</code></pre>
<p dir="auto">At approximately the same time, <code>apt-daily-upgrade.service</code> and <code>unattended-upgrade</code> started. This caused a systemd re-execution, after which:</p>
<pre><code class="language-text">cloudron-updater.service: Main process exited, status=1/FAILURE
</code></pre>
<p dir="auto">It appears that the new 10.0.2 code was installed, but the setup script stopped before applying the database migrations. This left the Cloudron code and database schema out of sync.</p>
<h3>Recovery</h3>
<p dir="auto">I temporarily stopped and runtime-masked the automatic APT services to prevent another concurrent run:</p>
<pre><code class="language-bash">sudo systemctl stop apt-daily.timer apt-daily-upgrade.timer
sudo systemctl stop apt-daily.service apt-daily-upgrade.service packagekit.service

sudo systemctl mask --runtime \
  apt-daily.service \
  apt-daily-upgrade.service \
  packagekit.service
</code></pre>
<p dir="auto">After confirming that no active APT or DPKG operation was running, I stopped Box and ran the troubleshooting command again:</p>
<pre><code class="language-bash">sudo systemctl stop box
sudo cloudron-support --troubleshoot
</code></pre>
<p dir="auto">Because Box was down, the support tool automatically reran the Cloudron startup/migration script. All pending migrations were then processed successfully, including:</p>
<pre><code class="language-text">Processed migration 20260624120000-apps-add-requiresVpn
...
Processed migration 20260820150000-users-add-loginLocationsJson
Done
</code></pre>
<p dir="auto">It also restarted Box automatically.</p>
<p dir="auto">A subsequent check showed:</p>
<pre><code class="language-text">[OK] dashboard is reachable via loopback
[OK] No pending database migrations
[OK] box v10.0.2 is running
[OK] Dashboard is reachable via IPv4

PASS: 29
WARN: 0
FAIL: 0
</code></pre>
<p dir="auto">The dashboard also returned HTTP 200.</p>
<p dir="auto">Finally, I restored the APT services:</p>
<pre><code class="language-bash">sudo systemctl unmask --runtime \
  apt-daily.service \
  apt-daily-upgrade.service \
  packagekit.service

sudo systemctl start apt-daily.timer apt-daily-upgrade.timer
</code></pre>
<p dir="auto">Everything is now working correctly.</p>
<p dir="auto">Could this have been caused by a race between the Cloudron setup script and <code>apt-daily-upgrade</code>? Would it make sense for the updater to temporarily inhibit automatic APT jobs or automatically resume the migration phase if the detached updater service is interrupted?</p>
]]></description><link>https://forum.cloudron.io/topic/15872/upgrade-from-9.2.0-to-10.0.2-interrupted-by-apt-daily-upgrade-leaving-pending-database-migrations</link><generator>RSS for Node</generator><lastBuildDate>Mon, 31 Aug 2026 03:35:40 GMT</lastBuildDate><atom:link href="https://forum.cloudron.io/topic/15872.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 28 Aug 2026 07:33:47 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Upgrade from 9.2.0 to 10.0.2 interrupted by apt-daily-upgrade, leaving pending database migrations on Sat, 29 Aug 2026 06:57:54 GMT]]></title><description><![CDATA[<p dir="auto">Thanks for your prompt response <a class="plugin-mentions-user plugin-mentions-a" href="/user/girish" aria-label="Profile: girish">@<bdi>girish</bdi></a>.</p>
]]></description><link>https://forum.cloudron.io/post/128691</link><guid isPermaLink="true">https://forum.cloudron.io/post/128691</guid><dc:creator><![CDATA[p44]]></dc:creator><pubDate>Sat, 29 Aug 2026 06:57:54 GMT</pubDate></item><item><title><![CDATA[Reply to Upgrade from 9.2.0 to 10.0.2 interrupted by apt-daily-upgrade, leaving pending database migrations on Fri, 28 Aug 2026 13:19:24 GMT]]></title><description><![CDATA[<p dir="auto">I added a retry in 9918c6e8cfab02a0120a9e8a990a6bb5e69152e1 . Thanks for the report .</p>
]]></description><link>https://forum.cloudron.io/post/128656</link><guid isPermaLink="true">https://forum.cloudron.io/post/128656</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Fri, 28 Aug 2026 13:19:24 GMT</pubDate></item><item><title><![CDATA[Reply to Upgrade from 9.2.0 to 10.0.2 interrupted by apt-daily-upgrade, leaving pending database migrations on Fri, 28 Aug 2026 08:05:06 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/james" aria-label="Profile: james">@<bdi>james</bdi></a> Thanks a lot !</p>
]]></description><link>https://forum.cloudron.io/post/128647</link><guid isPermaLink="true">https://forum.cloudron.io/post/128647</guid><dc:creator><![CDATA[p44]]></dc:creator><pubDate>Fri, 28 Aug 2026 08:05:06 GMT</pubDate></item><item><title><![CDATA[Reply to Upgrade from 9.2.0 to 10.0.2 interrupted by apt-daily-upgrade, leaving pending database migrations on Fri, 28 Aug 2026 07:44:21 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/p44" aria-label="Profile: p44">@<bdi>p44</bdi></a><br />
Thanks for starring this.<br />
Maybe we could add a safeguard to temporarily disable the apt-daily services when a Cloudron update is started.</p>
]]></description><link>https://forum.cloudron.io/post/128636</link><guid isPermaLink="true">https://forum.cloudron.io/post/128636</guid><dc:creator><![CDATA[james]]></dc:creator><pubDate>Fri, 28 Aug 2026 07:44:21 GMT</pubDate></item></channel></rss>