ddavness / power-mailinabox

A Mail-in-a-Box with extra capabilities and more customizability. Not just for power users!
Creative Commons Zero v1.0 Universal
172 stars 32 forks source link

Upgrade fails on Nextcloud install step #67

Closed leancode closed 2 years ago

leancode commented 2 years ago

I was upgrading from 56.3 (not 100% certain but something of that sort) and got an error. I tried again and screen captured the same error, see below during Nextcloud upgrade step. The mail server is still running and imap is serving and admin page is up but no nextcloud or webmail. Where do I go from here?

root@ismtp:~# curl -L https://power-mailinabox.net/setup.sh | sudo bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  2289  100  2289    0     0   8803      0 --:--:-- --:--:-- --:--:--  8803
Screenshot 2022-07-20 at 13 21 09 Screenshot 2022-07-20 at 13 22 23
Primary Hostname: ismtp.redacted.com
Public IP Address: 212.xxx.xxx.xxx
Public IPv6 Address: 2001:xxx:xxxx:xxx::1
Mail-in-a-Box Version:  v56.5

Updating system packages...
Installing system packages...
Initializing system random number generator...
Opening alternate SSH port xxxxx.
Firewall is active and enabled on system startup
Installing nsd (DNS server)...
Installing Postfix (SMTP server)...
Installing Dovecot (IMAP server)...
Installing OpenDKIM/OpenDMARC...
Installing SpamAssassin...
Installing Nginx (web server)...
Installing Roundcube (webmail)...
Installing Nextcloud (contacts/calendar)...
Upgrading Nextcloud --- backing up existing installation, configuration, and database to directory to /home/user-data/owncloud-backup/2022-07-20-13:23:43...

Upgrading to Nextcloud version 21.0.9

FAILED: wget -O /tmp/user_external.tgz https://github.com/nextcloud-releases/user_external/releases/download/v2.1.0/user_external-v2.1.0.tar.gz
-----------------------------------------
--2022-07-20 13:23:56--  https://github.com/nextcloud-releases/user_external/releases/download/v2.1.0/user_external-v2.1.0.tar.gz
Resolving github.com (github.com)... 140.82.121.3
Connecting to github.com (github.com)|140.82.121.3|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2022-07-20 13:23:56 ERROR 404: Not Found.

-----------------------------------------
root@ismtp:~#
leancode commented 2 years ago

OK I made progress: The URL for the user_external is wrong in setup/nextcloud.sh The script creates:

https://github.com/nextcloud-releases/user_external/releases/download/v2.1.0/user_external-v2.1.0.tar.gz

But it should be:

https://github.com/nextcloud/user_external/releases/download/vv2.1.0/user_external-v2.1.0.tar.gz

changing the setup/nextcloud.sh script to reflect this the 21.0.9 upgrade goes well.

From here the plot thickens. The next failure is when installing 22.2.6: Upgrading to Nextcloud version 22.2.6

FAILED: wget -O /tmp/user_external.tgz https://github.com/nextcloud/user_external/releases/download/v3.0.0/user_external-3.0.0.tar.gz
-----------------------------------------
--2022-07-20 22:10:38--  https://github.com/nextcloud/user_external/releases/download/v3.0.0/user_external-3.0.0.tar.gz
Resolving github.com (github.com)... 140.82.121.3
Connecting to github.com (github.com)|140.82.121.3|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2022-07-20 22:10:38 ERROR 404: Not Found.

I will report more when I know more

leancode commented 2 years ago

OK the original URL in setup/nextcloud.sh is correct for the 3.0.0 of user_external but not for the earlier ones. I would love to do a pull request but I am not that good with bash! Thank you guys. I am back up and running but this is a bug.

petertayloruk commented 2 years ago

Any update on this issue? it's borked my install. i've managed to get the webmail to work (which also broke, as i'm guessing the upgrade script stopped halfway through due to incorrect URL for nextcloud install). But I can't get the admin part of the system to work.

leancode commented 2 years ago

@petertayloruk That is exactly what happened to me. While this is open you have to manually edit the url in setup/nextcloud.sh before running the setup script. Also make sure you comment out the pulling of the latest otherwise your edit will be immediately overwriten. This way, version by version I was able to get back up and running. Once you are upgraded to 3.0 of nextcloud, future upgrades should work as usual again, because the url for the 3.0 is actually correct. Take a look at the patch from @JokerfaceHD, that shows you what is going on.

ddavness commented 2 years ago

Yawhoops! I'll take care of that ASAP. Sorry for the delay!

ddavness commented 2 years ago

v60.0 was released and the problem should be fixed by now. Otherwise, feel free to reopen! Thanks for waiting here with me :sweat_smile: