Updating OwnCloud

Status
Not open for further replies.

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
so did the update go through or not?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
hmm, did you check the log? no errors during the upgrade process? please start a thread in the owncloud forums too, they might know better how to debug
 

lneib

Dabbler
Joined
Nov 29, 2014
Messages
16
ohh, thanks for the followup. gonna upgrade my server to 8.2.3 then and try out php7 =]

maybe 9.0 next week
Did you ever get OwnCloud to work with PHP 7? I am currently runnig OwnCLoud 8.2.1 with PHP 5.4. Can you give me some hints on the process of updating PHP to the never version? I know the PHP has a lot of dependencies and I plan on upgrading Owncloud to a version that support s PHP 7 but how the heck did you know which dependencies owncloud uses and which are needed to be installed. Any help would be appreciated. I am using OwnCloud in a FreeNAS jail that I have been upgrading from version 7.0. I have been manually upgrading OwnCloud for a few years now but with 8.2.1 5.4 is no longer supported and I have tried installing PHP 5.6 but It does not work because I think I am missing some of the PHP dependancies

Thanks in advance
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Did you ever get OwnCloud to work with PHP 7? I am currently runnig OwnCLoud 8.2.1 with PHP 5.4. Can you give me some hints on the process of updating PHP to the never version? I know the PHP has a lot of dependencies and I plan on upgrading Owncloud to a version that support s PHP 7 but how the heck did you know which dependencies owncloud uses and which are needed to be installed. Any help would be appreciated. I am using OwnCloud in a FreeNAS jail that I have been upgrading from version 7.0. I have been manually upgrading OwnCloud for a few years now but with 8.2.1 5.4 is no longer supported and I have tried installing PHP 5.6 but It does not work because I think I am missing some of the PHP dependancies

Thanks in advance
I have all the php7 dependencies listed in this guide.
https://forums.freenas.org/index.ph...ing-nginx-php-fpm-and-mysql.17786/#post-95880
 

lneib

Dabbler
Joined
Nov 29, 2014
Messages
16
I will give this a try but I have to rebuild my test instance, I tried upgrading the PHP manually and it completely screwed up my jail and now I can't even get back in there to do anything with an SSH client. What is worse is I preformed a backup of the dataset in FreeNAS before the upgrade and the restore didn't work. I am not really sure what happened but I know I need to rebuild the my test instance and I am hoping to get to that this week. I will post once I get this done. This is a personal project for a non-profit and I wish I could work on this during the day but no luck with that. ;)
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I will give this a try but I have to rebuild my test instance, I tried upgrading the PHP manually and it completely screwed up my jail and now I can't even get back in there to do anything with an SSH client. What is worse is I preformed a backup of the dataset in FreeNAS before the upgrade and the restore didn't work. I am not really sure what happened but I know I need to rebuild the my test instance and I am hoping to get to that this week. I will post once I get this done. This is a personal project for a non-profit and I wish I could work on this during the day but no luck with that. ;)
It really shouldn't be that bad if you use 'pkg'. What do you mean by manually?
Just pkg delete all the php5X packages, and pkg install everything I have listed in that thread.
 

Raiz

Explorer
Joined
Nov 26, 2015
Messages
77
Today I was unable to access owncloud. I went to my installed plugins in the freeNAS GUI and noticed there was an owncloud update.
I tried to update owncloud, hoping that would fix it, and got the following error:

Sep 15 18:58:59 freenas manage.py: [middleware.exceptions:37] [MiddlewareError: umount: /mnt/volumeEternia/jails/owncloud_1/media: not a file system root directory]

Any thoughts? I've been running FreeNAS-9.3-STABLE-201512121950 for months with no issues until today...
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Today I was unable to access owncloud. I went to my installed plugins in the freeNAS GUI and noticed there was an owncloud update.
I tried to update owncloud, hoping that would fix it, and got the following error:

Sep 15 18:58:59 freenas manage.py: [middleware.exceptions:37] [MiddlewareError: umount: /mnt/volumeEternia/jails/owncloud_1/media: not a file system root directory]

Any thoughts? I've been running FreeNAS-9.3-STABLE-201512121950 for months with no issues until today...
It sounds like your /media mountpoint got unmounted. I'd try remounting it, then trying the upgrade.
 

Raiz

Explorer
Joined
Nov 26, 2015
Messages
77
Why would this randomly happen?

Could you post what I actually need to do in order to remount the /media direction? It's been so long I don't remember the code and googling isn't helping...

EDIT: I've noticed that I can access owncloud on my local address of 192.168.1.X but can't get to it through my non-local IP adderess of 73.31.166.XXX.

When I check my IP address, it seems to have changed. Could Comcast have just randomly changed my IP? If so, how do I keep this from happening again in the future?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Why would this randomly happen?

Could you post what I actually need to do in order to remount the /media direction? It's been so long I don't remember the code and googling isn't helping...
I think this happens because of bugs/unreliable code in the freenas PBI upgrade process.

you dont have to know any code to do this. FreeNAS WebUI > Jails > Storage
 

Raiz

Explorer
Joined
Nov 26, 2015
Messages
77
Thanks Joshua. Unfortunately, that didn't work either.


Sep 18 09:53:09 freenas manage.py: [middleware.exceptions:37] [MiddlewareError: The path could not be mounted /mnt/volumeEternia/jails/owncloud_1: Mount failed (64) -> mount_nullfs: /mnt/volumeEternia/jails/owncloud_1 (/mnt/volumeEternia/jails/owncloud_1) and /mnt/volumeEternia/jails/owncloud_1/media are not distinct paths
]
 

lneib

Dabbler
Joined
Nov 29, 2014
Messages
16
It really shouldn't be that bad if you use 'pkg'. What do you mean by manually?
Just pkg delete all the php5X packages, and pkg install everything I have listed in that thread.

A manual OwnCloud upgrade to me is stopping the web service, backing up the old OwnCloud folder, downloading and extrcting the new OwnCloud tar file. Finally moving the user.ini file over and making sure all the folders have the correct rights. My data folder is not inside my OwnCloud directory so I never have to copy.move my data. I did that years ago when I was still playing with the server and found out how to upgrade the server. To me it just made more sense if the server software was going to be upgraded regularly.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Thanks Joshua. Unfortunately, that didn't work either.


Sep 18 09:53:09 freenas manage.py: [middleware.exceptions:37] [MiddlewareError: The path could not be mounted /mnt/volumeEternia/jails/owncloud_1: Mount failed (64) -> mount_nullfs: /mnt/volumeEternia/jails/owncloud_1 (/mnt/volumeEternia/jails/owncloud_1) and /mnt/volumeEternia/jails/owncloud_1/media are not distinct paths
]
Your mountpoint looks bad to me from looking at those paths. I recommend you remove it.
 

airflow

Contributor
Joined
May 29, 2014
Messages
111
Hello all!

I use the owncloud-plugin from the "official" list of plugins of FreeNAS. FreeNAS version is the latest 9.3-stable (not 9.10).

I haven't updated owncloud for a while and it was at v8.x (don't know exactly). So I triggered the update to v9.1.0 via the update-button in the FreeNAS-GUI. Update ran through successfully, after which I opened the GUI and saw there has still to be another update done.

It doesn't matter whether I start this second update-process via GUI or CLI (like Joshua Parker Ruehlig explained). It stops with this message:

Code:
[root@freenas] ~# jexec owncloud_1 csh
root@owncloud_1:/ # chsh -s /bin/sh www
chsh: user information updated
root@owncloud_1:/ # su www
$ cd /usr/pbi/owncloud-amd64/www/owncloud
$
$ /usr/pbi/owncloud-amd64/bin/php ./occ upgrade
The process control (PCNTL) extensions are required in case you want to interrupt long running commands - see http://php.net/manual/en/book.pcntl.php
ownCloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Set log level to debug
Turned on maintenance mode
Exception: Updates between multiple major versions and downgrades are unsupported.
Update failed
Maintenance mode is kept active
Reset log level
$


Does anyone have experience with this situation, is it solvable or is my owncloud-installation hosed? I deliberatly took a snapshot of the jail before doing the upgrade.

cheers,
airflow
 

adrianwi

Guru
Joined
Oct 15, 2013
Messages
1,231
Pretty sure ownCloud doesn't like big updates, although not sure that is your problem as I don't use the plug-in. Perhaps that deals with major updates better

You could try updating 8 through to 8.2.8 and then from there to 9.0 and/or 9.1, although again not sure how feasible that is through the plug-in.

Good luck
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
As adrian said, you probably need to upgrade to each major version from where you started. I'd keep a backup of your current config.php somewhere just in case.

You could try the below, replacing VERSION with 8.1.0, 8.2.0, 9.0.0, 9.1.0
Code:
cp /usr/pbi/owncloud-amd64/www/owncloud/config/config.php .
rm -r /usr/pbi/owncloud-amd64/www/owncloud
fetch "http://download.owncloud.org/community/owncloud-VERSION.tar.bz2"
tar jxf owncloud-*.tar.bz2 -C /usr/local/www
cp config.php /usr/pbi/owncloud-amd64/www/owncloud/config
chown -R www:www /usr/pbi/owncloud-amd64/www/owncloud
su -m www -c 'php /usr/pbi/owncloud-amd64/www/owncloud/occ upgrade'
rm owncloud-*.tar.bz2
 

airflow

Contributor
Joined
May 29, 2014
Messages
111
As adrian said, you probably need to upgrade to each major version from where you started. I'd keep a backup of your current config.php somewhere just in case.

You could try the below, replacing VERSION with 8.1.0, 8.2.0, 9.0.0, 9.1.0
Code:
cp /usr/pbi/owncloud-amd64/www/owncloud/config/config.php .
rm -r /usr/pbi/owncloud-amd64/www/owncloud
fetch "http://download.owncloud.org/community/owncloud-VERSION.tar.bz2"
tar jxf owncloud-*.tar.bz2 -C /usr/local/www
cp config.php /usr/pbi/owncloud-amd64/www/owncloud/config
chown -R www:www /usr/pbi/owncloud-amd64/www/owncloud
su -m www -c 'php /usr/pbi/owncloud-amd64/www/owncloud/occ upgrade'
rm owncloud-*.tar.bz2

Hello Joshua, thanks for your help. I tried your suggestion, but it failed. First because we delete "/usr/pbi/owncloud-amd64/www/owncloud" only to later copy a file to the same destination, which fails. I solved this by recreating the directory. But later you suggest to execute "su -m www -c 'php /usr/pbi/owncloud-amd64/www/owncloud/occ upgrade'" which also fails because these executables do not exist. I tried figuring out what you really meant by searching for these executables somewhere else and tried a few things, but it didn't work out... Perhaps you can help me out here.

Thanks!
airflow
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Hello Joshua, thanks for your help. I tried your suggestion, but it failed. First because we delete "/usr/pbi/owncloud-amd64/www/owncloud" only to later copy a file to the same destination, which fails. I solved this by recreating the directory. But later you suggest to execute "su -m www -c 'php /usr/pbi/owncloud-amd64/www/owncloud/occ upgrade'" which also fails because these executables do not exist. I tried figuring out what you really meant by searching for these executables somewhere else and tried a few things, but it didn't work out... Perhaps you can help me out here.

Thanks!
airflow
the fetch and tar commands should download successive versions of owncloud and unpack them, recreating your owncloud directory each time you go through the steps.
You did replace the word VERSION in the fetch command right?
 

airflow

Contributor
Joined
May 29, 2014
Messages
111
the fetch and tar commands should download successive versions of owncloud and unpack them, recreating your owncloud directory each time you go through the steps.
You did replace the word VERSION in the fetch command right?

I understand, but the extract-command you use extracts to a different location than the other commands, so that cannot work, no? I tried to correct this by changing
Code:
"tar jxf owncloud-*.tar.bz2 -C /usr/local/www" to
"tar jxf owncloud-*.tar.bz2 -C /usr/pbi/owncloud-amd64/www". 
I also changed the upgrade-command from
Code:
"su -m www -c 'php /usr/pbi/owncloud-amd64/www/owncloud/occ upgrade'" to
"su -m www -c '/usr/pbi/owncloud-amd64/bin/php /usr/pbi/owncloud-amd64/www/owncloud/occ upgrade'"

This command throws
Code:
root@owncloud_1:~/owncloud.config.bak # su -m www -c '/usr/pbi/owncloud-amd64/bin/php /usr/pbi/owncloud-amd64/www/owncloud/occ upgrade'
An unhandled exception has been thrown:
exception 'OCP\AutoloadNotAllowedException' with message 'Autoload path not allowed: /root/owncloud.config.bak/config.php' in /usr/pbi/owncloud-amd64/www/owncloud/lib/autoloader.php:138
Stack trace:
#0 /usr/pbi/owncloud-amd64/www/owncloud/lib/autoloader.php(158): OC\Autoloader->isValidPath('/root/owncloud....')
#1 [internal function]: OC\Autoloader->load('OC\\Config')
#2 /usr/pbi/owncloud-amd64/www/owncloud/lib/base.php(133): spl_autoload_call('OC\\Config')
#3 /usr/pbi/owncloud-amd64/www/owncloud/lib/base.php(485): OC::initPaths()
#4 /usr/pbi/owncloud-amd64/www/owncloud/lib/base.php(1061): OC::init()
#5 /usr/pbi/owncloud-amd64/www/owncloud/console.php(42): require_once('/usr/pbi/ownclo...')
#6 /usr/pbi/owncloud-amd64/www/owncloud/occ(11): require_once('/usr/pbi/ownclo...')
#7 {main}root@owncloud_1:~/owncloud.config.bak #

I could solve this problem by changing first into the directory of the php-binary (/usr/pbi/owncloud-amd64/bin). After that it worked and I could apply those updates sequentially. I had to put Owncloud out of maintenance-mode with the command "su -m www -c '/usr/pbi/owncloud-amd64/bin/php /usr/pbi/owncloud-amd64/www/owncloud/occ maintenance:mode --off'". I also had to recover my official certificates after that.

Thanks for help,
airflow
 
Status
Not open for further replies.
Top