Thanks for posting the jira ticket. i will leave sth thereWe’ve created a ticket to FreeNAS system, pls also leave your case/comment there, thx:
Thanks for posting the jira ticket. i will leave sth thereWe’ve created a ticket to FreeNAS system, pls also leave your case/comment there, thx:
Will try this as fast as i can. Hopefully this helps.I seem to have fixed my fresh NextCloud plugin installation. Here's what I observed and fixed along the way.
I experienced the too many redirects error when attempting to load/apps/files
post sign-in.
jexec
'd into the jail./usr/local/www/nextcloud/apps
is empty. Apps seem to be located in/usr/local/www/nextcloud/apps-pkg
.
Moveed the apps directory to where the nextcloud config default expects them to be located.cd /usr/local/www/nextcloud && mv apps apps-old && mv apps-pkg apps
Fixed logging by appending'logfile' => '/var/log/nextcloud/nextcloud.log',
to the config array in/usr/local/www/nextcloud/config/config.php
Restarted php-fpm and tried again.service php-fpm restart
.
/var/log/nextcloud/nextcloud.log` complained with errors like `Base table or view not found: 1146 Table 'nextcloud.oc_flow_operations' doesn't exist
.
Edited/usr/local/www/nextcloud/config/config.php
and set'installed' => false
. Went to the base URL again (no/apps/files
), and got to the installation screen so I could have it "re-do" the installation. Entered in the same DB connection info from the post-install details. Added info for a new admin user (notncadmin
, because it already exists). Submitted the form and let it complete.
Thanks!!! It worked for me! Even when i submitted the new Usernames and passwords when entering the base URL, the Server loaded and recieved a time out, but after reloading i finally logged in my account and it worked!!!I seem to have fixed my fresh NextCloud plugin installation. Here's what I observed and fixed along the way.
I experienced the too many redirects error when attempting to load/apps/files
post sign-in.
jexec
'd into the jail./usr/local/www/nextcloud/apps
is empty. Apps seem to be located in/usr/local/www/nextcloud/apps-pkg
.
Moveed the apps directory to where the nextcloud config default expects them to be located.cd /usr/local/www/nextcloud && mv apps apps-old && mv apps-pkg apps
Fixed logging by appending'logfile' => '/var/log/nextcloud/nextcloud.log',
to the config array in/usr/local/www/nextcloud/config/config.php
Restarted php-fpm and tried again.service php-fpm restart
.
/var/log/nextcloud/nextcloud.log` complained with errors like `Base table or view not found: 1146 Table 'nextcloud.oc_flow_operations' doesn't exist
.
Edited/usr/local/www/nextcloud/config/config.php
and set'installed' => false
. Went to the base URL again (no/apps/files
), and got to the installation screen so I could have it "re-do" the installation. Entered in the same DB connection info from the post-install details. Added info for a new admin user (notncadmin
, because it already exists). Submitted the form and let it complete.
I seem to have fixed my fresh NextCloud plugin installation. Here's what I observed and fixed along the way.
I experienced the too many redirects error when attempting to load/apps/files
post sign-in.
jexec
'd into the jail./usr/local/www/nextcloud/apps
is empty. Apps seem to be located in/usr/local/www/nextcloud/apps-pkg
.
Moveed the apps directory to where the nextcloud config default expects them to be located.cd /usr/local/www/nextcloud && mv apps apps-old && mv apps-pkg apps
Fixed logging by appending'logfile' => '/var/log/nextcloud/nextcloud.log',
to the config array in/usr/local/www/nextcloud/config/config.php
Restarted php-fpm and tried again.service php-fpm restart
.
/var/log/nextcloud/nextcloud.log` complained with errors like `Base table or view not found: 1146 Table 'nextcloud.oc_flow_operations' doesn't exist
.
Edited/usr/local/www/nextcloud/config/config.php
and set'installed' => false
. Went to the base URL again (no/apps/files
), and got to the installation screen so I could have it "re-do" the installation. Entered in the same DB connection info from the post-install details. Added info for a new admin user (notncadmin
, because it already exists). Submitted the form and let it complete.
But now i have to know,how you knew this was the problem? I knew the error message while installing which said folder not found,the apps folder for example.
apps-pkg
folder looked like it actually contained the apps, so I decided to read through the example nextcloud config to understand the default apps path. I figured it was worth a shot to move apps-pkg
to apps
, which seemed to resolve that issue. Then I encountered the issue with the database tables and worked through the theory that the nextcloud installation hadn't completed correctly, or hadn't yet been performed at all. I remembered from previous nextcloud plugin installations I would enter the database credentials via the web UI, and it would perform some setup tasks. So, I decided to try setting installed
to false
to get back into that type of workflow.Would you please give help to double check if my below steps were something wrong/missing? Hope below steps would help everyone here, thanks again:
Step1. Click Jails-->select nextcloud-->shell
Step2. input: cd /usr/local/www/nextcloud && mv apps apps-old && mv apps-pkg apps
Step3. input: edit /usr/local/www/nextcloud/config/config.php
Step4. add 1 new line into bottom of the config.php file with: 'logfile' => '/var/log/nextcloud/nextcloud.log', than save changes
Step5. input: service php-frm restart
Step6. input: edit /usr/local/www/nextcloud/config/config.php
Step7. find the line 'installed' => true and change into 'installed' => false
Step8. open a new page in Chrome/FireFox and key the nextcloud's URL(for me is 192.168.1.101)
Step9. log-in/key-in/create with NEW account(not ncadmin), the DB connection key with the pos-install details
php-frm
should be php-fpm
. I might have also repeated step 5 after 7. These steps can be compressed into a single set of changes as follows:cd /usr/local/www/nextcloud && mv apps apps-old && mv apps-pkg apps
/usr/local/www/nextcloud/config/config.php
'installed' => true
to 'installed' => false
'logfile' => '/var/log/nextcloud/nextcloud.log'
service php-fpm restart
Those steps should do it. I think Step 5 has a typo, wherephp-frm
should bephp-fpm
. I might have also repeated step 5 after 7. These steps can be compressed into a single set of changes as follows:
- Click Jails -> select nextcloud -> shell
cd /usr/local/www/nextcloud && mv apps apps-old && mv apps-pkg apps
- Edit
/usr/local/www/nextcloud/config/config.php
- Change
'installed' => true
to'installed' => false
- Append
'logfile' => '/var/log/nextcloud/nextcloud.log'
- Save changes
service php-fpm restart
- Load your nextcloud UI in a browser
- Enter post-install details for the database configuration, and new credentials for an admin account
A great find for sure. The only question I have is why are apps being put in "apps-pkg" directory when the default directory is "apps". I tried to find information about apps-pkg directory in nextcloud docs but didn't find anything.I'm glad you were able to get things to a working state.
That error message made me curious about the resulting file structure. Theapps-pkg
folder looked like it actually contained the apps, so I decided to read through the example nextcloud config to understand the default apps path. I figured it was worth a shot to moveapps-pkg
toapps
, which seemed to resolve that issue. Then I encountered the issue with the database tables and worked through the theory that the nextcloud installation hadn't completed correctly, or hadn't yet been performed at all. I remembered from previous nextcloud plugin installations I would enter the database credentials via the web UI, and it would perform some setup tasks. So, I decided to try settinginstalled
tofalse
to get back into that type of workflow.
apps-pkg
seems to be patched in by the freenas setup - ref: https://github.com/search?q=org:freenas+apps-pkg&type=codeapps-pkg
, update some rewrite logic in https://github.com/freenas/iocage-p...ocal/etc/nginx/conf.d/nextcloud.conf.template, and change app-pkgs
to apps-pkg
in https://github.com/freenas/iocage-plugin-nextcloud/blob/master/post_install.sh#L120Those steps should do it. I think Step 5 has a typo, wherephp-frm
should bephp-fpm
. I might have also repeated step 5 after 7. These steps can be compressed into a single set of changes as follows:
- Click Jails -> select nextcloud -> shell
cd /usr/local/www/nextcloud && mv apps apps-old && mv apps-pkg apps
- Edit
/usr/local/www/nextcloud/config/config.php
- Change
'installed' => true
to'installed' => false
- Append
'logfile' => '/var/log/nextcloud/nextcloud.log'
- Save changes
service php-fpm restart
- Load your nextcloud UI in a browser
- Enter post-install details for the database configuration, and new credentials for an admin account
I am getting a
404 Not Found
nginx
error after following through your steps.
I followed remear's advice and the following procedure worked for me for the ERR_TOO_MANY_REDIRECTS error:Hello everyone,
I am not sure if this issue is there for the plugin update, but I just finished installing NextCloud Plugin (Version 20.0.4) and I have added the entry of my domain into trusted_domains. I can successfully see the login page, but once I hit I login with valid credentials, the browser shows me ERR_TOO_MANY_REDIRECTS error with message "nextcloud.domain.com redirected you too many times."
It keeps trying to redirect to /apps/files uri. When I checked /usr/local/www/nextcloud/apps, it was empty. I saw there is a new directory called apps_pkg with apps and tried to change the configuration to point to that directory, but after that, I started getting "Gateway timeout error"
Here is my new config to point to the new app directory (getting 504 Gateway timeout with below config).
"apps_paths" => array(
0 => array(
‘path’ => ‘/usr/local/www/nextcloud/apps-pkg’,
‘url’ => ‘/apps-pkg’,
‘writable’ => true,
),
),
Can anyone please help me here?
pkg install nano
cd /usr/local/www/nextcloud/config
nano config.php
'installed' => false
ctrl-x
, y
and then return
nextcloud
dbadmin
[new]
[new]
[new]